From 68931b03899e794098000d58056f2dd5f5cef47a Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Sat, 2 Mar 2024 00:12:40 +0000 Subject: [PATCH] Update cheatsheets --- tldr/entr | 14 +++++++++++- tldr/linux/check-dfsg-status | 18 ++++++++++++++++ tldr/linux/opkg | 4 ---- tldr/linux/pwn | 41 ++++++++++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 tldr/linux/check-dfsg-status create mode 100644 tldr/linux/pwn diff --git a/tldr/entr b/tldr/entr index aedc1ba4..82860ec7 100644 --- a/tldr/entr +++ b/tldr/entr @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # entr > Run arbitrary commands when files change. -> More information: . +> More information: . - Rebuild with `make` if any file in any subdirectory changes: @@ -23,3 +23,15 @@ source: https://github.com/tldr-pages/tldr.git - Run a command with the changed file (`/_`) as an argument: `{{ls *.sql}} | entr {{psql -f}} /_` + +- [c]lear the screen and run a query after the SQL script is updated: + +`{{echo my.sql}} | entr -cp {{psql -f}} /_` + +- Rebuild the project if source files change, limiting output to the first few lines: + +`{{find src/}} | entr -s {{'make | sed 10q'}}` + +- Launch and auto-[r]eload a Node.js server: + +`{{ls *.js}} | entr -r {{node app.js}}` diff --git a/tldr/linux/check-dfsg-status b/tldr/linux/check-dfsg-status new file mode 100644 index 00000000..5587c0f9 --- /dev/null +++ b/tldr/linux/check-dfsg-status @@ -0,0 +1,18 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# check-dfsg-status + +> Report non-free packages installed on Debian-based OSes. +> This command was formerly known as `vrms`. +> More information: . + +- List non-free and contrib packages (and their description): + +`check-dfsg-status` + +- Only output the package names: + +`check-dfsg-status --sparse` diff --git a/tldr/linux/opkg b/tldr/linux/opkg index 292d6c94..c63723ab 100644 --- a/tldr/linux/opkg +++ b/tldr/linux/opkg @@ -20,10 +20,6 @@ source: https://github.com/tldr-pages/tldr.git `opkg update` -- Upgrade all the installed packages: - -`opkg upgrade` - - Upgrade one or more specific package(s): `opkg upgrade {{package(s)}}` diff --git a/tldr/linux/pwn b/tldr/linux/pwn new file mode 100644 index 00000000..ef710fa4 --- /dev/null +++ b/tldr/linux/pwn @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# pwn + +> Exploit Development Library designed for rapid prototyping. +> More information: . + +- Convert the given assembly code to `bytes`: + +`pwn asm "{{xor edi, edi}}"` + +- Create a cyclic pattern of the specific number of characters: + +`pwn cyclic {{number}}` + +- Encode the given data into the hexadecimal system: + +`pwn hex {{deafbeef}}` + +- Decode the given data from hexadecimal: + +`pwn unhex {{6c4f7645}}` + +- Print a x64 Linux shellcode for running a shell: + +`pwn shellcraft {{amd64.linux.sh}}` + +- Check the binary security settings for the given ELF file: + +`pwn checksec {{path/to/file}}` + +- Check for Pwntools updates: + +`pwn update` + +- Display version: + +`pwn version`