Created
February 20, 2024 18:00
-
-
Save chriselgee/f40930d86adf6b73834ef602a077558a to your computer and use it in GitHub Desktop.
Useful One-Liners
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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