forked from fcavallarin/htcap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
htcap.py
executable file
·53 lines (41 loc) · 1.08 KB
/
htcap.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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
HTCAP - beta 1
Author: [email protected]
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later
version.
"""
from __future__ import unicode_literals
import sys
import os
import datetime
import time
import getopt
from core.lib.utils import *
from core.crawl.crawler import Crawler
from core.scan.scanner import Scanner
reload(sys)
sys.setdefaultencoding('utf8')
def usage():
infos = get_program_infos()
print ("htcap ver " + infos['version'] + "\n"
"usage: htcap <command>\n"
"Commands: \n"
" crawl run crawler\n"
" scan run scanner\n"
)
if __name__ == '__main__':
if len(sys.argv) < 2:
usage()
sys.exit(1)
elif sys.argv[1] == "crawl":
Crawler(sys.argv[2:])
elif sys.argv[1] == "scan":
Scanner(sys.argv[2:])
else:
usage();
sys.exit(1)
sys.exit(0)