From 7ab64be0993780245dd884322ff61c145b03746f Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Fri, 12 Apr 2024 00:13:22 +0000 Subject: [PATCH] Update cheatsheets --- tldr/dnsx | 43 +++++++++++++++++++++++++++++++++++++++++++ tldr/llm | 8 ++++++-- tldr/ollama | 8 ++++++++ tldr/par2 | 25 +++++++++++++++++++++++++ 4 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 tldr/dnsx create mode 100644 tldr/par2 diff --git a/tldr/dnsx b/tldr/dnsx new file mode 100644 index 00000000..51b24cc8 --- /dev/null +++ b/tldr/dnsx @@ -0,0 +1,43 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# dnsx + +> A fast and multi-purpose DNS toolkit to run multiple DNS queries. +> Note: input to `dnsx` needs to be passed through `stdin` (pipe `|`) in some cases. +> See also: `dig`, `dog`, `dnstracer`. +> More information: . + +- Query the A record of a (sub)domain and show [re]sponse received: + +`echo {{example.com}} | dnsx -a -re` + +- Query all the DNS records (A,AAAA,CNAME,NS,TXT,SRV,PTR,MX,SOA,AXFR,CAA): + +`dnsx -recon -re <<< {{example.com}}` + +- Query a specific type of DNS record: + +`echo {{example.com}} | dnsx -re -{{a|aaaa|cname|ns|txt|srv|ptr|mx|soa|any|axfr|caa}}` + +- Output [r]esponse [o]nly (do not show the queried domain or subdomain): + +`echo {{example.com}} | dnsx -ro` + +- Display raw response of a query, specifying [r]esolvers to use and retry attempts for failures: + +`echo {{example.com}} | dnsx -{{debug|raw}} -resolver {{1.1.1.1,8.8.8.8,...}} -retry {{number}}` + +- Brute force DNS records using a placeholder: + +`dnsx -domain {{FUZZ.example.com}} -wordlist {{path/to/wordlist.txt}} -re` + +- Brute force DNS records from a list of [d]omains and wordlists, appending [o]utput to a file with [n]o [c]olor codes: + +`dnsx -domain {{path/to/domain.txt}} -wordlist {{path/to/wordlist.txt}} -re -output {{path/to/output.txt}} -no-color` + +- Extract `CNAME` records for the given list of subdomains, with [r]ate [l]imiting DNS queries per second: + +`subfinder -silent -d {{example.com}} | dnsx -cname -re -rl {{number}}` diff --git a/tldr/llm b/tldr/llm index d4f6c43f..451c74e5 100644 --- a/tldr/llm +++ b/tldr/llm @@ -28,6 +28,10 @@ source: https://github.com/tldr-pages/tldr.git `llm --model {{orca-mini-3b-gguf2-q4_0}} "{{What is the capital of France?}}"` -- Have an interactive chat with a specific [m]odel: +- Create a [s]ystem prompt and [s]ave it with a template name: -`llm chat --model {{chatgpt}}` +`llm --system '{{You are a sentient cheesecake}}' --save {{sentient_cheesecake}}` + +- Have an interactive chat with a specific [m]odel using a specific [t]emplate: + +`llm chat --model {{chatgpt}} --template {{sentient_cheesecake}}` diff --git a/tldr/ollama b/tldr/ollama index 2108bafb..e26bc4a4 100644 --- a/tldr/ollama +++ b/tldr/ollama @@ -24,6 +24,14 @@ source: https://github.com/tldr-pages/tldr.git `ollama list` +- Pull/Update a specific model: + +`ollama pull {{model}}` + +- Upgrade Ollama on Linux: + +`curl -fsSL https://ollama.com/install.sh | sh` + - Delete a model: `ollama rm {{model}}` diff --git a/tldr/par2 b/tldr/par2 new file mode 100644 index 00000000..5963b224 --- /dev/null +++ b/tldr/par2 @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# par2 + +> File verification and repair using PAR 2.0 compatible parity archives (.par2 files). +> More information: . + +- Create a parity archive with a set percentage level of redundancy: + +`par2 create -r{{1..100}} -- {{path/to/file}}` + +- Create a parity archive with a chosen number of volume files (in addition to the index file): + +`par2 create -n{{1..32768}} -- {{path/to/file}}` + +- Verify a file with a parity archive: + +`par2 verify -- {{path/to/file.par2}}` + +- Repair a file with a parity archive: + +`par2 repair -- {{path/to/file.par2}}`