-
Notifications
You must be signed in to change notification settings - Fork 1
/
druscan.py
executable file
·57 lines (41 loc) · 1.1 KB
/
druscan.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
#!/usr/bin/env python
import signal
import sys
import core
from color import message
from core import signal_handler
from core import update
from core import search
from core import detect_version
from core import search_users
from core import search_urls
from ops import opsx
try:
signal.signal(signal.SIGINT, signal_handler)
o = opsx()
if o.update_modules:
update("modules", o.limit)
message("Update modules. Done.",core.M_UPDATE, "OK")
exit
elif o.update_themes:
update("themes", o.limit)
message("Update themes. Done." ,core.M_UPDATE,"OK")
exit
if o.url != None:
site_version = detect_version(o.url)
message("Posible version " + str(site_version),core.M_VERSION, "WARNING")
message("\t" + o.url + "/CHANGELOG.txt",core.M_FILE, "WARNING")
if o.modules:
search ( o.url, "modules" , version = site_version )
if o.themes:
search ( o.url, "themes" , version = site_version )
if o.users:
if o.limit != 3:
ulimit = o.limit
else:
ulimit = 20
search_users(o.url, ulimit)
if o.paths:
search_urls(o.url)
except ImportError:
print " "