-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathskiptracer.py
78 lines (68 loc) · 2.25 KB
/
skiptracer.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
# -*- coding: utf-8 -*-
#!/usr/bin/env python
from __future__ import print_function
from plugins.menus import menus
from plugins.banner import Logo
import sys
import signal
try:
import __builtin__ as bi
except BaseException:
import builtins as bi
import ast
from plugins.colors import BodyColors as bc
def signal_handler(signal, frame):
print("")
sys.exit(0)
signal.signal(signal.SIGINT, signal_handler)
bi.search_string = None
bi.lookup = None
bi.output = None
bi.outdata = dict()
bi.webproxy = None
bi.proxy = None
bi.debug = False
Logo().banner()
if __name__ == "__main__": # If true, run main function of framework
try:
if str(bi.output).lower() == "y":
bi.filename = raw_input(
"[Please provide the filename for output? (somefile.txt|somefile.json)]: ")
def writeout():
import json
try:
pg.write_file(json.dumps(bi.outdata), bi.filename)
print((" [" +
bc.CRED +
"X" +
bc.CEND +
"] " +
bc.CYLW +
" Output written to disk: ./%s\n" +
bc.CEND) %
bi.filename)
except Exception as nowriteJSON:
if bi.debug:
print((" [" +
bc.CRED +
"X" +
bc.CEND +
"] " +
bc.CYLW +
"Output failed to write to disk %s\n" +
bc.CEND) %
nowriteJSON)
else:
print(
" [" +
bc.CRED +
"X" +
bc.CEND +
"] " +
bc.CYLW +
"Output failed to write to disk %s\n" +
bc.CEND)
menus().intromenu()
except Exception as failedmenu:
print("Failed menu: %s" % (failedmenu))
pass