Skip to content

Instantly share code, notes, and snippets.

@chriselgee
Created February 20, 2024 18:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chriselgee/f40930d86adf6b73834ef602a077558a to your computer and use it in GitHub Desktop.
Save chriselgee/f40930d86adf6b73834ef602a077558a to your computer and use it in GitHub Desktop.
Useful One-Liners
# Collect target subdomains from certificate transparency searches
curl -s 'https://crt.sh/?q=counterhack.com&output=json' | jq -r '.[].name_value' | sort -u
# Find a Linux executable named python3 in the /usr/ directory
find /usr -name python3 -exec file {} \; | grep ELF
# Loop over a set of numbers
for i in {1..255}; do sudo /usr/bin/ping -c1 192.168.1.$i; done
# Loop over lines in a file
while read f; do dig A $f +short; done < hosts.txt > ips.txt
# Loop over files in your directory
for f in *txt; do wc -l $f; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment