破解动作脚本密码字段?

发布于 2024-11-15 15:59:01 字数 471 浏览 1 评论 0原文

我有一个简单的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

┊风居住的梦幻卍 2024-11-22 15:59:01
if(passwordstring == passwordstring)

此行将尝试将一个属性 passwordstring 与另一个属性 passwordstring 进行匹配。在文本字段中输入 "passwordstring" 与此不同,因为它会读取 if("passwordstring" == passwordstring) ,其计算结果为 假。

例如,这将计算为 false

var value:String = "abc";
trace("value" == value); // false
if(passwordstring == passwordstring)

This line will try match a property passwordstring against another property passwordstring. Entering "passwordstring" into the text-field will not be the same as this, as it would read if("passwordstring" == passwordstring) which would evaluate to false.

For example this would evaluate to false:

var value:String = "abc";
trace("value" == value); // false
最好是你 2024-11-22 15:59:01

也许只是使用普通的文本字段,但使用 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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文