-
Notifications
You must be signed in to change notification settings - Fork 3
/
paraglider.py
39 lines (34 loc) · 854 Bytes
/
paraglider.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
# paraglider.py
# by foulenzer
# import stuff
import warnings
import sys
import re
from functions import requestContent, parseContent
# ignore openSSL warnings
warnings.filterwarnings("ignore")
# prepare stuff
count = 0
body = ''
# Looks beatiful, no?
print('### paraglider.py - parameter discovery ###')
print('# Checking subject_list #')
# get subject
try:
subject_list = open(sys.argv[1], 'r').readlines()
except:
print('Sir, something is wrong with the subject argument. x(')
else:
for subject in subject_list:
print(subject.strip())
try:
content = requestContent('GET', 'https://' + subject.strip(), '')
except:
try:
content = requestContent('GET', 'http://' + subject.strip(), '')
except:
print('Sir, something is wrong with the domain parameter.')
else:
parseContent(content)
else:
parseContent(content)