Update cheatsheets

This commit is contained in:
ivuorinen
2024-03-21 00:14:12 +00:00
parent ed20cae0f7
commit f595aabfbc
8 changed files with 45 additions and 13 deletions

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# cargo init
> Create a new Cargo package.
> Equivalent of `cargo new`, but specifiying a directory is optional.
> Equivalent of `cargo new`, but specifying a directory is optional.
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-init.html>.
- Initialize a Rust project with a binary target in the current directory:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# cargo new
> Create a new Cargo package.
> Equivalent of `cargo init`, but specifiying a directory is required.
> Equivalent of `cargo init`, but specifying a directory is required.
> More information: <https://doc.rust-lang.org/cargo/commands/cargo-new.html>.
- Create a new Rust project with a binary target:

View File

@@ -12,6 +12,10 @@ source: https://github.com/tldr-pages/tldr.git
`ffmpeg -i {{path/to/video.mp4}} -vn {{path/to/sound.mp3}}`
- Transcode a FLAC file to Red Book CD format (44100kHz, 16bit):
`ffmpeg -i {{path/to/input_audio.flac}} -ar 44100 -sample_fmt s16 {{path/to/output_audio.wav}}`
- Save a video as GIF, scaling the height to 1000px and setting framerate to 15:
`ffmpeg -i {{path/to/video.mp4}} -vf 'scale=-1:{{1000}}' -r {{15}} {{path/to/output.gif}}`
@@ -20,13 +24,9 @@ source: https://github.com/tldr-pages/tldr.git
`ffmpeg -i {{path/to/frame_%d.jpg}} -f image2 {{video.mpg|video.gif}}`
- Quickly extract a single frame from a video at time mm:ss and save it as a 128x128 resolution image:
`ffmpeg -ss {{mm:ss}} -i {{path/to/video.mp4}} -frames 1 -s {{128x128}} -f image2 {{path/to/image.png}}`
- Trim a video from a given start time mm:ss to an end time mm2:ss2 (omit the -to flag to trim till the end):
`ffmpeg -ss {{mm:ss}} -to {{mm2:ss2}} -i {{path/to/video.mp4}} -codec copy {{path/to/output.mp4}}`
`ffmpeg -ss {{mm:ss}} -to {{mm2:ss2}} -i {{path/to/input_video.mp4}} -codec copy {{path/to/output_video.mp4}}`
- Convert AVI video to MP4. AAC Audio @ 128kbit, h264 Video @ CRF 23:

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# pkgctl db update
> Update the `pacman` database as final release step for packages that have been transfered and staged on <https://repos.archlinux.org>.
> Update the `pacman` database as final release step for packages that have been transferred and staged on <https://repos.archlinux.org>.
> More information: <https://man.archlinux.org/man/pkgctl-db-update.1>.
- Update the binary repository as final release step:

14
tldr/pbmtopi3 Normal file
View File

@@ -0,0 +1,14 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# pbmtopi3
> Convert a PBM image to an Atari Degas PI3 image.
> See also: `pi3topbm`.
> More information: <https://netpbm.sourceforge.net/doc/pbmtopi3.html>.
- Convert a PBM image to an Atari Degas PI3 image:
`pbmtopi3 {{path/to/image.pbm}} > {{path/to/atari_image.pi3}}`

View File

@@ -20,7 +20,7 @@ source: https://github.com/tldr-pages/tldr.git
`pcapfix --outfile {{path/to/repaired.pcap}} {{path/to/file.pcap}}`
- Repair a PcapNG file and treat it as a PcapNG file, ignoring the automatic recognition:
- Treat the specified file as a PcapNG file, ignoring automatic recognition:
`pcapfix --pcapng {{path/to/file.pcapng}}`

14
tldr/pi3topbm Normal file
View File

@@ -0,0 +1,14 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# pi3topbm
> Convert an Atari Degas PI3 image to PBM image.
> See also: `pbmtopi3`.
> More information: <https://netpbm.sourceforge.net/doc/pi3topbm.html>.
- Convert an Atari Degas PI3 image to PBM image:
`pi1topbm {{path/to/atari_image.pi3}} > {{path/to/output_image.pbm}}`

View File

@@ -8,18 +8,22 @@ source: https://github.com/tldr-pages/tldr.git
> A web application bruteforcer.
> More information: <https://wfuzz.readthedocs.io/en/latest/user/basicusage.html>.
- Directory and file bruteforce using the specified wordlist and also proxying the traffic:
- Directory and file bruteforce using the specified [w]ordlist and also [p]roxying the traffic:
`wfuzz -w {{path/to/file}} -p {{127.0.0.1:8080}} {{http://example.com/FUZZ}}`
- Save the results to a file:
- Save the results to a [f]ile:
`wfuzz -w {{path/to/file}} -f {{filename}} {{http://example.com/FUZZ}}`
- Show colorized output while only showing the declared response codes in the output:
- Show [c]olorized output while only showing the declared response codes in the output:
`wfuzz -c -w {{path/to/file}} --sc {{200,301,302}} {{http://example.com/FUZZ}}`
- Use a custom header to fuzz subdomains while hiding specific response codes and word counts. Increase the threads to 100 and include the target ip/domain:
- Use a custom [H]eader to fuzz subdomains while [h]iding specific response [c]odes and word counts. Increase the [t]hreads to 100 and include the target ip/domain:
`wfuzz -w {{path/to/file}} -H {{"Host: FUZZ.example.com"}} --hc {{301}} --hw {{222}} -t {{100}} {{example.com}}`
- Brute force Basic Authentication using a list of usernames and passwords from files for each FUZ[z] keyword, [h]iding response [c]odes of unsuccessful attempts:
`wfuzz -c --hc {{401}} -s {{delay_between_requests_in_seconds}} -z file,{{path/to/usernames}} -z file,{{path/to/passwords}} --basic 'FUZZ:FUZ2Z' {{https://example.com}}`