破解动作脚本密码字段?
我有一个简单的 actionscript 2.0 密码字段代码。您必须输入“hello”才能获取字符串“yes”,否则您会返回字符串“no”。我想知道您是否可以输入任何 flash 术语进入输入文本字段仍然可以获得除“hello”之外的访问权限
,即输入密码字符串将使 if 语句说(首先阅读底部的代码)...
if(passwordstring == passwordstring)
但这不起作用..
这是我的代码:
passwordstring = "hello"
_root.onEnterFrame = function()
{
if(textfield.text == passwordstring)
{
trace("yes");
}
else
{
trace("no");
}
}
I have this simple actionscript 2.0 code for a password field.. you have to enter "hello" to get the string "yes" otherwise you get the string "no" returned.. I was wondering if there were any flash terms you could enter into the input text field to still get access other than "hello"
i.e. entering passwordstring would make the if statement say (read the code at the bottom first)...
if(passwordstring == passwordstring)
but that doesn't work..
here is my code:
passwordstring = "hello"
_root.onEnterFrame = function()
{
if(textfield.text == passwordstring)
{
trace("yes");
}
else
{
trace("no");
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
此行将尝试将一个属性
passwordstring
与另一个属性passwordstring
进行匹配。在文本字段中输入"passwordstring"
与此不同,因为它会读取if("passwordstring" == passwordstring)
,其计算结果为假。
例如,这将计算为
false
:This line will try match a property
passwordstring
against another propertypasswordstring
. Entering"passwordstring"
into the text-field will not be the same as this, as it would readif("passwordstring" == passwordstring)
which would evaluate tofalse
.For example this would evaluate to
false
:也许只是使用普通的文本字段,但使用
pwd_txt.displayAsPassword = true;
这里还有另一个例子,
http://marianomike.com/2009/03/18/ easy-flash-as3-密码验证/
Perhaps simply use a normal textfield but use
pwd_txt.displayAsPassword = true;
Here is an another example also,
http://marianomike.com/2009/03/18/easy-flash-as3-password-validation/