Jump to content

OneLiners

From YawgNetWiki

Just a quick Reference for "One-Liner"s that I find very useful

What's my IP

[edit]
  • Basic
   curl https://icanhazip.com
  • IPv4
   curl https://ipv4.icanhazip.com/
  • IPv6
   curl https://ipv6.icanhazip.com/

Download Imgur Album

[edit]
   wget -q "http://imgur.com/a/(UniqueIDhere)" -O - | grep name | cut -d\" -f2| while read id;do echo "Downloading $id.jpg";wget -q -c "http://i.imgur.com/$id.jpg";done

GZip Log Folder

[edit]
   for i in *; do tar --remove-files -czf $i.gz $i ; done

Remote Windows Shutdown

[edit]
   net rpc shutdown -I IPADDRESS -U USERNAME%PASSWORD

Sed

[edit]

Add space ever #

[edit]
  • this will add a space every third character
   cat file | sed 's/.\{3\}/& /g'

Loops

[edit]
   for i in $(cat list4); do echo Trying$i && sudo ./TACOTH $i; done > results