-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimage.png
82 lines (61 loc) · 2.78 KB
/
image.png
File metadata and controls
82 lines (61 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
kydtsdfghkjl
headers3="GET /file.html HTTP/1.1\r\n"
headers3+=f"Host: {serverip}:{serverport}\r\n"
headers3+="Content-Type: text/html\r\n"
headers3+="User-Agent: Mozilla\r\n"
headers3+="Accept-Language: en-US\r\n"
headers3+="Accept-Encoding: */*\r\n"
headers3+="If-Modified-Since: Sun, 07 Nov 2020 12:00:00\r\n\r\n"
headers3 = bytes(headers3, "utf-8")
message3=headers3
headers.append(message3)
###################################################
fd7 = open("image.png", 'rb')
d2 = fd7.read()
fd7.close()
body9 = b'-----------------------------133100775917425215711097468907\r\nContent-Disposition: form-data; name="fname"\r\n\r\nJohn\r\n-----------------------------133100775917425215711097468907\r\nContent-Disposition: form-data; name="lname"\r\n\r\nDoe\r\n-----------------------------133100775917425215711097468907\r\nContent-Disposition: form-data; name="email"; filename="karan9bhat@gmail.com"\r\nContent-Type: text/html\r\n\r\n' + d2 + b'\r\n' + b'-----------------------------133100775917425215711097468907--\r\n'
l9 = len(body9)
headers38="POST /image.png HTTP/1.1\r\n"
headers38+=f"Host: {serverip}:{serverport}\r\n"
headers38+="Content-Type: multipart/form-data; boundry=-----------------------------133100775917425215711097468907\r\n"
headers38+="User-Agent: Mozilla\r\n"
headers38+="Accept-Language: en-US\r\n"
headers38+=f"Content-Length: {l1}\r\n"
headers38+="Accept-Charset: utf-8\r\n"
headers38+="Accept-Encoding: */*\r\n\r\n"
headers38 = bytes(headers38, "utf-8")
message38 = headers38+body9
headers.append(message38)
fd5 = open("postdata/111803052_Shubh_Gohil_CaseStudy_2&3.ods", 'rb')
body7 = fd5.read()
fd5.close()
l7 = len(body7)
headers28="PUT /111803052_Shubh_Gohil_CaseStudy_2&3.ods HTTP/1.1\r\n"
headers28+=f"Host: {serverip}:{serverport}\r\n"
headers28+="Content-Type: application/vnd.oasis.opendocument.spreadsheet\r\n"
headers28+=f"Content-length: {l7}\r\n"
headers28+="User-Agent: Mozilla\r\n"
headers28+="Accept-Language: en-US\r\n"
headers28+="Accept-Encoding: */*\r\n\r\n"
headers28 = bytes(headers28, "utf-8")
message28=headers28+body7
headers.append(message28)
##########################################
headers30="DELETE /test/t1.txt HTTP/1.1\r\n"
headers30+=f"Host: {serverip}:{serverport}\r\n"
headers30+="Content-Type: text/plain\r\n"
headers30+="User-Agent: Mozilla\r\n\r\n"
headers30 = bytes(headers30, "utf-8")
message30=headers30
headers.append(message30)
########################################
headers19="HEAD /image2.jpeg HTTP/1.1\r\n"
headers19+=f"Host: {serverip}:{serverport}\r\n"
headers19+="Content-Type: image/jpeg\r\n"
headers19+="User-Agent: Mozilla\r\n"
headers19+="Accept-Language: en-US\r\n"
headers19+="Accept-Encoding: */*\r\n\r\n"
headers19 = bytes(headers19, "utf-8")
message19=headers19
headers.append(message19)
###################################################