Basically, I'm looking for constructive criticism on how I handled revisions, but anything else is also welcome.
public class Main {
public static void main(String args[]) {
System.out.println(scVerhash(1, 13, "E"));
System.exit(0);
}
static String scVerhash(int major, int minor, String revision) {
String ret = "";
/* (BYTE) Major + 0x30
* (BYTE) Int(Minor / 10) + 0x30
* (BYTE) (Minor % 10) + 0x30
* (BYTE) Revision + 0x30 */
ret += String.valueOf(major);
ret += String.valueOf((int)minor / 10);
ret += String.valueOf((int)minor % 10);
switch(revision.getBytes()[0]) {
case 65: ret += 1; break; // A
case 66: ret += 2; break; // B
case 67: ret += 3; break; // C
case 68: ret += 4; break; // D
case 69: ret += 5; break; // E
case 70: ret += 6; break; // F
default: ret += 1; break; // Probably null.
}
return ret;
}
}
Like I said @ vL, what is a "verhash"?
Its one of the fields in 0x51, can't remember which. Its extracted from the EXE in JBBE, using BNCSutil, but its usually requested from BNLS in remote-hashing bots.
Its one of those stupid things that can be done locally yet it outsourced to BNCS, such as key hashing, password hashing, version bytes, etc. The only thing BNLS should ever be used for is CheckRevision, which is why I'm a fan of RCRS and debated implementing it in my bot before BNLS (neither of which ever got added, if you're wondering).
Quote from: Joe[e2] on December 12, 2005, 02:57:58 PM
Its one of the fields in 0x51, can't remember which. Its extracted from the EXE in JBBE, using BNCSutil, but its usually requested from BNLS in remote-hashing bots.
Its one of those stupid things that can be done locally yet it outsourced to BNCS, such as key hashing, password hashing, version bytes, etc. The only thing BNLS should ever be used for is CheckRevision, which is why I'm a fan of RCRS and debated implementing it in my bot before BNLS (neither of which ever got added, if you're wondering).
Why should BNLS be used for CheckRevision? This is implemented in (M)BNCSUtil.
I could see perhaps the version byte request.
So game files are not needed.
If all you want is CR then just use RCRS.
I repeat, this is for local hashing bots, which aren't going to connect to any remote checkrevision server whatsoever.