โ˜ 
Handy cmds
Mounting NFS Shares
1
mkdir /tmp/foldername # Create a tmp folder
2
showmount -e IP #Show nfs shares at IP
3
mount -t nfs IP:/temp/foldername # Mount the share
4
df -hh | df -k # Check to see if share is shared
Copied!
SSH:
1
ssh-keygen #Generate a key
2
ssh-add key.pem #Add a key
3
ssh -i [email protected] #login with authorized key
Copied!
1
shuttle: sshuttle -r [email protected] IP #Open shuttle
2
vncviewer: vncviewer IP #Open vncviewer
Copied!
1
echo yourStatementHere | base64
2
echo eW91clN0YXRlbWVudEhlcmUK | base64 --decode
Copied!
1
#include <stdio.h>
2
#include <stdlib.h>
3
#include <sys/types.h>
4
int main() {
5
setuid(0);
6
system("/bin/sh");
7
return 0;
8
}
Copied!
Using API with BASH:
1
KEY_FILE="${XDG_CONFIG_HOME:-${HOME}/.config}/moo"
2
โ€‹
3
#check to see if the key loads properly and api was placed in the right spot
4
โ€‹
5
if [ -f "$KEY_FILE" ]; then
6
echo "$KEY_FILE loaded"
7
source "$KEY_FILE"
8
else
9
echo "No key file :(" && exit 1
10
fi
11
โ€‹
12
โ€‹
13
# jq to parse JSON files | tr -d to cut 'char' | sed to remove extra stuff | fold to wrap text
14
curl -s "https://api.shodan.io/shodan/host/$ip_addr?key=$SHODAN_API_KEY&query=all" | jq '.' | tr -d '"' | tr -d '_' | tr -d '{}' | tr -d ',' | sed 's/[][]//g'
15
curl -s "https://api.shodan.io/shodan/host/search?key=$SHODAN_API_KEY&query=all:$ip_addr" | jq '.' | tr -d '"' | tr -d '_' | tr -d '_' | tr -d '{}' | tr -d ','
16
curl -s "https://api.shodan.io/shodan/host/search?key=$SHODAN_API_KEY&query=all:$ip_addr"
Copied!
Copy link