View difference between Paste ID: HMiJfdk1 and mNCwaGDh
SHOW: | | - or go back to the newest paste.
1
import socket, ssl
2
s = socket.socket()
3
wrappedSocket = ssl.wrap_socket(s)
4
wrappedSocket.connect(('127.0.0.1', 443))
5
wrappedSocket.sendall(
6
    'GET / HTTP/1.1\r\n'
7
    'Host: vulnerable\r\n'
8
    'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:38.0) Gecko/20100101  Firefox/38.0\r\n'
9
    'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n'
10
    'Accept-Language: en-US,en;q=0.5\r\n'
11
    'Accept-Encoding: gzip, deflate\r\n'
12
    'Connection: keep-alive\r\n'
13
    '\r\n'
14
15
)
16
ans = wrappedSocket.recv(4096)
17
print ans