谁能告诉我这段代码什么意思或者算出结果??必给分!

zigz 2003-11-12 10:52:57
<HTML>
<HEAD>
<TITLE>Null</TITLE>
<SCRIPT>

var texts = "a43b12cde7fd7d6210";
var interpret = "";
var whatisthis = "var xorm = prompt('Enter the password:','');for (x=1; x<5; x++) {interpret += (texts.indexOf(x)+1);}interpret += 5;if (xorm==interpret){interpret = interpret + '.php';location.href=interpret;}else{location.href='hahaha.php';}";

eval(whatisthis);

</SCRIPT>
</HEAD>
<BODY> </BODY>
</HTML>


我希望不要老是转到hahaha.php。

一定给分!!谢谢!
...全文
32 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
zigz 2003-11-12
  • 打赏
  • 举报
回复
小伙子们!VERY GOOD!
马上结贴。
ricky460 2003-11-12
  • 打赏
  • 举报
回复
这段代码的主要作用是验证密码,然后根据密码跳到不同的页面 . . .
实际密码是56325

你只要在确认框里输入密码: 56325就可以了...

或者你把
if(xorm == interpret)
{
interpret = interpret+'.php';
location.href = interpret;
}
else
{
location.href = 'hahaha.php';
}
改成
interpret = interpret+'.php';
location.href = interpret;
就可以用任何密码了...


z2xx 2003-11-12
  • 打赏
  • 举报
回复
你的interpret申明成字符串了,如果var interpret = 0;,然后输入21也是对的,进入21.php
z2xx 2003-11-12
  • 打赏
  • 举报
回复
你的interpret = 56325,要prompt也输入56325才行,然后进入56325.php

87,904

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧