From dfdf48edee7a1ad18657b762e366e1c026ea9c92 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Mon, 2 Jun 2025 00:21:21 +0000 Subject: [PATCH] Update cheatsheets --- tldr/doggo | 2 +- tldr/irb | 2 +- tldr/linux/bootc | 2 +- tldr/linux/bootc-switch | 2 +- tldr/linux/pstree | 14 +++++++++++++- tldr/linux/yay | 2 +- tldr/mdk4 | 23 +++++++++++++++++++++++ tldr/neo4j-admin | 2 +- tldr/osx/bclm | 2 +- tldr/pamundice | 2 +- tldr/rlwrap | 10 +++++----- tldr/truncate | 2 +- tldr/yapf | 6 +----- 13 files changed, 51 insertions(+), 20 deletions(-) create mode 100644 tldr/mdk4 diff --git a/tldr/doggo b/tldr/doggo index 2a42936d..f382da16 100644 --- a/tldr/doggo +++ b/tldr/doggo @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > DNS client for Humans. > Written in Golang. -> More information: . +> More information: . - Perform a simple DNS lookup: diff --git a/tldr/irb b/tldr/irb index 9eae88da..863d83fc 100644 --- a/tldr/irb +++ b/tldr/irb @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Interactive Ruby shell. > Evaluate Ruby code read from `stdin`. -> More information: . +> More information: . - Start the interactive shell: diff --git a/tldr/linux/bootc b/tldr/linux/bootc index 1ac8a5d3..c6b10f32 100644 --- a/tldr/linux/bootc +++ b/tldr/linux/bootc @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Boot and upgrade via container images. > Manages transactional, in-place operating system updates using OCI/Docker container images. -> More information: . +> More information: . - Show deployments in the order they will appear in the bootloader: diff --git a/tldr/linux/bootc-switch b/tldr/linux/bootc-switch index 51f3c41d..146ed4da 100644 --- a/tldr/linux/bootc-switch +++ b/tldr/linux/bootc-switch @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # bootc switch > Target a new container image reference to boot. -> More information: . +> More information: . - Change the base OS to a new container image from a registry: diff --git a/tldr/linux/pstree b/tldr/linux/pstree index 8c0896c4..c668470a 100644 --- a/tldr/linux/pstree +++ b/tldr/linux/pstree @@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git > A convenient tool to show running processes as a tree. > More information: . -- Display a tree of processes: +- Display a tree of all processes (rooted at init): `pstree` @@ -19,3 +19,15 @@ source: https://github.com/tldr-pages/tldr.git - Display all process trees rooted at processes owned by specified user: `pstree {{user}}` + +- Display command line arguments: + +`pstree {{[-a|--arguments]}}` + +- Display children of a specified process: + +`pstree {{pid}}` + +- Display parents of a specified process: + +`pstree {{[-s|--show-parents]}} {{pid}}` diff --git a/tldr/linux/yay b/tldr/linux/yay index 64220913..3071dfd6 100644 --- a/tldr/linux/yay +++ b/tldr/linux/yay @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # yay > Yet Another Yogurt: build and install packages from the Arch User Repository. -> Also see `pacman`. +> See also: `pacman`. > More information: . - Interactively search and install packages from the repos and AUR: diff --git a/tldr/mdk4 b/tldr/mdk4 new file mode 100644 index 00000000..dcfd54c1 --- /dev/null +++ b/tldr/mdk4 @@ -0,0 +1,23 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# mdk4 + +> A proof-of-concept tool to exploit common IEEE 802.11 protocol weaknesses. +> Note: Exercise extreme caution as this tool can disrupt WiFi networks and disconnect nearby users. +> See also: `airodump-ng`, `airmon-ng`. +> More information: . + +- Flood access points with beacon frames to create fake networks (set interface to monitor mode with `sudo airmon-ng start ` if needed): + +`sudo mdk4 {{wifi_interface}} b -f {{path/to/beacons.txt}}` + +- Perform deauthentication attack against all clients on all BSSIDs: + +`sudo mdk4 {{wifi_interface}} d` + +- Perform deauthentication attack on a specific BSSID (list BSSIDs using `sudo airodump-ng `): + +`sudo mdk4 {{wifi_interface}} d -B {{BSSID}}` diff --git a/tldr/neo4j-admin b/tldr/neo4j-admin index d13034dd..ebf8093b 100644 --- a/tldr/neo4j-admin +++ b/tldr/neo4j-admin @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Manage and administer a Neo4j DBMS (Database Management System). > See also: `cypher-shell`, `mysqld`. -> More information: . +> More information: . - Start the DBMS: diff --git a/tldr/osx/bclm b/tldr/osx/bclm index 0aff7fbe..78e0ec46 100644 --- a/tldr/osx/bclm +++ b/tldr/osx/bclm @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # bclm > Set a custom charge limit on MacBooks. -> More information: . +> More information: . - Set the charge limit to about 80% (for Intel machines, the battery charge level may be slightly lower than the set value): diff --git a/tldr/pamundice b/tldr/pamundice index 5b01f61f..a3a9ddf5 100644 --- a/tldr/pamundice +++ b/tldr/pamundice @@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git - Assume that the tiles overlap horizontally and vertically by the specified amount: -`pamundice {{filename_%1d_%1a.ppm}} {{[-a|-across]}} {{x_value}} {{[-d|-down]}} {{y_value}} {{[-h|-hoverlap]}} {{value}} {{[-vo|-voverlap]}} {{value}} > {{path/to/output.ppm}}` +`pamundice {{filename_%1d_%1a.ppm}} {{[-a|-across]}} {{x_value}} {{[-d|-down]}} {{y_value}} {{[-ho|-hoverlap]}} {{value}} {{[-vo|-voverlap]}} {{value}} > {{path/to/output.ppm}}` - Specify the images to be combined through a text file containing one filename per line: diff --git a/tldr/rlwrap b/tldr/rlwrap index 2e4da204..d5fbb6e5 100644 --- a/tldr/rlwrap +++ b/tldr/rlwrap @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # rlwrap > Add line editing, persistent history and prompt completion to a REPL command. -> More information: . +> More information: . - Run a REPL command with line editing, persistent history and prompt completion: @@ -14,16 +14,16 @@ source: https://github.com/tldr-pages/tldr.git - Use all words seen on input and output for prompt completion: -`rlwrap --remember {{command}}` +`rlwrap {{[-r|--remember]}} {{command}}` - Better prompt completion if prompts contain ANSI colour codes: -`rlwrap --ansi-colour-aware {{command}}` +`rlwrap {{[-A|--ansi-colour-aware]}} {{command}}` - Enable filename completion (case sensitive): -`rlwrap --complete-filenames {{command}}` +`rlwrap {{[-c|--complete-filenames]}} {{command}}` - Add coloured prompts, use colour name, or an ASCI-conformant colour specification. Use an uppercase colour name for bold styling: -`rlwrap --prompt-colour={{black|red|green|yellow|blue|cyan|purple|white|colour_spec}} {{command}}` +`rlwrap {{[-p|--prompt-colour=]}}{{black|red|green|yellow|blue|cyan|purple|white|colour_spec}} {{command}}` diff --git a/tldr/truncate b/tldr/truncate index 515adac6..e928104b 100644 --- a/tldr/truncate +++ b/tldr/truncate @@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git - Empty the file's content, but do not create the file if it does not exist: -`truncate {{[-c|--no-create]}} {{[-s|--size]}} 0 {{path/to/file}}` +`truncate {{[-cs|--no-create --size]}} 0 {{path/to/file}}` diff --git a/tldr/yapf b/tldr/yapf index 2ec2a8e5..19d1a569 100644 --- a/tldr/yapf +++ b/tldr/yapf @@ -12,10 +12,6 @@ source: https://github.com/tldr-pages/tldr.git `yapf {{[-d|--diff]}} {{path/to/file}}` -- Format the file in-place and display a diff of the changes: - -`yapf {{[-d|--diff]}} {{[-i|--in-place]}} {{path/to/file}}` - - Recursively format all Python files in a directory, concurrently: -`yapf {{[-r|--recursive]}} {{[-i|--in-place]}} --style {{pep8}} {{[-p|--parallel]}} {{path/to/directory}}` +`yapf {{[-ri|--recursive --in-place]}} --style {{pep8}} {{[-p|--parallel]}} {{path/to/directory}}`