From 3c7ac5af5bee613964b527297f2b11347cd7da0c Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Sun, 30 Mar 2025 00:20:28 +0000 Subject: [PATCH] Update cheatsheets --- tldr/brew-services | 33 +++++++++++++++++++++++++++++++++ tldr/brew-update | 2 +- tldr/brew-upgrade | 2 +- tldr/zmap | 41 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 tldr/brew-services create mode 100644 tldr/zmap diff --git a/tldr/brew-services b/tldr/brew-services new file mode 100644 index 00000000..75d19cdd --- /dev/null +++ b/tldr/brew-services @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# brew services + +> Manage background services with `launchctl` on macOS or `systemctl` on Linux. +> More information: . + +- List all managed services for the current user: + +`brew services` + +- List more information about all managed services: + +`brew services info --all` + +- Start a service immediately and register it to launch at login (or boot): + +`brew services start {{formula}}` + +- Stop the service immediately and unregister it from launching at login (or boot): + +`brew services stop {{formula}}` + +- Stop (if necessary) and start the service immediately and register it to launch at login (or boot): + +`brew services restart {{formula}}` + +- Remove all unused services: + +`brew services cleanup` diff --git a/tldr/brew-update b/tldr/brew-update index d637bf28..0df3a07b 100644 --- a/tldr/brew-update +++ b/tldr/brew-update @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Fetch the newest version of Homebrew and all formulae from GitHub using `git` and perform any necessary migrations. > To upgrade all installed formulae, use `brew upgrade`. -> More information: . +> More information: . - Fetch the newest version of Homebrew and all formulae: diff --git a/tldr/brew-upgrade b/tldr/brew-upgrade index 942b44be..d9b89795 100644 --- a/tldr/brew-upgrade +++ b/tldr/brew-upgrade @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # brew upgrade > Upgrade outdated formulae and casks. -> More information: . +> More information: . - Upgrade all outdated casks and formulae: diff --git a/tldr/zmap b/tldr/zmap new file mode 100644 index 00000000..61c66390 --- /dev/null +++ b/tldr/zmap @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# zmap + +> Fast, open-source network scanner for Internet-wide surveys. +> More information: . + +- Scan a subnet or full IPv4 space for a specific TCP port (default: 80): + +`zmap {{SUBNETS}} -p {{port}}` + +- Scan specific ports or port ranges across a subnet: + +`zmap {{--target-ports}} {{port1,port2-port3,...}} {{SUBNETS}}` + +- Output results to a CSV file with custom fields: + +`zmap {{[-o|--output-file]}} {{path/to/output_file.csv}} {{[-f|--output-fields]}} "{{saddr,daddr,sport,dport}}" {{SUBNETS}}` + +- Limit the scan rate to a specific number of packets per second: + +`zmap {{[-r|--rate]}} {{packets_per_second}} {{SUBNETS}}` + +- Perform a dry run without sending packets: + +`zmap {{[-d|--dryrun]}} {{SUBNETS}}` + +- Exclude subnets using a blocklist file in CIDR notation: + +`zmap {{[-b|--blocklist-file]}} {{path/to/blocklist.txt}} {{SUBNETS}}` + +- Set a specific source IP for scan packets: + +`zmap {{[-S|--source-ip]}} {{source_ip}} {{SUBNETS}}` + +- Cap the number/percentage of targets to probe (e.g. 1000 IP/port pairs): + +`zmap {{[-n|--max-targets]}} {{1000}} {{SUBNETS}} {{[-p|--target-ports]}} {{port1,port2-port3}}`