-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathhtcap.py
More file actions
61 lines (49 loc) · 1.25 KB
/
htcap.py
File metadata and controls
61 lines (49 loc) · 1.25 KB
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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
HTCAP - beta 1
Author: filippo.cavallarin@wearesegment.com
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.util.util import Util
reload(sys)
sys.setdefaultencoding('utf8')
log = "*"*53
log += """
* / _ \| _ \ / \\ \ / / ___/ ___| ___ __ _| \ | | *
*| | | | | | |/ _ \\ V /|___ \___ \ / __/ _` | \| | *
*| |_| | |_| / ___ \| | ___) |__) | (_| (_| | |\ |*
* \___/|____/_/ \_\_| |____/____/ \___\__,_|_| \_|*
"""
log += "*"*53
print log
def usage():
print (
"usage: htcap <command>\n"
"Commands: \n"
" crawl run crawler\n"
" util run utility\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] == "util":
Util(sys.argv[2:])
else:
usage();
sys.exit(1)
sys.exit(0)