Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


My first crackme

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming -> Crackmes
View previous topic :: View next topic  
Author Message
MoolT
Cheater
Reputation: 0

Joined: 16 Mar 2007
Posts: 38

PostPosted: Sun Jan 13, 2008 12:57 pm    Post subject: My first crackme Reply with quote

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 == Cool
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?
Back to top
View user's profile Send private message
killersamurai
Expert Cheater
Reputation: 0

Joined: 10 Sep 2007
Posts: 197
Location: Colorado

PostPosted: Sun Jan 13, 2008 1:53 pm    Post subject: Reply with quote

The answer is 0.

To keep the program from closing, you have several options.

- system("pause");
- std::cin.get();
- sleep(<milliseconds>); // will close after the time is up

There is more ways to do it than the ones I listed, but these are the most common.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming -> Crackmes All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites