-
Notifications
You must be signed in to change notification settings - Fork 216
Install introduction
if your environment is kali or ubuntu, you can directly run the environment.sh (remember add your mysql username and password in environment.sh file first and run with sudo) file in the "setup" directory, and ignore the following steps, However do remember to change your database's password both in
Scan-T/spidermanage/spidertool/config.py
Scan-T/spidermanage/spidermanage/settings.py
the Scan-T's default username and password is admin,admin.
if you are in China, you can just run file setup.sh (remember add your mysql username and password in setup.sh file first) which can install quickly
apt-get update
apt-get install -y nmap
apt-get install -y libjson-c-dev libjson-c2 libjson0 libjson0-dev
apt-get install -y redis-server zmap libffi-dev libssl-dev python-pip libmysqlclient-dev
apt-get install -y wget unzip
apt-get install mysql-server
apt-get install python-mysqldb
apt-get install mysql-client
apt-get -y install python-dev
wget https://github.com/nanshihui/Scan-T/archive/master.zip
unzip master.zip
cd Scan-T-master/
pip install MySQL-python
pip install BeautifulSoup==3.2.1
pip install beautifulsoup4==4.4.1
pip install Django==1.9
pip install python-nmap==0.5.0
pip install DBUtils==1.1
pip install paramiko==1.16.0
pip install ruamel.ordereddict==0.4.9
pip install scapy==2.3.2
pip install scapy-http==1.7
pip install objgraph==2.0.1
pip install pycrypto==2.6.1
pip install dozer
pip install faulthandler
pip install apscheduler
pip install gevent
pip install redis
pip install chardet
mysql -uroot -p -e 'create database datap'
change you sql password both in spidermanage/spidertool/config.py Scan-T/spidermanage/spidermanage/settings.py
mysql -uroot -p datap -e 'source /Scan-T-master/spidermanage/sqldata/Dump20160331.sql'
add your username and password in usertable
- PATH:/Scan-T-master/spidermanage/common_static/nmaptool/css/bootstrap/
create floder named lib and download css below
http://cine9deabril.com.br/fn/jquery/jquery-ui-1.10.2.custom/css/custom-theme/jquery-ui-1.10.2.custom.css
https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.css
mkdir spidermanage/lib/
touch spidermanage/lib/__init__.py
add the following code to spidermanage/lib/logger.py
#!/usr/bin/python
# encoding=utf-8
import logging
def initLog(logfile, level=2, verbose=False):
'''
日志记录函数,日志等级默认为2,即INFO级别的日志
verbose - 是否屏幕输出,默认False
'''
logLevel = logging.INFO
if level == 0:
logLevel = logging.NOTSET
elif level == 1:
logLevel = logging.DEBUG
elif level == 2:
logLevel = logging.INFO
elif level == 3:
logLevel = logging.WARNING
elif level == 4:
logLevel = logging.ERROR
elif level == 5:
logLevel = logging.CRITICAL
logger = logging.getLogger('pocdect')
console = logging.FileHandler(logfile)
formatter = logging.Formatter('[%(asctime)s]%(filename)s-%(process)d-%(thread)d-%(lineno)d-%(levelname)8s-"%(message)s"','%Y-%m-%d %a %H:%M:%S')
console.setFormatter(formatter)
logger.addHandler(console)
logger.setLevel(logLevel)
if verbose:
console = logging.StreamHandler()
console.setLevel(logLevel) # always debug mode to screen
formatter = logging.Formatter('%(name)-8s: %(levelname)-8s %(message)s')
console.setFormatter(formatter)
logger.addHandler(console)
return logger
python spidermanage/manage.py runserver 0.0.0.0:80 --insecure