Posted: Sun Jan 13, 2008 12:57 pm Post subject: My first crackme
Tell me what ya think ;P
Firstly my original one was written in java and much more "confusing" but I couldn't compile it into an executable file so...I made a much simpler version in c++.
Here is the original version:
Quote:
/**
* @Author: MoolT
*/
import java.util.*;
public class first
{
static Scanner reader = new Scanner (System.in);
static void print (int [] b)
{
int temp = (int)(Math.pow(3,2)) + (int)(Math.pow(4,2)) - 25;
if (b[temp] == b[1])
System.out.println ("Congratulations");
else
System.out.println ("WRONG!");
}
static void confuse(int [] a)
{
a[1] = (int)(Math.pow(1,a[1]))-1;
}
public static void main (String [] args)
{
int a;
int j = 8;
int [] b = new int [2];
int temp = 0;
System.out.println ("Enter your answer");
b[temp] = reader.nextInt();
b[1] = (int)(Math.random()*90+1)+3;
confuse(b);
print(b);
int correctAnswer = 7;
if (correctAnswer ==
System.out.println ("Congratulations!");
else
{
if (j == 23)
System.out.println ("Congratulations");
}
}
}
P.S
What's the command to make sure the program will not terminate once it's finished?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum