Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/gourdscan-2.1-py2.7.egg/gourdscan/conf/conf.json #17

Closed
Jumbo-WJB opened this issue Mar 11, 2017 · 22 comments

Comments

@Jumbo-WJB
Copy link

hello,我这边运行gourdscan,提示这个IOError: [Errno 2] No such file or directory: '/usr/local/lib/python2.7/dist-packages/gourdscan-2.1-py2.7.egg/gourdscan/conf/conf.json'
这是什么原因呢?

@linxi0428
Copy link
Contributor

安装的时候的问题,参考前面的issue,里面有人回答了!

@Jumbo-WJB
Copy link
Author

@linxi0428
谢了,基友,有看到,但是我访问8000端口时提示,IOError: [Errno 2] No such file or directory: '/home/jumbo/GourdScanV2/session'于是,我就手动创建了一个session,访问是500,但是如127.0.0.1:8000/aaaa其他页面是可以访问的(404,不是500)

@linxi0428
Copy link
Contributor

这个问题上午我也遇到过,我已经修改了,提交了pull request了
你手动修改下session.py文件吧,注意我标黑的那一行,少了一个参数‘r+’
def check(session):
with open(os.getcwd() + os.path.sep + "session",'r+') as f:
lines = f.readlines()
f.close()
for line in lines:
if session == line.strip():
return True
return False

@Jumbo-WJB
Copy link
Author

Jumbo-WJB commented Mar 11, 2017

@linxi0428
谢了基友,有看到你的pull,我的session.py文件确实是你说的这样
qq 20170311160431
但是还是不行

现在不知怎么,访问哪一个页面都是500了。

@linxi0428
Copy link
Contributor

你可以把错误代码贴上来,我帮你看看,刚好今天有时间就一起研究研究,不然周一了又要忙了

@linxi0428
Copy link
Contributor

就是终端terminal里面的错误提示,你贴上来

@Jumbo-WJB
Copy link
Author

@linxi0428
基友,谢了。

这是初始报错
File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 2047, in finish self.execute() File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 2067, in execute **self.handler_kwargs) File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 187, in __init__ self.initialize(**kwargs) File "/usr/local/lib/python2.7/dist-packages/gourdscan-2.1-py2.7.egg/gourdscan/web/handlers/base.py", line 26, in initialize if cookie == "" or not session.check(cookie): File "/usr/local/lib/python2.7/dist-packages/gourdscan-2.1-py2.7.egg/gourdscan/lib/session.py", line 23, in check with open(os.getcwd() + os.path.sep + "session", 'r+') as f: IOError: [Errno 2] No such file or directory: '/home/jumbo/GourdScanV2/session'

这是我手动添加一个session以后的报错
4, in on_connect if nativestr(self.read_response()) != 'OK': File "/usr/local/lib/python2.7/dist-packages/redis/connection.py", line 582, in read_response raise response ResponseError: Client sent AUTH, but no password is set [E 170311 16:46:47 web:1971] 500 GET / (127.0.0.1) 9.75ms

@linxi0428
Copy link
Contributor

好吧,你可以参考我前面的issue
redis数据库运行时,感觉没有读取我们自己的配置,虽然我都替换成你设置的那个redis.conf文件了
一直提示数据库未配置密码,这个问题在手工添加redis数据库的密码时得到解决,在终端上执行如下命令:
redis-cli
config set requirepass Y3rc_Alw4ys_B3_W1th_Y0u

@linxi0428
Copy link
Contributor

对了,你还要在/usr/local/lib/python2.7/dist-packages/redis/connection.py这个文件中添加password
def init(self, host='localhost', port=6379, db=0, password='Y3rc_Alw4ys_B3_W1th_Y0u',

@Jumbo-WJB
Copy link
Author

Jumbo-WJB commented Mar 11, 2017

@linxi0428
谢了基友,现在能打开login页面了,然后我也设置了redis密码,在connection.py头部设置了密码
`import warnings

def init(self, host='localhost', port=6379, db=0, password='Y3rc_Alw4ys_B3_W1th_Y0u',
try:
import ssl`
但是登录时还是500,终端显示

        return md5.new(config.load()["cookie_secret"] + str(time.time()) + ip).hexdigest()
    AttributeError: 'builtin_function_or_method' object has no attribute 'new'
[E 170311 17:04:19 web:1971] 500 POST /login (127.0.0.1) 12.20ms

如果密码乱输,则提示账号密码错误,看来确实已经匹配到了数据库了

@linxi0428
Copy link
Contributor

session.py文件中
from hashlib import md5
建议直接改成
import md5
不然认证过程一直通不过,报500错误

@linxi0428
Copy link
Contributor

。。。你遇到的错误和我的一模一样,前面我也有写

@Jumbo-WJB
Copy link
Author

Jumbo-WJB commented Mar 11, 2017

@linxi0428 你的那个确实看过了,改了也不行

而且我添加
def init(self, host='localhost', port=6379, db=0, password='Y3rc_Alw4ys_B3_W1th_Y0u',这个的时候,遇到了python常年坑,提示:
SyntaxError: invalid syntax
不知道我这def init(self, host='localhost', port=6379, db=0, password='Y3rc_Alw4ys_B3_W1th_Y0u',应该添加在什么地方

@Jumbo-WJB
Copy link
Author

@linxi0428 基友,留个qq吧,这样讨论会快点 ,

@linxi0428
Copy link
Contributor

打开connection.py,找到如下代码:
def init(self, host='localhost', port=6379, db=0, password=

原文中password是的None好像,把None改为Y3rc_Alw4ys_B3_W1th_Y0u

你再试试看

@Jumbo-WJB
Copy link
Author

@linxi0428 还是不行,输入账号密码登录提示500

@linxi0428
Copy link
Contributor

额~,这样吧,作者说这周有时间的话会更新,要不你等等看

@Jumbo-WJB
Copy link
Author

@linxi0428 好的,谢了基友

@rangeme
Copy link
Contributor

rangeme commented Mar 16, 2017

马上就解决,有什么bug赶紧提

@Jumbo-WJB
Copy link
Author

Jumbo-WJB commented Mar 17, 2017

@rangeme 已成功安装,但是貌似看不到漏洞详情?

qq 20170318003247

@rangeme
Copy link
Contributor

rangeme commented Mar 21, 2017

@Jumbo-WJB 绿色就是没有漏洞,你看看有没勾选测试的那些漏洞类型

@Jumbo-WJB
Copy link
Author

@rangeme 没事没事,截图不是想说明有没有漏洞,是想说明有漏洞的情况下看不到漏洞详情,前面有聊过 #20

@ihacku ihacku closed this as completed May 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants