Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[c++]Problem with convert EAX

Featured Replies

Posted

Hi all!


I try to do the keygen: "2. Keygenning tut KeyGenMe_#1_cLoNeTrOnE TeAm FOFF"


from the link :


https://forum.tuts4you.com/topic/36362-all-my-keygenning-tuts/?hl=%2Bkeygening+%2Btut


 


There was a moment which register EAX equal to : 00000275 (in my case).[its just take the string "baruch" and conclude every char]


And then was check : if(EAX == 00000275).


 


Now in my C++ program ,i have integer called "sum" which equal to 275.


 


The question is how i convert that number? I mean ,i need 00000275 not 275,so 


how i convert from "integer look" to "register look"?


 


of course i can do very long way :


1.check the length of sum==3


2.do loop from 0 to 5 and fill with zero(char[] or char*)


3.do one more loop from 0 to 3 and fill with : 2,7,5.


 


It looks to me there is a "easy" way to do it and not so long...


 


i sorry for my english:( 


 


  • Author

Mmm...no guys,its not what i meant to.

I know already what is hexadecimal.

I use c++ not c,so printf not realy helpul.

I will try to explain myself better:

In that keygen for the string "baruch" the serial is

"GA-00000275-".

I did array of chars lets call him "pass",now im in state :

pass[0]=G,pass[1]=A,pass[2]='-'

I have integer "sum" which equal to 275.

Now i search an algorithm which will take the 275 which stored in "sum" and paste him in "pass" so after the algorithm "pass" will look like this: "GA-00000275".

if you have that problem,which commands in c++ you will use?what is your algorithm to do that??

i said before how i did it,but it looks to me too long and complex for so simple task...:(

int EAX = 275;

std::string CppString;

char Dest[30];

sprintf(Dest, "GA-00000%d", EAX);

CppString = Dest;

cout << CppString << "\r\n";

OK i guess this is more cpp but I prefer above way

std::string itoa(int Integer)

{

stringstream ss;

ss << Integer;

return ss.str();

}

std::string Prefix = "-GA-00000";

int Sum = 275;

std::string Final = Prefix + itoa(Sum);

cout << Final << "\r\n";

Edited by simple

  • Author

simple-thank you for your help!

But....

Its a keygen,if you enter another name the serial may look "00123456"....

So i realy sorry i spent your time,im not good in explanation in english....

So thank you guys for trying to help me ;(

sprintf(Dest, "GA-%08d", EAX);

the sum 0x275 or 00000275 comes from the name chars added together. b+a+r+u+c+h = 0x275.


 


by using sprintf(serial, "GA-%08x-", EAX); the output you are looking for is in the variable "serial".

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.