Author Topic: [Java] Create SC Verhash  (Read 3033 times)

0 Members and 1 Guest are viewing this topic.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
[Java] Create SC Verhash
« on: December 12, 2005, 12:20:21 pm »
Basically, I'm looking for constructive criticism on how I handled revisions, but anything else is also welcome.

Code: [Select]
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;
}

}
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: [Java] Create SC Verhash
« Reply #1 on: December 12, 2005, 01:43:00 pm »
Like I said @ vL, what is a "verhash"?
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: [Java] Create SC Verhash
« Reply #2 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).
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline MyndFyre

  • Boticulator Extraordinaire
  • x86
  • Hero Member
  • *****
  • Posts: 4540
  • The wait is over.
    • View Profile
    • JinxBot :: the evolution in boticulation
Re: [Java] Create SC Verhash
« Reply #3 on: December 12, 2005, 05:51:34 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.
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Our species really annoys me.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: [Java] Create SC Verhash
« Reply #4 on: December 12, 2005, 07:11:22 pm »
So game files are not needed.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline rabbit

  • x86
  • Hero Member
  • *****
  • Posts: 8092
  • I speak for the entire clan (except Joe)
    • View Profile
Re: [Java] Create SC Verhash
« Reply #5 on: December 12, 2005, 07:35:46 pm »
If all you want is CR then just use RCRS.

Offline Joe

  • B&
  • Moderator
  • Hero Member
  • *****
  • Posts: 10319
  • In Soviet Russia, text read you!
    • View Profile
    • Github
Re: [Java] Create SC Verhash
« Reply #6 on: December 12, 2005, 09:00:24 pm »
I repeat, this is for local hashing bots, which aren't going to connect to any remote checkrevision server whatsoever.
I'd personally do as Joe suggests

You might be right about that, Joe.