News:

Pretty crazy that we're closer to 2030, than we are 2005. Where did the time go!

Main Menu

[Java] Create SC Verhash

Started by Joe, December 12, 2005, 12:20:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joe

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;
}

}
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


MyndFyre

Like I said @ vL, what is a "verhash"?
Quote from: Joe on January 23, 2011, 11:47:54 PM
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Quote from: Rule on May 26, 2009, 02:02:12 PMOur species really annoys me.

Joe

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: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


MyndFyre

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.
Quote from: Joe on January 23, 2011, 11:47:54 PM
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Quote from: Rule on May 26, 2009, 02:02:12 PMOur species really annoys me.

Joe

Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


rabbit

If all you want is CR then just use RCRS.

Joe

I repeat, this is for local hashing bots, which aren't going to connect to any remote checkrevision server whatsoever.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.