I'm making an aim bot in java and i have a question about oscar protocol relating to the login. It requires you to roast your password, and I get the concept of this, but I have no idea how to do it. Probably because when I read the explanation explained in the documentation (and on every other site I've googled, which just copies some documentation that aol released) it's in GREEK!. Like, I don't understand this:
"Roasting is performed by first xoring each byte in the password with the equivalent modulo byte in the roasting array ( 0xF3, 0x26, 0x81, 0xC4, 0x39, 0x86, 0xDB, 0x92, 0x71, 0xA3, 0xB9, 0xE6, 0x53, 0x7A, 0x95, 0x7C )"
xoring rings a bell, from something I've read, but it doesn't make sense to me in this context. What does the above quote mean? It's taken out of context from here (http://iserverd.khstu.ru/oscar/cli_ident.html).
Sorry, I think I'm just going to do an MD5 login. But, to keep this thread from being a useless waste of memory...
Oscar Protocol, MD5 Login
Likes/Dislikes?
"Roasting" means something like this:
Password: blah
'b' xor 0xf3
'l' xor 0x26
'a' xor 0x81
'h' xor 0xc4
Those bytes are sent over the network. That's why it's trival to decode.
MD5 is far superior.
Hm, does trivial mean hard or easy? I keep forgetting. Anyhow, it is easy, even I can do it =p.
joe@JoeMomma:~/dev/cpp/helloworld $ g++ -Wno-deprecated roast.cpp -o passroast && ./passroast
Enter password: testroast
74 65 73 74 72 6F 61 73 74 testroast
87 43 F2 B0 4B E9 BA E1 05 ‡Cò°Kéºá
74 65 73 74 72 6F 61 73 74 testroast
// AIM Password Roaster
// Author: Joe[e2]
#include <iostream.h>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
string doRoast(string data);
string debugOutput(string data);
int main() {
string data;
cout << "Enter password: ";
cin >> data;
cout << debugOutput(data);
data = doRoast(data);
cout << debugOutput(data);
data = doRoast(data);
cout << debugOutput(data);
return 0;
}
string debugOutput(string out) {
string returnString;
char TempString[4];
long i, j; // Loop variables
for(i = 0; i < out.length(); i++) {
if(i && (i % 16 == 0)) {
// If it's a multiple of 16 and i isn't null, show the ascii
returnString += '\t';
for(j = i - 16; j < i; j++) {
returnString += out[j];
}
// Add a linefeed after the string
returnString += '\n';
}
// Put the next 2 hex values into a string and add them to the returnString
sprintf(TempString, "%02X ", 0xFF & out[i]);
returnString += TempString;
}
// Add padding spaces if it's not a multiple of 16
if(i % 16 != 0) {
for(j = 0; j < ((16 - (i % 16)) * 3); j++) {
returnString += ' ';
}
}
// Add the tab for alignment
returnString += '\t';
// Add final chararacters at right, after padding
// If it was at the end of a line, print out the full line
if((i % 16) == 0) {
j = i - 16;
} else {
j = (i - (i % 16));
}
for(; j < i; j++) {
returnString += out[j];
}
// Finally, tidy it all up with a newline
returnString += '\n';
return returnString;
}
string doRoast(string data) {
string roastValues = "\xF3\x26\x81\xC4\x39\x86\xDB\x92\x71\xA3\xB9\xE6\x53\x7A\x95\x7C";
string returnString;
long i; int a;
for(i = 0; i < data.length(); i++) {
a = data[i] ^ roastValues[i];
returnString = returnString + (char)a;
}
return returnString;
}
Thanks to iago for debugOutput().
Quote from: Joe[e2] on October 04, 2005, 06:25:10 AM
Hm, does trivial mean hard or easy? I keep forgetting. Anyhow, it is easy, even I can do it =p.
Yeah, trivial means easy. We should coin a term... maybe, "joevial" that means it's super-easy. :P
Let's go issue a patent on 'joerivial'. I lie it more than 'joevial'. :)
I thought trivial ment insignifficant. Like... trivial details on a sketch or something..
Quote from: Ergot on October 04, 2005, 09:41:14 PM
I thought trivial ment insignifficant. Like... trivial details on a sketch or something..
It means that too. When in the context of discussing something's simplicity, a task can be trivial (a simple task).
I keep mixing it up with its (seemingly) root word, trivia, which is usually stuff nobody ever gets. =p
Quote from: Joe[e2] on October 05, 2005, 06:16:10 PM
I keep mixing it up with its (seemingly) root word, trivia, which is usually stuff nobody ever gets. =p
Yeah but trivia is also pointless.