Example #1
0
    public void Login()
    {
        int i = 0;

        for (i = 0; i < unames.Length; i++)
        {
            if (unames[i] == username.text)
            {
                if (passwds[i] == passwd.text)
                {
                    eh.PassReport("请使用注入方法通关");
                }
                else if (passwd.text == "2'or'1")
                {
                    gc.mails[5].SetActive(true);
                    eh.PassReport("通关!请查收邮件");
                }
                else
                {
                    eh.ErrorReport("密码错误");
                }
                break;
            }
        }
        if (i == unames.Length)
        {
            eh.ErrorReport("用户名不存在");
        }
    }
Example #2
0
 public void OpenPage()
 {
     gcode.currentLevel = url.text;
     CloseAll();
     foreach (GameObject page in pages)
     {
         if (page.name == url.text)
         {
             page.SetActive(true);
         }
         if (url.text.Contains("Sql2") && (url.text != "Sql2") && (page.name == "Sql2"))
         {
             if (url.text == "Sql2?user=admin' or 1='1")
             {
                 page.transform.GetChild(0).gameObject.SetActive(false);
                 page.transform.GetChild(1).gameObject.SetActive(true);
                 eh.PassReport("注入成功");
                 gc.mails[6].SetActive(true);
                 page.SetActive(true);
             }
             else
             {
                 eh.ErrorReport("注入失败");
             }
         }
         if (url.text == "")
         {
             OpenPage0();
         }
     }
 }
Example #3
0
    public void EnterMain()
    {
        string pwd = pwdOnData.text;

        if (pwd == _curData.Passwd)
        {
            desktop.SetActive(true);
            transform.parent.gameObject.SetActive(false);
        }
        else if (pwd == "")
        {
            eh.ErrorReport("请输入密码");
        }
        else
        {
            eh.ErrorReport("密码错误");
        }
    }
Example #4
0
 public void Check()
 {
     if (result.text == correct)
     {
         btn.onClick.RemoveAllListeners();
         btn.onClick.AddListener(
             delegate(){
             gc.mails[2].SetActive(true);
             eh.PassReport("成功了,请查收邮件");
             gc.pc.Show();
             gc.curStage = "Page2";
             gc.point   += 900;
         }
             );
         ps.SwitchToGraphic();
     }
     else
     {
         eh.ErrorReport("编译错误");
     }
 }
Example #5
0
 public void Login()
 {
     if ((uname.text == "admin") && (passwd.text == "abcd"))
     {
         //TODO:New Level
         eh.PassReport("成功了,请查收新邮件");
     }
     else
     {
         eh.ErrorReport("账号或密码错误");
     }
 }
Example #6
0
 public void Check()
 {
     if (result.text == correct)
     {
         lockBtn.interactable = true;
         ps.SwitchToGraphic();
     }
     else
     {
         eh.ErrorReport("编译错误");
     }
 }
Example #7
0
 public void Check()
 {
     if (result.text == correct)
     {
         if (result.text == correct)
         {
             btn.onClick.RemoveAllListeners();
             btn.onClick.AddListener(
                 delegate() {
                 gc.mails[3].SetActive(true);
                 eh.PassReport("成功了,请查收邮件");
             }
                 );
             ps.SwitchToGraphic();
         }
         ps.SwitchToGraphic();
     }
     else
     {
         eh.ErrorReport("编译错误");
     }
 }
Example #8
0
 public void Check()
 {
     if (result.text == correct)
     {
         btn.onClick.AddListener(pm.CloseAll);
         btn.onClick.AddListener(pm.OpenTrap);
         gc.mails[4].SetActive(true);
         ps.SwitchToGraphic();
     }
     else
     {
         eh.ErrorReport("编译错误");
     }
 }
Example #9
0
    public void GenCode()
    {
        if (currentLevel == "Page3")
        {
            p3.text = @"<!DOCTYPE html>
<html>

<body>
<p>考试题目</p>
<p>1. 这道题选什么?</p>
<p><input type=""checkbox"" name=""A"" value=""A"" />A</p>
<p><input type=""checkbox"" name=""B"" value=""B"" />B</p>
<p><input type=""checkbox"" name=""C"" value=""C"" />C</p>
<p><input type=""checkbox"" name=""D"" value=""D"" />D</p>
<p>2. 你从哪里来?</p>
<p><input type=""checkbox"" name=""A"" value=""A"" />A</p>
<p><input type=""checkbox"" name=""B"" value=""B"" />B</p>
<p><input type=""checkbox"" name=""C"" value=""C"" />C</p>
<p><input type=""checkbox"" name=""D"" value=""D"" />D</p>
<p>3. 你要到哪去?</p>
<p><input type=""checkbox"" name=""A"" value=""A"" />A</p>
<p><input type=""checkbox"" name=""B"" value=""B"" />B</p>
<p><input type=""checkbox"" name=""C"" value=""C"" />C</p>
<p><input type=""checkbox"" name=""D"" value=""D"" />D</p>
<p>4. 怎么通过考试?</p>
<p><input type=""checkbox"" name=""A"" value=""A"" />A</p>
<p><input type=""checkbox"" name=""B"" value=""B"" />B</p>
<p><input type=""checkbox"" name=""C"" value=""C"" />C</p>
<p><input type=""checkbox"" name=""D"" value=""D"" />D</p>

<form action=""action_page.php"" method=""POST"">
 .
ExhaustiveAttack(""ABCD"",form);
 .
</form>

<button type=""submit"">提交</button>
</body>

</html>";
            eh.PassReport("已生成穷举代码");
        }
        else
        {
            eh.ErrorReport("无可穷举攻击目标");
        }
    }