Merge branch 'master' of github.com:ImmortalPC/cheat into ImmortalPC-master

* 'master' of github.com:ImmortalPC/cheat:
  [GREP,NMAP,RM,WGET] Add new cheats
This commit is contained in:
Chris Lane 2014-10-18 18:41:32 -04:00
commit ed91f9fa37
4 changed files with 24 additions and 3 deletions

View File

@ -24,3 +24,6 @@ grep -rnw 'directory' -e "pattern"
# Exclude grep from your grepped output of ps.
# Add [] to the first letter. Ex: sshd -> [s]shd
ps aux | grep '[h]ttpd'
# Colour in red {bash} and keep all other lines
ps aux | grep -E --color 'bash|$'

View File

@ -23,13 +23,15 @@ nmap -source-port [port] [target]
nmap -A [target]
# Speedup your scan:
nmap -T5 --min-parallelism=50 [target]
# -n => disable ReverseDNS
# --min-rate=X => min 300 packets / sec
nmap -T5 --min-parallelism=50 -n --min-rate=300 [target]
# Traceroute:
nmap -traceroute [target]
# Ping scan only: -sP
# Don't ping: -PN
# Don't ping: -PN <- Use full if a host don't reply to a ping.
# TCP SYN ping: -PS
# TCP ACK ping: -PA
# UDP ping: -PU
@ -38,6 +40,9 @@ nmap -traceroute [target]
# Example: Ping scan all machines on a class C network
nmap -sP 192.168.0.0/24
# Force TCP scan: -sT
# Force UDP scan: -sU
# Use some script:
nmap --script default,safe
@ -55,3 +60,10 @@ nmap --script "default and safe"
# Loads scripts in the default, safe, or intrusive categories, except for those whose names start with http-.
nmap --script "(default or safe or intrusive) and not http-*"
# Scan for the heartbleed
# -pT:443 => Scan only port 443 with TCP (T:)
nmap -T5 --min-parallelism=50 -n --script "ssl-heartbleed" -pT:443 127.0.0.1
# Show all informations (debug mode)
nmap -d ...

View File

@ -1,5 +1,8 @@
# Remove files and subdirs
rm -rf path/to/the/target/
# Ignore non existent files
# Ignore non existent files
rm -f path/to/the/target
# Remove a file with his inode
find /tmp/ -inum 6666 -exec rm -i '{}' \;

View File

@ -30,3 +30,6 @@ wget -r -l1 -A.extension http://myserver.com/directory
# Allows you to download just the headers of responses (-S --spider) and display them on Stdout (-O -).
wget -S --spider -O - http://google.com
# Change the User-Agent to 'User-Agent: toto'
wget -U 'toto' http://google.com