Hello, i have made a second encryption program. Now, try to decrypt this text.
Code:ÕÕÕÔÔÔÓÓÓððð...ÑÑÑàèäÐíÐ$øÐ"...If you can't find it in a bit. i'll post the source code.
This is a discussion on Power Encryption 2 within the C++ Programming forums, part of the General Programming Boards category; Hello, i have made a second encryption program. Now, try to decrypt this text. Code: ÕÕÕÔÔÔÓÓÓððð...ÑÑÑàèäÐíÐ$øÐ" ...If you can't find ...
Hello, i have made a second encryption program. Now, try to decrypt this text.
Code:ÕÕÕÔÔÔÓÓÓððð...ÑÑÑàèäÐíÐ$øÐ"...If you can't find it in a bit. i'll post the source code.
Last edited by kevinawad; 10-12-2008 at 11:05 PM.
Anyone trying to find it? if yes, write "Me"
Just post the source code already.
http://www.interhack.net/people/cmcu...e-oil-faq.html
Secret Algorithm
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I support http://www.ukip.org/ as the first necessary step to a free Europe.
To decrypt the string, here's the function.
Code:void Decrypt(std::string& thestring) { std::string finalstring; std::string thestring2 = thestring; for(int i = thestring.length() - 22; i < thestring.length(); i++) { thestring[i] = '\0'; } for(int i = 0; i < thestring.length(); i++) { thestring[i] = thestring2[thestring.length() - i - 1]; } for(int i = 0; i < thestring.length(); i++) { thestring[i] -= 0x020; } for(int i = thestring.length() - 20; i < thestring.length(); i++) { thestring[i] = '\0'; } for(int i = 0; i < thestring.length(); i++) { thestring[i] -= 1963785463219856; } for(int i = 0; i < thestring.length() - 20; i++) { finalstring += thestring[i]; } thestring = finalstring; }
Full decryption source code.
Make a file, name it file.txt in the same directory as the .exe decryptor. Put the encrypted text in it. And open the program.Code:#include<iostream> #include<fstream> #include<string> using namespace std; void Decrypt(std::string& thestring) { std::string finalstring; std::string thestring2 = thestring; for(int i = thestring.length() - 22; i < thestring.length(); i++) { thestring[i] = '\0'; } for(int i = 0; i < thestring.length(); i++) { thestring[i] = thestring2[thestring.length() - i - 1]; } for(int i = 0; i < thestring.length(); i++) { thestring[i] -= 0x020; } for(int i = thestring.length() - 20; i < thestring.length(); i++) { thestring[i] = '\0'; } for(int i = 0; i < thestring.length(); i++) { thestring[i] -= 1963785463219856; } for(int i = 0; i < thestring.length() - 20; i++) { finalstring += thestring[i]; } thestring = finalstring; } int main() { string lol; ifstream file; file.open("file.txt"); file >> lol; Decrypt(lol); cout <<lol; }
I can see my comment from your last thread fell on deaf ears.
YOUR INDENTATION SUCKS.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I support http://www.ukip.org/ as the first necessary step to a free Europe.
You do realize that doesn't work right?
The string subscript goes out of range several times.
also
is invalid.Code:thestring[i] -= 1963785463219856;
a char is 0-255.
So that ridiculously long number you have there is truncated down to 196.
This is a different type of decryption.
It has more protection then the last one.
First...it adds this: !!!~~~@@@###$$$%%%^^
Second it changes letters place.
3rd add some random space and codes into the string
4th add a simple encryption with numbers.
This has 3x more protection.
By the way, it doesn't go out of range.
Put this in a file.txt
Then, try the new code a bit above this post.Code:ÕÕÕÔÔÔÓÓÓððð...ÑÑÑàèäÐíÐ$øÐ"
The same thing you are doing could be accomplished with a xor crypt
Code:void Crypt(std::string& str) { std::string key = "1234567890"; int keypos = 0; for ( int i = 0; i != str.length()-1; ++i ) { if ( keypos == key.length() ) keypos = 0; else ++keypos; str.at(i) ^= key.at(keypos); } }
Wrong, This will only changes letters...Try decrypting with the XOR crypt algorithm. you'll see. + Easily to decrypt.
I am not saying that my code will decrypt your message. I am saying my code will accomplish pretty much the same task, in about 1/100 the time.
Convenient thing about xor crypting is that it keeps the average guy out of your stuff, or if you get fancy with it, one of the more powerful cryptography types.
But, it will be easy to decrypt...It won't actually accomplish the same thing...what if some hackers find about this encryption...it will be 100x more easy to decrypt...
It takes less time yes, but less protection.
Encryption code:
Code:void CAwad::Encrypt(std::string& thestring) { thestring += "!!!~~~@@@###$$$%%%^^"; std::string thestring2 = thestring; for(int i = 0; i < thestring.length(); i++) { thestring[i] = thestring2[thestring.length() - i - 1]; } for(int i = 0; i < thestring.length(); i++) { thestring[i] += 0x020; } for(int i = 0; i < thestring.length(); i++) { thestring[i] += 196; } }