Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Try 2 Hack!
Index -> General Discussion
Goto page 1, 2, 3 ... 9, 10, 11  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Triple Five




PostPosted: Fri Dec 19, 2003 12:23 pm   Post subject: Try 2 Hack!

go to

http://www.try2hack.nl/

i got to level 2 Very Happy

just learning


can anyone link me to a tutorial

thanks Very Happy
Sponsor
Sponsor
Sponsor
sponsor
Mazer




PostPosted: Sun Dec 28, 2003 3:02 pm   Post subject: (No subject)

lol, yeah level 1 was like SO hard Wink
i'm just kidding... this looks really interesting, thanks for sharing
Thuged_Out_G




PostPosted: Sun Dec 28, 2003 3:24 pm   Post subject: (No subject)

i made it to level 5(or maybe it was 4)
i stopped when i had to download a java class, decompile it and find the password lol....i did decompile it, but i dont know java so i couldnt find the pw or username lol

if anyone wants ill post solutions for the first 5(not answers, but how to get them)
Tony




PostPosted: Sun Dec 28, 2003 3:36 pm   Post subject: (No subject)

well for lvl one you just look at the source code for the HTML page - password is in the if statment.

For level two - password is hidden in a comment of javascript, but username has me puzzled Confused
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Amailer




PostPosted: Sun Dec 28, 2003 4:42 pm   Post subject: (No subject)

code:

 <script language="JavaScript">
      <!--
      passwd="ItIsSoEasy";
      function disable_right_click(e) {
        var browser = navigator.appName.substring ( 0, 9 );
        var event_number = 0;
        if (browser=="Microsoft")
          event_number = event.button;
        else
          event_number = e.which;
        if ( event_number==2 || event_number==3 || event_number==4) {
          alert ("Right/middle mousebutton is disabled");
          return (false);
        }
        return (true);
      }
      function check_mousekey () {
        var mouse_key = 93;
        var keycode = event.keyCode;
        if ( keycode == mouse_key )
          alert ( "Mouse Key Is Disabled" );
      }
      function trap_page_mouse_key_events () {
        var browser = navigator.appName.substring ( 0, 9 );
        document.onmousedown = disable_right_click;
        if ( browser == "Microsoft" )
          document.onkeydown = check_mousekey;
        else
          document.captureEvents( Event.MOUSEDOWN );
      }
      window.onload = trap_page_mouse_key_events;
      //-->
    </script>


What's the user name?
strife_8




PostPosted: Sun Dec 28, 2003 6:40 pm   Post subject: (No subject)

for level 2 the html code wont help, the password that it shows there is a decoy. I know that the answer is somewhere in the temp folder but i dont know where...
Amailer




PostPosted: Sun Dec 28, 2003 7:07 pm   Post subject: (No subject)

Doesn't it need to use some script ( the flash ) for it to work?? or can you actually make a login script in flash?
Amailer




PostPosted: Sun Dec 28, 2003 7:39 pm   Post subject: (No subject)

eh here guys im smart
if (txtUsername == "try2hack" && txtPassword == "irtehh4x0r!")
Amailer




PostPosted: Sun Dec 28, 2003 7:57 pm   Post subject: (No subject)

so simple im at lvl 4
Thuged_Out_G




PostPosted: Sun Dec 28, 2003 8:19 pm   Post subject: (No subject)

for level 2, you need to go to the temporary internet folder, and find the flash file....copy it somewhere, and open it in a text editor.

level three i think is the prompt question...i think i just pressed cancel and then stop quickly...then i think it was in the source, you gotta open the file called JavaScript
Amailer




PostPosted: Sun Dec 28, 2003 9:14 pm   Post subject: (No subject)

http://www.try2hack.nl/levels/level4-kdnvxs.xhtml
level 4 is anoying, where can i get the PasswdLevel4.java?
Thuged_Out_G




PostPosted: Sun Dec 28, 2003 10:41 pm   Post subject: (No subject)

http://www.try2hack.nl/levels/PasswdLevel4.class

good luck with that, youll have to get a java decompiler...i found the username & password in the program...i looked, and couldnt find it Confused
Amailer




PostPosted: Sun Dec 28, 2003 10:58 pm   Post subject: (No subject)

thats .class there is nothing there, just how the loging in takes place
santabruzer




PostPosted: Mon Dec 29, 2003 12:30 am   Post subject: (No subject)

don't know java.. but the decompiled is:
code:

// Source File Name:   PasswdLevel4.java

import java.applet.Applet;
import java.applet.AppletContext;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.*;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.EventObject;

public class PasswdLevel4 extends Applet
    implements ActionListener
{

    public PasswdLevel4()
    {
        inuser = new String[22];
        totno = 0;
        countConn = null;
        countData = null;
        inURL = null;
        txtlogin = new TextField();
        label1 = new Label();
        label2 = new Label();
        label3 = new Label();
        txtpass = new TextField();
        lblstatus = new Label();
        ButOk = new Button();
        ButReset = new Button();
        lbltitle = new Label();
    }

    void ButOk_ActionPerformed(ActionEvent actionevent)
    {
        boolean flag = false;
        for(int i = 1; i <= totno / 2; i++)
            if(txtlogin.getText().trim().toUpperCase().intern() == inuser[2 * (i - 1) + 2].trim().toUpperCase().intern() && txtpass.getText().trim().toUpperCase().intern() == inuser[2 * (i - 1) + 3].trim().toUpperCase().intern())
            {
                lblstatus.setText("Login Success, Loading..");
                flag = true;
                String s = inuser[1].trim().intern();
                String s1 = getParameter("targetframe");
                if(s1 == null)
                    s1 = "_self";
                try
                {
                    finalurl = new URL(getCodeBase(), s);
                }
                catch(MalformedURLException _ex)
                {
                    lblstatus.setText("Bad URL");
                }
                getAppletContext().showDocument(finalurl, s1);
            }

        if(!flag)
            lblstatus.setText("Invaild Login or Password");
    }

    void ButReset_ActionPerformed(ActionEvent actionevent)
    {
        txtlogin.setText("");
        txtpass.setText("");
    }

    public void actionPerformed(ActionEvent actionevent)
    {
        Object obj = actionevent.getSource();
        if(obj == ButOk)
        {
            ButOk_ActionPerformed(actionevent);
            return;
        }
        if(obj == ButReset)
            ButReset_ActionPerformed(actionevent);
    }

    public void destroy()
    {
        ButOk.setEnabled(false);
        ButReset.setEnabled(false);
        txtlogin.setVisible(false);
        txtpass.setVisible(false);
    }

    public void inFile()
    {
        new StringBuffer();
        try
        {
            countConn = inURL.openStream();
            countData = new BufferedReader(new InputStreamReader(countConn));
            String s;
            while((s = countData.readLine()) != null)
                if(totno < 21)
                {
                    totno = totno + 1;
                    inuser[totno] = s;
                    s = "";
                } else
                {
                    lblstatus.setText("Cannot Exceed 10 users, Applet fail start!");
                    destroy();
                }
        }
        catch(IOException ioexception)
        {
            getAppletContext().showStatus("IO Error:" + ioexception.getMessage());
        }
        try
        {
            countConn.close();
            countData.close();
            return;
        }
        catch(IOException ioexception1)
        {
            getAppletContext().showStatus("IO Error:" + ioexception1.getMessage());
        }
    }

    public void init()
    {
        setLayout(null);
        setSize(361, 191);
        add(txtlogin);
        txtlogin.setBounds(156, 72, 132, 24);
        label1.setText("Please Enter Login Name & Password");
        label1.setAlignment(1);
        add(label1);
        label1.setFont(new Font("Dialog", 1, 12));
        label1.setBounds(41, 36, 280, 24);
        label2.setText("Login");
        add(label2);
        label2.setFont(new Font("Dialog", 1, 12));
        label2.setBounds(75, 72, 36, 24);
        label3.setText("Password");
        add(label3);
        add(txtpass);
        txtpass.setEchoChar('*');
        txtpass.setBounds(156, 108, 132, 24);
        lblstatus.setAlignment(1);
        label3.setFont(new Font("Dialog", 1, 12));
        label3.setBounds(75, 108, 57, 21);
        add(lblstatus);
        lblstatus.setFont(new Font("Dialog", 1, 12));
        lblstatus.setBounds(14, 132, 344, 24);
        ButOk.setLabel("OK");
        add(ButOk);
        ButOk.setFont(new Font("Dialog", 1, 12));
        ButOk.setBounds(105, 156, 59, 23);
        ButReset.setLabel("Reset");
        add(ButReset);
        ButReset.setFont(new Font("Dialog", 1, 12));
        ButReset.setBounds(204, 156, 59, 23);
        lbltitle.setAlignment(1);
        add(lbltitle);
        lbltitle.setFont(new Font("Dialog", 1, 12));
        lbltitle.setBounds(12, 14, 336, 24);
        String s = getParameter("title");
        lbltitle.setText(s);
        ButOk.addActionListener(this);
        ButReset.addActionListener(this);
        infile = new String("level4");
        try
        {
            inURL = new URL(getCodeBase(), infile);
        }
        catch(MalformedURLException _ex)
        {
            getAppletContext().showStatus("Bad Counter URL:" + inURL);
        }
        inFile();
    }

    private URL finalurl;
    String infile;
    String inuser[];
    int totno;
    InputStream countConn;
    BufferedReader countData;
    URL inURL;
    TextField txtlogin;
    Label label1;
    Label label2;
    Label label3;
    TextField txtpass;
    Label lblstatus;
    Button ButOk;
    Button ButReset;
    Label lbltitle;
}
Amailer




PostPosted: Mon Dec 29, 2003 4:36 pm   Post subject: (No subject)

isn't that the .class file?..not .java
Display posts from previous:   
   Index -> General Discussion
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 11  [ 158 Posts ]
Goto page 1, 2, 3 ... 9, 10, 11  Next
Jump to:   


Style:  
Search: