diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 8042bfd..24cb746 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -3,7 +3,9 @@ + + @@ -73,7 +75,7 @@ - + @@ -83,90 +85,30 @@ - - + + - - - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - - - - - - - - - - - - + + - - + + @@ -190,7 +132,6 @@ @@ -251,8 +193,8 @@ DEFINITION_ORDER - @@ -327,7 +269,7 @@ - + - + - + @@ -791,13 +741,6 @@ - - - - - - - @@ -1008,13 +951,6 @@ - - - - - - - @@ -1069,9 +1005,6 @@ - - - @@ -1079,31 +1012,41 @@ - - + - - - + + - + - - - + + - + - - - + + + + + + + + + + + + + + + + @@ -1111,48 +1054,46 @@ - - + - - - - - + + - + - - + + - + - - + + - + - - - + + + + + - - + + diff --git a/setup/environment.sh b/setup/environment.sh index 1ca6107..acd227a 100644 --- a/setup/environment.sh +++ b/setup/environment.sh @@ -9,7 +9,7 @@ apt-get install -y redis-server zmap libffi-dev libssl-dev python-pip libmysqlcl apt-get install -y wget unzip apt-get install mysql-server -apt-get isntall mysql-client +apt-get install mysql-client apt-get install libmysqlclient-dev apt-get -y install python-dev @@ -19,7 +19,7 @@ apt-get install python-mysqldb pip install BeautifulSoup==3.2.1 pip install beautifulsoup4==4.4.1 pip install Django==1.9 -pip install python-nmap==0.5.0.post1 +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 @@ -31,6 +31,7 @@ pip install dozer pip install faulthandler pip install apscheduler pip install gevent +pip install redis @@ -58,7 +59,7 @@ mysql_plugin_file='/usr/lib/mysql/plugin/mysqlcft.so' - +service mysql start ####cp SO file to mysql plugin root path result=$(cp $mysqlcftpath $mysql_plugin_file) @@ -66,6 +67,10 @@ result=$(cp $mysqlcftpath $mysql_plugin_file) initpluginsql='Install plugin mysqlcft soname "mysqlcft.so"' + + + + ####init SO file result=$(mysql -uroot -s -e "${initpluginsql}") #create database diff --git a/spidermanage/fontsearch/searchroute.py b/spidermanage/fontsearch/searchroute.py index 022f3b1..0fb4ef6 100644 --- a/spidermanage/fontsearch/searchroute.py +++ b/spidermanage/fontsearch/searchroute.py @@ -108,7 +108,7 @@ def detailpage(request): except Exception,e: print e try: - extra = ' where match(version,product,head,script,hackinfo,disclosure,keywords,name,webkeywords,webtitle,webencode) against(\'' + content + '\' in Boolean mode) ' + extra = ' where match(version,product,head,detail,script,hackinfo,disclosure,keywords,name,webkeywords,webtitle) against(\'' + content + '\' in Boolean mode) ' ports,portcount,portpagecount=portcontrol.portabstractshow(page=page,extra=extra,command='or') # ports, portcount, portpagecount = getattr(portcontrol, 'portabstractshow', 'portabstractshow')(**jsoncontent) response_data['ports'] = ports diff --git a/spidermanage/view/fontsearchview/searchdetail.html b/spidermanage/view/fontsearchview/searchdetail.html index e3daef5..b3c9b81 100644 --- a/spidermanage/view/fontsearchview/searchdetail.html +++ b/spidermanage/view/fontsearchview/searchdetail.html @@ -333,7 +333,7 @@

关于 Scan-T

"

端口名:" + (ports[i].name == null ? '' : ports[i].name) + "

" + "

端口产品:" + (ports[i].product == null ? '' : ports[i].product) + "

" + "

端口版本:" + (ports[i].version == null ? '' : ports[i].version) + "

" + - "

主机位置: " + " "+ (ports[i].city == null || ports[i].city =='' ? ports[i].keywords['geoip']['country']['name'] : ports[i].city)+" "+ports[i].keywords['geoip']['city']['name']+" "+"

" + + "

主机位置: " + " "+ ((ports[i].city == null || ports[i].city =='' )&&ports[i].keywords['geoip']? ports[i].keywords['geoip']['country']['name'] : ports[i].city)+" "+(ports[i].keywords['geoip']?ports[i].keywords['geoip']['city']['name']:"unknow")+" "+"

" + "更新时间:" + (ports[i].timesearch == null ? '' : ports[i].timesearch) + "

" +