-
Notifications
You must be signed in to change notification settings - Fork 48
/
Copy pathbrutemap.py
76 lines (56 loc) · 1.66 KB
/
brutemap.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
#!/usr/bin/env python
"""
Brutemap is (c) 2019 By Brutemap Development Team.
See LICENSE for details.
"""
from __future__ import print_function
try:
from warnings import filterwarnings
# nonaktifkan "warning" dari modul re
# reference: https://stackoverflow.com/questions/14463277/how-to-disable-python-warnings
filterwarnings("ignore", category=FutureWarning)
import sys
sys.dont_write_bytecode = True
from lib.path import setPath
setPath(__file__)
except:
errMsg = "[!] Unable to set base path ! (missing modules). "
errMsg += "See 'https://github.com/brutemap-dev/brutemap#installation' "
errMsg += "for installation instructions.\n"
exit(errMsg)
try:
from lib.controller.start import initialize
from lib.parse.cmdline import cmdLineParser
from lib.compat import raw_input
from lib.core import initOptions
from lib.core import printBanner
from lib.core import printStatus
from lib.core import stdoutWrite
from lib.exceptions import BrutemapQuitException
from lib.settings import IS_WINDOWS
except KeyboardInterrupt:
print()
exit("[!] Aborted...")
def main():
"""
Fungsi utama untuk menjalankan brutemap di terminal
"""
printBanner()
show_exit_msg = True
try:
initOptions(cmdLineParser())
printStatus()
initialize()
except SystemExit:
print()
show_exit_msg = False
except BrutemapQuitException:
pass
finally:
if show_exit_msg:
printStatus(start=False)
if IS_WINDOWS:
stdoutWrite("[#] Press any key to continue... ")
raw_input()
if __name__ == "__main__":
main()