Skip to content

Instantly share code, notes, and snippets.

@htkcodes
Last active August 7, 2021 16:32
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save htkcodes/8661e92b8e15bd3a78460e48f46a9da9 to your computer and use it in GitHub Desktop.
Save htkcodes/8661e92b8e15bd3a78460e48f46a9da9 to your computer and use it in GitHub Desktop.
Useful scripts
#Grabs IP's from a file
grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' file.txt
#COMMA SEP IP
grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' ssl.txt | tr '\n' ',' | sed 's/.$//' - comma seperated ips
@htkcodes
Copy link
Author

grep -o '[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}' | tr '\n' ',' | sed 's/.$//' - comma seperated ips

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment