开发者

probably a python syntax error

just have some code dealing with hashes so here's a problem i ran into...

THE PYTHON:

import whirlpool
import cgi

form = cgi.FieldStorage()
iR 开发者_JAVA技巧= form["iR"].value
print iR
iH = whirlpool.Whirlpool(iR)
pT = iH.hexdigest()

crosscheck = "8d8309ca6af848095bcabaf9a53b1b6ce7f594c1434fd6e5177e7e5c20e76cd30936d8606e7f36acbef8978fea008e6400a975d51abe6ba4923178c7cf90c802"

if pT == crosscheck:
    print "YAY u know da PASSWORD!"
else:
    print "fail."

THE PHP: http://tekknolagi.co.cc/testme

What am I doing wrong with this? I think it's the CGI bit.


If you want to use a Python script as CGI then you need to use it as CGI (i.e., set it as the value of the action attribute of the form) instead of invoking it directly.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜