Open sadk opened 8 years ago
使用 python spidermanage/manage.py runserver localhost:80 运行后出现如下错误:
Performing system checks...
Unhandled exception in thread started by <function wrapper at 0x7f98ed8368c0>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 116, in inner_run
self.check(display_num_errors=True)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 426, in check
include_deployment_checks=include_deployment_checks,
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/registry.py", line 75, in run_checks
new_errors = check(app_configs=app_configs)
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 10, in check_url_config
return check_resolver(resolver)
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 19, in check_resolver
for pattern in resolver.url_patterns:
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 33, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 417, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 33, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 410, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/toolforspider-master/spidermanage/spidermanage/urls.py", line 23, in <module>
url(r'^nmaptool/', include('nmaptoolbackground.urls',namespace='nmaptool')),
File "/usr/local/lib/python2.7/dist-packages/django/conf/urls/__init__.py", line 52, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/toolforspider-master/spidermanage/nmaptoolbackground/urls.py", line 5, in <module>
from . import nmaproute as route
File "/toolforspider-master/spidermanage/nmaptoolbackground/nmaproute.py", line 8, in <module>
from control import usercontrol,jobcontrol,ipcontrol,portcontrol,taskcontrol
File "/toolforspider-master/spidermanage/nmaptoolbackground/control/taskcontrol.py", line 3, in <module>
from spidertool import sniffertask,scapytask
File "/toolforspider-master/spidermanage/spidertool/sniffertask.py", line 8, in <module>
import sniffertool
File "/toolforspider-master/spidermanage/spidertool/sniffertool.py", line 20, in <module>
import portscantask
File "/toolforspider-master/spidermanage/spidertool/portscantask.py", line 7, in <module>
import portscantool
File "/toolforspider-master/spidermanage/spidertool/portscantool.py", line 11, in <module>
from template_identify import port_identify
File "/toolforspider-master/spidermanage/spidertool/template_identify/port_identify.py", line 5, in <module>
from poc_file import pocsearchtask
File "/toolforspider-master/spidermanage/spidertool/template_identify/poc_file/__init__.py", line 6, in <module>
from lib.logger import initLog
ImportError: No module named lib.logger
临时解决办法
mkdir spidermanage/lib/
touch spidermanage/lib/__init__.py
在 spidermanage/lib/ 中新建 logger.py 内容如下
def initLog(a,b,c):
pass
继续尝试运行,依然报错:
Performing system checks...
WARNING: Failed to execute tcpdump. Check it is installed and in the PATH
WARNING: No route found for IPv6 destination :: (no default route?)
Unhandled exception in thread started by <function wrapper at 0x7f0df1bd38c0>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 116, in inner_run
self.check(display_num_errors=True)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 426, in check
include_deployment_checks=include_deployment_checks,
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/registry.py", line 75, in run_checks
new_errors = check(app_configs=app_configs)
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 10, in check_url_config
return check_resolver(resolver)
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 19, in check_resolver
for pattern in resolver.url_patterns:
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 33, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 417, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 33, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 410, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/toolforspider-master/spidermanage/spidermanage/urls.py", line 23, in <module>
url(r'^nmaptool/', include('nmaptoolbackground.urls',namespace='nmaptool')),
File "/usr/local/lib/python2.7/dist-packages/django/conf/urls/__init__.py", line 52, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/toolforspider-master/spidermanage/nmaptoolbackground/urls.py", line 5, in <module>
from . import nmaproute as route
File "/toolforspider-master/spidermanage/nmaptoolbackground/nmaproute.py", line 8, in <module>
from control import usercontrol,jobcontrol,ipcontrol,portcontrol,taskcontrol
File "/toolforspider-master/spidermanage/nmaptoolbackground/control/taskcontrol.py", line 4, in <module>
import schedule
File "/toolforspider-master/spidermanage/nmaptoolbackground/control/schedule.py", line 3, in <module>
from apscheduler.schedulers.background import BackgroundScheduler
ImportError: No module named apscheduler.schedulers.background
临时解决办法
pip install apscheduler
继续运行,报错
May 27, 2016 - 13:03:45
Django version 1.9, using settings 'spidermanage.settings'
Starting development server at http://localhost:80/
Quit the server with CONTROL-C.
Unhandled exception in thread started by <function wrapper at 0x7fb197d5e668>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 226, in wrapper
fn(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 135, in inner_run
handler = self.get_handler(*args, **options)
File "/usr/local/lib/python2.7/dist-packages/django/contrib/staticfiles/management/commands/runserver.py", line 23, in get_handler
handler = super(Command, self).get_handler(*args, **options)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 60, in get_handler
return get_internal_wsgi_application()
File "/usr/local/lib/python2.7/dist-packages/django/core/servers/basehttp.py", line 57, in get_internal_wsgi_application
sys.exc_info()[2])
File "/usr/local/lib/python2.7/dist-packages/django/core/servers/basehttp.py", line 47, in get_internal_wsgi_application
return import_string(app_path)
File "/usr/local/lib/python2.7/dist-packages/django/utils/module_loading.py", line 20, in import_string
module = import_module(module_path)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/toolforspider-master/spidermanage/spidermanage/wsgi.py", line 17, in <module>
from dozer import Dozer,Logview
django.core.exceptions.ImproperlyConfigured: WSGI application 'spidermanage.wsgi.application' could not be loaded; Error importing module: 'No module named dozer'
解决办法 pip install dozer pip install faulthandler
已更新到wik 谢谢。
lucy@lucy:~/123/toolforspider$ python spidermanage/manage.py migrate
Traceback (most recent call last):
File "spidermanage/manage.py", line 10, in
你是SQL密码 没改好 django 有个默认数据库配置文件
lucy@lucy:~/toolforspider$ python spidermanage/manage.py migrate
WARNING: No route found for IPv6 destination :: (no default route?)
Traceback (most recent call last):
File "spidermanage/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 350, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/__init__.py", line 342, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 348, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 398, in execute
self.check()
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 426, in check
include_deployment_checks=include_deployment_checks,
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/registry.py", line 75, in run_checks
new_errors = check(app_configs=app_configs)
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 10, in check_url_config
return check_resolver(resolver)
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 19, in check_resolver
for pattern in resolver.url_patterns:
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 33, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 417, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 33, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 410, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/lucy/toolforspider/spidermanage/spidermanage/urls.py", line 23, in <module>
url(r'^nmaptool/', include('nmaptoolbackground.urls',namespace='nmaptool')),
File "/usr/local/lib/python2.7/dist-packages/django/conf/urls/__init__.py", line 52, in include
urlconf_module = import_module(urlconf_module)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/lucy/toolforspider/spidermanage/nmaptoolbackground/urls.py", line 5, in <module>
from . import nmaproute as route
File "/home/lucy/toolforspider/spidermanage/nmaptoolbackground/nmaproute.py", line 8, in <module>
from control import usercontrol,jobcontrol,ipcontrol,portcontrol,taskcontrol
File "/home/lucy/toolforspider/spidermanage/nmaptoolbackground/control/taskcontrol.py", line 4, in <module>
import schedule
File "/home/lucy/toolforspider/spidermanage/nmaptoolbackground/control/schedule.py", line 3, in <module>
from apscheduler.schedulers.background import BackgroundScheduler
File "/usr/local/lib/python2.7/dist-packages/apscheduler/__init__.py", line 3, in <module>
version_info = tuple(int(x) if x.isdigit() else x for x in parsed_version.public.split('.'))
AttributeError: 'tuple' object has no attribute 'public'
lucy@lucy:~/toolforspider$
Before you run it ,you have to make sure that all the environment you have already installed , then you can follow my wiki introduction step by step.
折腾了俩三个小时还是没安装成功,唉,好郁闷啊
1.toolforspider/spidermanage/spidermanage/settings.py~要在这里添加数据库信息,这一步是不是没写啊 2.登录的时候返回django的debug页面说没有/toolforspider/spidermanage/logs/sqltool.log这个文件,新建一个就好了
谢谢 已补充
WARNING: No route found for IPv6 destination :: (no default route?)
Traceback (most recent call last):
File "spidermanage/manage.py", line 10, in
这个问题 好像没遇见过,可能是插件的版本。 如果可以的话建议 还是参考wiki 上面的说明进行安装
静态文件全部404,报这个WARNINGS: ?: (18.W001) The standalone TEMPLATE* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS. 请问怎么解决啊?
如果只是出现这句话 (18.W001) The standalone TEMPLATE* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS. 那是没有什么问题的。
如果静态文件全是404,请按wiki的安装方式来。
3q,我试试wiki
静态文件全部404我的解决方法:
1.在Scan-T-master\spidermanage\spidermanage\urls.py里面添加一条路由:
url(r'^static/(?P
然后成功~
@xiaoxiaoleo url.py 有三个,你可能需要明确的描述方式,避免误导
我和@xiaoxiaoleo 一样python spidermanage/manage.py runserver 0.0.0.0:80后 也出现了 WARNINGS: ?: (18.W001) The standalone TEMPLATE* settings were deprecated in Django 1.8 and the TEMPLATES dictionary takes precedence. You must put the values of the following settings into your default TEMPLATES dict: TEMPLATE_DIRS.
System check identified 1 issue (0 silenced). June 17, 2016 - 12:18:17 Django version 1.9, using settings 'spidermanage.settings' Starting development server at http://0.0.0.0:80/ Quit the server with CONTROL-C. WARNING:py.warnings:/usr/local/lib/python2.7/dist-packages/dozer/leak.py:97: UserWarning: PIL is not installed, cannot show charts in Dozer warnings.warn('PIL is not installed, cannot show charts in Dozer')
init schedule
取消后出现 @ip-172-31-28-150:~/Scan-T-master# Exception in thread APScheduler (most likely raised during interpreter shutdown): Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner File "/usr/lib/python2.7/threading.py", line 763, in run File "/usr/local/lib/python2.7/dist-packages/apscheduler/schedulers/blocking.py", line 28, in _main_loop File "/usr/lib/python2.7/threading.py", line 620, in wait File "/usr/lib/python2.7/threading.py", line 354, in wait <type 'exceptions.TypeError'>: 'NoneType' object is not callable
用了@xiaoxiaoleo的解决方法,python spidermanage/manage.py runserver 0.0.0.0:80后出现
root@ip-172-31-28-150:~/Scan-T-master# python spidermanage/manage.py runserver 0.0.0.0:80 --insecure Performing system checks...
WARNING: No route found for IPv6 destination :: (no default route?) WARNING:py.warnings:/root/Scan-T-master/spidermanage/spidermanage/urls.py:27: RemovedInDjango110Warning: Support for string view arguments to url() is deprecated and will be removed in Django 1.10 (got django.views.static.serve). Pass the callable instead. url(r'^static/(?P.*)$', 'django.views.static.serve',{'document_root': "common_static"}),
Unhandled exception in thread started by <function wrapper at 0x7f73a894eb18> Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 226, in wrapper fn(_args, _kwargs) File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 116, in inner_run self.check(display_num_errors=True) File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 426, in check include_deployment_checks=include_deployment_checks, File "/usr/local/lib/python2.7/dist-packages/django/core/checks/registry.py", line 75, in run_checks new_errors = check(app_configs=app_configs) File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 10, in check_url_config return check_resolver(resolver) File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 27, in check_resolver warnings.extend(check_pattern_startswith_slash(pattern)) File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 63, in check_pattern_startswith_slash regex_pattern = pattern.regex.pattern File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 203, in regex (regex, six.text_type(e))) django.core.exceptions.ImproperlyConfigured: "^static/(?P.)$" is not a valid regular expression: unknown specifier: ?P.
还有系统可能需要安装gevent For Python 具体方法 下载gevent源码,并解压 wget http://pypi.python.org/packages/source/g/gevent/gevent-0.13.1.tar.gz#md5=5c1b03d9ce39fee4cfe5ea8befb1d4c4 tar -zxvf gevent-0.13.1.tar.gz 安装编译 cd gevent-0.13.1 python fetch_libevent.py python setup.py build sudo python setup.py install
@iwarsong 我的解决方法不是完美的处理静态文件404的方案,http://127.0.0.1:8000/admin目录由于调用django自带的静态文件导致静态文件仍然是404。我的django版本是1.9。
@iwarsong 执行时候加一个--insecure试试。 python manage.py runserver --insecure
@iwarsong @xiaoxiaoleo django 默认在set debug 标签为false 的时候,静态路由 是交给 负载均衡器 来做的,你可以加一个nginx对静态文件路由,或者按着我的wiki 上的说明
还有是否还得安装PIL~ 下载PIL的Source Kit(因为这个包支持全部平台) Imaging--1.1.7.tar.gz URL: http://www.pythonware.com/products/pil/index.htm
2、解压缩包 tar -zxvf Imaging-1.1.7.tar.gz
3、进入到解压后的目录 cd Imaging-1.1.7 4、Build pakage: python setup.py build_ext -i
5、测试; python selftest.py
6、安装 python setup.py install
mysql一共三处地址需要配置: Scan-T-master\Scan-T-master\spidermanage\spidertool\config.py Scan-T-master\Scan-T-master\spidermanage\spidermanage\settings.py Scan-T-master\Scan-T-master\spidermanage\spidertool\scapytool.py
@nanshihui
@iwarsong @xiaoxiaoleo django 默认在set debug 标签为false 的时候,静态路由 是交给 负载均衡器 来做的,你可以加一个nginx对静态文件路由,或者按着我的wiki 上的说明
这方面我不是很懂~能否给个过程~thx~
请按wiki的操作安装
spidermanage/manage.py runserver 0.0.0.0:80 insecure Performing system checks...
Unhandled exception in thread started by <function wrapper at 0x7fa1475da758>
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 226, in wrapper
fn(_args, *_kwargs)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 116, in inner_run
self.check(display_num_errors=True)
File "/usr/local/lib/python2.7/dist-packages/django/core/management/base.py", line 426, in check
include_deployment_checks=include_deployment_checks,
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/registry.py", line 75, in run_checks
new_errors = check(app_configs=app_configs)
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 10, in check_url_config
return check_resolver(resolver)
File "/usr/local/lib/python2.7/dist-packages/django/core/checks/urls.py", line 19, in check_resolver
for pattern in resolver.url_patterns:
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 33, in get
res = instance.dict[self.name] = self.func(instance)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 417, in url_patterns
patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 33, in get
res = instance.dict[self.name] = self.func(instance)
File "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line 410, in urlconf_module
return import_module(self.urlconf_name)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/root/Scan-T-master/spidermanage/spidermanage/urls.py", line 23, in
求解
把portscantool.py 第11行的from detection import port_identify 移到26行后面, 如果觉得麻烦的话,你可以不用修改 ,我晚些时候更新.
谢谢。。可是,进去后访问后台总是500怎么办,也不显示详细信息。真心头疼
可能是你安装不完整
后台GET没问题,一提交数据就500.。 ERROR:django.request:Internal Server Error: /nmaptool/login/ Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 149, in get_response response = self.process_exception_by_middleware(e, request) File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 147, in get_response response = wrapped_callback(request, _callback_args, *_callback_kwargs) File "/root/Scan-T-master/spidermanage/nmaptoolbackground/nmaproute.py", line 160, in login result,username,role,power= usercontrol.validuser(username,password) File "/root/Scan-T-master/spidermanage/nmaptoolbackground/control/usercontrol.py", line 8, in validuser DBhelp=SQLTool.DBmanager() File "/root/Scan-T-master/spidermanage/spidertool/SQLTool.py", line 45, in init self.logger = initLog('logs/sqltool.log', 2, True,'sqltool') File "/root/Scan-T-master/spidermanage/spidertool/logger.py", line 26, in initLog console = logging.FileHandler(logfile) File "/usr/lib/python2.7/logging/init.py", line 913, in init StreamHandler.init(self, self._open()) File "/usr/lib/python2.7/logging/init.py", line 943, in _open stream = open(self.baseFilename, self.mode) IOError: [Errno 2] No such file or directory: '/root/Scan-T-master/logs/sqltool.log' [28/Jul/2016 10:12:51] "POST /nmaptool/login/ HTTP/1.1" 500
帮忙看一下,谢谢
Scan-T-master/logs/sqltool.log 建一个这个文件就好了
总算解决了,谢谢~~
mysqlcft没有被定义: mysql -uroot -p datap -e 'source spidermanage/sqldata/Dump20160803.sql'
ERROR 1128 (HY000) at line 285 in file: 'spidermanage/sqldata/Dump20160803.sql': Function 'mysqlcft' is not defined
你需要安装mysqlcft.so 模块。将其安装在mysql里
database has benn closed [22/Jan/2017 22:28:47] "POST /nmaptool/taskdetail/eachtask/ HTTP/1.1" 200 1081 [22/Jan/2017 22:28:56] "GET /static/fontsearch/js/ZeroClipboard.swf?noCache=1485095406399 HTTP/1.1" 200 1071 [22/Jan/2017 22:28:58] "GET /search/searchmain/?page=0&searchcontent=104.143.40.245 HTTP/1.1" 200 19401 WARNING:django.request:Not Found: /static/img/bgs/landscape.jpg [22/Jan/2017 22:28:58] "GET /static/img/bgs/landscape.jpg HTTP/1.1" 200 819 [22/Jan/2017 22:28:58] "GET /static/fontsearch/js/ZeroClipboard.swf?noCache=1485095408171 HTTP/1.1" 200 1071 104.143.40.245 Expecting property name enclosed in double quotes: line 1 column 2 (char 1) 存在内容,进入elasticsearch 检索 No module named elasticsearch_dsl.query success connet select count(*) from snifferdata left join ip_maindata on snifferdata.ip=ip_maindata.ip where match(version,product,head,detail,script,hackinfo,disclosure,keywords,name,webkeywords,webtitle) against('104.143.40.245' in Boolean mode) 检索完毕 [22/Jan/2017 22:28:58] "POST /search/searchdetail/ HTTP/1.1" 200 138
启动是在^Croot@instance-64iza5vs:~/Scan-T-master/spidermanage# pwd /root/Scan-T-master/spidermanage 求解 最近也在看django能否留个联系方式交流交流
@cuijianxiong 看这个结果,暂时没发现异常,页面没显示结果?
是啊 No module named elasticsearch_dsl.query不是报错吗 后台数据都有了 前台没结果
No module named elasticsearch_dsl.query 这个没事,如果 你装了es 模块,他会适配上去,不装也没事。 你使用的代码 是 这里的https://github.com/nanshihui/Scan-T/releases?
用的你github博客上的 https://github.com/nanshihui/Scan-T/archive/master.zip这个
要不留个联系方式 我把服务器账户密码给你?
试试 搜索框输入 "ip":"104.143.40.245" 如果有结果, 搜索框 输入 这条数据的其他关键词 看看 有没有结果
这样搜索有结果请问是哪里的问题
@cuijianxiong 如果你不输入 引号 输入其他 关键词 也有结果, 说明是搜索权重问题。 等你数据变多的时候, 你原来的输入 就会有你要的结果了。
嗯嗯 还有详细信息{}{错误码为: 'module' object has no attribute '_create_unverified_context'}是正确的吧==
@cuijianxiong 这个没事,最好运行环境在python2.7的最新版,有些模块对2.6 或者之前的版本 不友好。
好的 太感谢了
根据安装教程是按不上的,教程改了,文件没变,大家注意坑
@smallmeet 你安装不上? 遇到什么问题 ? 有参考environment.sh?
我想问下 扫描队列你是怎么写的 最近也要自己造轮子了
目前遇到的问题都是 ubuntu:latest 环境。
相关程序的安装:
获取代码
安装相关的package
配置
数据库配置位于
spidermanage/spidertool/config.py
如果本机没有装mysql,可以按照如下方式进行安装。
apt-get install mysql-server
启动mysql服务
/etc/init.d/mysql start
建立数据库
mysql -uroot -p -e 'create database datap'
启动
先迁移下数据库
注意:因为环境问题,我去掉了
/*!50100 WITH PARSER mysqlcft */
这段。 mysqlcft 比较老旧,怕以后有兼容性问题,所以不打算继续折腾。添加网站账户
mysql -uroot -p datap -e "insert INTO user_table set username = 'admin',password = 'admin'"
正式启动
python spidermanage/manage.py runserver 0.0.0.0:80
登录后你会发现有些页面点击进去会发生错误,那是因为作者有些功能还没有完成。
在 /toolforspider-master/spidermanage/common_static/nmaptool/css/bootstrap/ 下 新建 lib 文件夹 并且下载 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 这两个文件到文件夹里