Skip to content

Instantly share code, notes, and snippets.

View rhovelz's full-sized avatar
:octocat:
hm?

R rhovelz

:octocat:
hm?
View GitHub Profile

Red username@hostname

  • sudo apt-get update
  • sudo apt-get install kali-root-login
  • sudo cp -f /home/kali/.bashrc /root
  • sudo passwd root
  • reboot

Reminders

Remember to log all the things!

  • Metasploit - spool /home//.msf3/logs/console.log
  • Save contents from each terminal!
  • Linux - script myoutput.txt # Type exit to stop

Setup

docker build -t friendlyname . # Create image using this directory's Dockerfile
docker run -p 4000:80 friendlyname # Run "friendlyname" mapping port 4000 to 80
docker run -d -p 4000:80 friendlyname # Same thing, but in detached mode
docker exec -it [container-id] bash # Enter a running container
docker ps # See a list of all running containers
docker stop <hash> # Gracefully stop the specified container
docker ps -a # See a list of all containers, even the ones not running
docker kill <hash> # Force shutdown of the specified container
docker rm <hash> # Remove the specified container from this machine
docker rm $(docker ps -a -q) # Remove all containers from this machine
  • XML GET
curl -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET "http://hostname/resource"
  • JSON GET
curl -i -H "Accept: application/json" -H "Content-Type: application/json" -X GET "http://hostname/resource"
  • JSON PUT
# POST a JSON file and redirect output to stdout
wget -q -O - --header="Content-Type:application/json" --post-file=foo.json http://127.0.0.1
# Download a complete website
wget -m -r -linf -k -p -q -E -e robots=off http://127.0.0.1
# But it may be sufficient
wget -mpk http://127.0.0.1
# Download all images of a website
/set weechat.look.prefix_suffix "-->"
/set weechat.look.prefix_suffix "-->"

##Weechat's conf

  • /key bind meta-Z /bar toggle buflist
  • /key bind meta-X /bar toggle nicklist

##Powerline nickname on weechat

/trigger add plsymbol_nick modifier weechat_print /trigger set plsymbol_nick conditions "${tg_tags} =~ ,irc_privmsg," /trigger set plsymbol_nick regex "/.*/${color:black,${info:nick_color_name,${tg_prefix_nocolor}}}${tg_prefix_nocolor} ${color:reverse} ${color:reset}${tg_message}/"

/set irc.server.freenode.autojoin #freenode,#weechat,##linux,#archlinux,#archlinux-offtopic,##security,#kalilinux,#offsec,#hackerspaces,#bash,#python,#django,##javascript,#nodejs