Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Hdx

Pages: 1 2 3 [4] 5 6 ... 21
46
General Programming / Re: Check this please
« on: November 20, 2008, 12:00:30 pm »
The main reason I chose C was because I wanted to become more fluent in it. My code right now is by no means optimized/efficient. JBLS uses ~56mbs of memory just idling, and 3/4ths the damn thing isnt even written yet! But, what I figure is i'll optimize things after i get the bulk of it working. There is no release date this is purly for my own enjoyment.

I plan to in the future teach myself other languages Fortran included. But I figured C was a good place to start.

47
General Discussion / Re: PSP
« on: November 10, 2008, 12:10:22 pm »
Bah, damn you all. Yesterday I went and got one for $75 off craigslist. It has a few issues but meh, its pre-moded.

48
JavaOp Support Archive / Re: BNetLogin and STAR
« on: November 08, 2008, 04:59:02 pm »
Well, its jsut all your old docs + the public 0x02 doc.
Nothing special.

49
JavaOp Support Archive / Re: BNetLogin and STAR
« on: November 07, 2008, 06:27:59 pm »
Yep, nothing about CheckRevision has changed; just need updated hash files and the new version byte.

If you can get your hands on that warden interceptor proxy Hdx came up with, you should be able to work around Warden. If not, I've built the interceptor in to BNU-Bot.
Theres a new version of warden's module out that makes the current work around moot.

50
General Programming / Re: Check this please
« on: November 07, 2008, 04:31:06 pm »
Ya, I had a few problems with the code when i first tested it. As I didn't feel like verifying the results, I jsut let them both run 0x1000000 times with no logging or anything.
Turns out I had a bug that made the C code not compute 1/2 the crap.
Now i've finished it and Java runs about 70% faster then the C.
Both are still < 1/2 ms per decode, but still.

51
General Discussion / PSP
« on: November 07, 2008, 12:00:40 pm »
Its my birthday this month so I'm trying to find a cheap PSP.
Anyone have one they don't use for < $100. Preferably around $50-60.

52
JavaOp Support Archive / Re: BNetLogin and STAR
« on: November 06, 2008, 06:52:58 pm »
The latest version of JavaOp should have no problem logging into Bnet as SC or BW.
As long as you use the correct JBLS server/hashes.
Also, its a moot point because Warden is enabled and you will be disconnected in 2 mins.

53
General Programming / Re: Check this please
« on: November 04, 2008, 09:52:39 pm »
Well dua i'm years behind. I haven't gotten it working 100% yet.  [Who knew a 7 month old could erase 1/2 a file and save it?]
But I just did a comparison, and it runs ~27 times faster in C then it does in Java. [No surprise there] Its helping me learn a bit more about the cdkey system/C. So its worth it.

54
General Programming / Re: Check this please
« on: November 02, 2008, 08:24:35 pm »
God damnet
32-bit ints != 64-bit ints
I was using a 32-bit in when I should of used a 64-bit in.
I fixed that. Now I'm on the final loop of WC3 decoding.
Code: [Select]
  uint32_t eax, ecx, edx;
  uint32_t location;
  e = 0;
  for(c = 0; c < 120; c++){
    eax = c & 0x1F;
ecx = e & 0x1F;
edx = 3 - (edi >> 5);

location = 12 - ((e >> 5) << 2);
ebp = values[location / 4];
ebp = (ebp & (1 << ecx)) >> ecx;
values[edx] = ((ebp & 1) << eax) | (~(1 << eax) & values[edx]);
printf("%08X %08X %08X %08X\n", values[0], values[1], values[2], values[3]);
e = (e + 11) % 120;
  }
Not working correctly. I'll look at it more later. But now, i'm at the mall hoping the owner of the WiFi i'm on [SSID: Uv been hAcked] will try and hack/talk to me









Code: [Select]
#ifndef CDKEYS_C
#define CDKEYS_C
#define hexvalue(n)  (((n) & 0x0F) + (((n) & 0x0F) < 10 ? 0x30 : 0x37))
#define numvalue(n)   (toupper(n) - (isdigit(n) ? 0x30 : 0x37))
#include "cdkeys.h"

uint8_t *orig_key = "246789BCDEFGHJKMNPRTVWXZ";
uint8_t *war3_key = "246789BCDEFGHJKMNPRTVWXYZ";

uint8_t star_seq[12] = {6, 0, 2, 9, 3, 11, 1, 7, 5, 4, 10, 8};
uint8_t wcd2_seq[16] = {5, 6, 0, 1, 2, 3, 4, 9, 1, 11, 12, 13, 14, 15, 7, 8};

uint8_t TranslateTable[] = {
    0x09, 0x04, 0x07, 0x0F, 0x0D, 0x0A, 0x03, 0x0B, 0x01, 0x02, 0x0C, 0x08,
    0x06, 0x0E, 0x05, 0x00, 0x09, 0x0B, 0x05, 0x04, 0x08, 0x0F, 0x01, 0x0E,
    0x07, 0x00, 0x03, 0x02, 0x0A, 0x06, 0x0D, 0x0C, 0x0C, 0x0E, 0x01, 0x04,
    0x09, 0x0F, 0x0A, 0x0B, 0x0D, 0x06, 0x00, 0x08, 0x07, 0x02, 0x05, 0x03,
    0x0B, 0x02, 0x05, 0x0E, 0x0D, 0x03, 0x09, 0x00, 0x01, 0x0F, 0x07, 0x0C,
    0x0A, 0x06, 0x04, 0x08, 0x06, 0x02, 0x04, 0x05, 0x0B, 0x08, 0x0C, 0x0E,
    0x0D, 0x0F, 0x07, 0x01, 0x0A, 0x00, 0x03, 0x09, 0x05, 0x04, 0x0E, 0x0C,
    0x07, 0x06, 0x0D, 0x0A, 0x0F, 0x02, 0x09, 0x01, 0x00, 0x0B, 0x08, 0x03,
    0x0C, 0x07, 0x08, 0x0F, 0x0B, 0x00, 0x05, 0x09, 0x0D, 0x0A, 0x06, 0x0E,
    0x02, 0x04, 0x03, 0x01, 0x03, 0x0A, 0x0E, 0x08, 0x01, 0x0B, 0x05, 0x04,
    0x02, 0x0F, 0x0D, 0x0C, 0x06, 0x07, 0x09, 0x00, 0x0C, 0x0D, 0x01, 0x0F,
    0x08, 0x0E, 0x05, 0x0B, 0x03, 0x0A, 0x09, 0x00, 0x07, 0x02, 0x04, 0x06,
    0x0D, 0x0A, 0x07, 0x0E, 0x01, 0x06, 0x0B, 0x08, 0x0F, 0x0C, 0x05, 0x02,
    0x03, 0x00, 0x04, 0x09, 0x03, 0x0E, 0x07, 0x05, 0x0B, 0x0F, 0x08, 0x0C,
    0x01, 0x0A, 0x04, 0x0D, 0x00, 0x06, 0x09, 0x02, 0x0B, 0x06, 0x09, 0x04,
    0x01, 0x08, 0x0A, 0x0D, 0x07, 0x0E, 0x00, 0x0C, 0x0F, 0x02, 0x03, 0x05,
    0x0C, 0x07, 0x08, 0x0D, 0x03, 0x0B, 0x00, 0x0E, 0x06, 0x0F, 0x09, 0x04,
    0x0A, 0x01, 0x05, 0x02, 0x0C, 0x06, 0x0D, 0x09, 0x0B, 0x00, 0x01, 0x02,
    0x0F, 0x07, 0x03, 0x04, 0x0A, 0x0E, 0x08, 0x05, 0x03, 0x06, 0x01, 0x05,
    0x0B, 0x0C, 0x08, 0x00, 0x0F, 0x0E, 0x09, 0x04, 0x07, 0x0A, 0x0D, 0x02,
    0x0A, 0x07, 0x0B, 0x0F, 0x02, 0x08, 0x00, 0x0D, 0x0E, 0x0C, 0x01, 0x06,
    0x09, 0x03, 0x05, 0x04, 0x0A, 0x0B, 0x0D, 0x04, 0x03, 0x08, 0x05, 0x09,
    0x01, 0x00, 0x0F, 0x0C, 0x07, 0x0E, 0x02, 0x06, 0x0B, 0x04, 0x0D, 0x0F,
    0x01, 0x06, 0x03, 0x0E, 0x07, 0x0A, 0x0C, 0x08, 0x09, 0x02, 0x05, 0x00,
    0x09, 0x06, 0x07, 0x00, 0x01, 0x0A, 0x0D, 0x02, 0x03, 0x0E, 0x0F, 0x0C,
    0x05, 0x0B, 0x04, 0x08, 0x0D, 0x0E, 0x05, 0x06, 0x01, 0x09, 0x08, 0x0C,
    0x02, 0x0F, 0x03, 0x07, 0x0B, 0x04, 0x00, 0x0A, 0x09, 0x0F, 0x04, 0x00,
    0x01, 0x06, 0x0A, 0x0E, 0x02, 0x03, 0x07, 0x0D, 0x05, 0x0B, 0x08, 0x0C,
    0x03, 0x0E, 0x01, 0x0A, 0x02, 0x0C, 0x08, 0x04, 0x0B, 0x07, 0x0D, 0x00,
    0x0F, 0x06, 0x09, 0x05, 0x07, 0x02, 0x0C, 0x06, 0x0A, 0x08, 0x0B, 0x00,
    0x0F, 0x04, 0x03, 0x0E, 0x09, 0x01, 0x0D, 0x05, 0x0C, 0x04, 0x05, 0x09,
    0x0A, 0x02, 0x08, 0x0D, 0x03, 0x0F, 0x01, 0x0E, 0x06, 0x07, 0x0B, 0x00,
    0x0A, 0x08, 0x0E, 0x0D, 0x09, 0x0F, 0x03, 0x00, 0x04, 0x06, 0x01, 0x0C,
    0x07, 0x0B, 0x02, 0x05, 0x03, 0x0C, 0x04, 0x0A, 0x02, 0x0F, 0x0D, 0x0E,
    0x07, 0x00, 0x05, 0x08, 0x01, 0x06, 0x0B, 0x09, 0x0A, 0x0C, 0x01, 0x00,
    0x09, 0x0E, 0x0D, 0x0B, 0x03, 0x07, 0x0F, 0x08, 0x05, 0x02, 0x04, 0x06,
    0x0E, 0x0A, 0x01, 0x08, 0x07, 0x06, 0x05, 0x0C, 0x02, 0x0F, 0x00, 0x0D,
    0x03, 0x0B, 0x04, 0x09, 0x03, 0x08, 0x0E, 0x00, 0x07, 0x09, 0x0F, 0x0C,
    0x01, 0x06, 0x0D, 0x02, 0x05, 0x0A, 0x0B, 0x04, 0x03, 0x0A, 0x0C, 0x04,
    0x0D, 0x0B, 0x09, 0x0E, 0x0F, 0x06, 0x01, 0x07, 0x02, 0x00, 0x05, 0x08
};

uint32_t cdkeys_instr(uint8_t *string, uint8_t find){
  uint8_t *location = strchr(string, toupper(find));
  return (location == NULL ? -1 : location - string);
}

/*******************************************************
 *Converts and ASCII strign of number into a long.
 *Used in Starcraft Key decoding.
 *******************************************************/
uint32_t cdkeys_strtol(uint8_t *number, uint32_t length, uint32_t base){
  uint8_t *temp = safe_malloc(length);
  memcpy(temp, number, length);
  temp[length] = 0;
  uint32_t ret = strtol(temp, NULL, base);
  free(temp);
  return ret;
}

BOOLEAN cdkeys_verifystarcraft(uint8_t *key){
  uint32_t sum = 3;
  uint32_t i = 0;
  if(strlen(key) != 13) return FALSE;
  for(i = 0; i < 12; i++)
    sum += (key[i] - '0') ^ (sum << 1);
  return (sum % 10 == key[12] - '0');
}
/*****************************************************************************
 *Reterives the Public, Private, and Product values from an 'old style'
 *Starcraft cdkey, AE: the 13-digit numerical key.
 *****************************************************************************/
BOOLEAN cdkeys_getstarcraftvalues(uint8_t *key, uint32_t *public_key, uint32_t *private_key, uint32_t *product){
  if(cdkeys_verifystarcraft(key) == FALSE) return FALSE;
  uint32_t hashkey = 0x13AC9741;
  uint8_t sequance[12] = {6, 0, 2, 9, 3, 11, 1, 7, 5, 4, 10, 8};
  uint8_t *temp_key = safe_malloc(13);
  int32_t c;
  for(c = 11; c >= 0; c--){
    if(key[sequance[c]] <= '7'){
  temp_key[c] = key[sequance[c]] ^ (uint8_t)(hashkey & 7);
  hashkey >>= 3;
}else
  temp_key[c] = key[sequance[c]] ^ (uint8_t)(c & 1);
  }
 
  *product     = cdkeys_strtol(temp_key,   2, 10);
  *public_key  = cdkeys_strtol(temp_key+2, 7, 10);
  *private_key = cdkeys_strtol(temp_key+9, 3, 10);
  free(temp_key);
  return (product != 0 && public_key != 0 && private_key != 0 ? TRUE : FALSE);
}

BOOLEAN cdkeys_verifydiablo(uint8_t *key, uint8_t **decoded){
  if(strlen(key) != 16) return FALSE;
  uint8_t *temp_key = safe_malloc(16);
  uint8_t i;
  uint32_t n = 0;
  uint32_t checksum = 0;
  uint32_t r = 1;

  for(i = 0; i < 16; i +=2){
    n = (cdkeys_instr(orig_key, key[i + 1]) + (cdkeys_instr(orig_key, key[i])  * 24));
if(n >= 0x100){
  n -= 0x100;
  checksum |= r;
}
r <<= 1;
temp_key[i] = hexvalue(n >> 4);
temp_key[i + 1] = hexvalue(n);
  } 
  n = 3;
  for(i = 0; i < 16; i++)
    n += numvalue(temp_key[i]) ^ n * 2;
 
  if((n & 0xFF) != checksum){
    free(temp_key);
    return FALSE;
  }
 
  if(decoded != NULL) *decoded = temp_key;
  else free(temp_key);
 
  return TRUE;
}

BOOLEAN cdkeys_getdiablovalues(uint8_t *key, uint32_t *public_key, uint32_t *private_key, uint32_t *product){
  uint8_t *temp_key = safe_malloc(16);
  if(cdkeys_verifydiablo(key, &temp_key) == FALSE){
    free(temp_key);
    return FALSE;
  }
  uint32_t hashkey = 0x13AC9741;
  uint16_t i;
  uint8_t n;
  uint8_t c;
 
  for(i = 15; i < 16; i--){
    n = (i > 8 ? i - 9 : 7 + i);
c = temp_key[n];
temp_key[n] = temp_key[i];
temp_key[i] = c;
  }
 
  for(i = 15; i < 16; i--){
    if(temp_key[i] <= '7'){
  temp_key[i] ^= (hashkey & 7);
  hashkey >>= 3;
}else if(temp_key[i] < 'A')
  temp_key[i] ^= (i & 1);
  }
 
  *product     = cdkeys_strtol(temp_key,   2, 16);
  *public_key  = cdkeys_strtol(temp_key+2, 6, 16);
  *private_key = cdkeys_strtol(temp_key+8, 8, 16);
 
  free(temp_key);
  return ((product != 0) && (public_key != 0) && (private_key != 0));
}

BOOLEAN cdkeys_getwarcraftvalues(uint8_t *key, uint32_t *public_key, uint32_t *private_key, uint32_t *product){
  uint8_t *table = safe_malloc(52);
  uint32_t *values = safe_malloc(16);
  uint32_t c = 0;
  uint8_t d = 0;
  uint64_t e;
  uint32_t f = 30;
  uint32_t g;
  uint32_t h;
 
  for(c = 0; c < 26; c++){
d = cdkeys_instr(war3_key, toupper(key[c]));
table[f] = (d / 5);
f = (f + 49) % 52;
table[f] = (d % 5);
f = (f + 49) % 52;
  }
 
  for(c = 51; c < 52; c--){
    for(d = 3; d < 4; d--){
  e = (uint64_t)values[d] * 5;
  values[d] = table[c] + (uint32_t)e;
  table[c] = (uint8_t)(e >> 32);
}
  }
 
  f = 24;
  d = 2;
  for(c = 0x1D0; c < 0x1D1; c -= 0x10){
f = (f + 28) % 32;
g = (values[d / 8] & (0x0F << f)) >> f;
h = 24;
for(e = 29; e < 30; e--){
  h = (h + 28) % 32;
  if(e != (c / 0x10))
    g = TranslateTable[((values[3 - (e >> 3)] & (0x0F << h)) >> h) ^ TranslateTable[g + c] + c];
}
values[d / 8] = ((TranslateTable[g + c] & 0x0F) << f) | ~(0x0F << f) & values[d / 8];
d++;
  }
  uint32_t eax, ecx, edx;
  uint32_t location;
  e = 0;
  for(c = 0; c < 120; c++){
    eax = c & 0x1F;
ecx = e & 0x1F;
edx = 3 - (edi >> 5);

location = 12 - ((e >> 5) << 2);
ebp = values[location / 4];
ebp = (ebp & (1 << ecx)) >> ecx;
values[edx] = ((ebp & 1) << eax) | (~(1 << eax) & values[edx]);
printf("%08X %08X %08X %08X\n", values[0], values[1], values[2], values[3]);
e = (e + 11) % 120;
  }
  /*for(edi = 0; edi < 120; edi++)
    {
      eax = edi & 0x1F;
      ecx = esi & 0x1F;
      edx = 3 - (edi >>> 5);
     
      int location = 12 - ((esi >>> 5) << 2);
      ebp = IntFromByteArray.LITTLEENDIAN.getInteger(Copy, location);
     
      ebp = (ebp & (1 << ecx)) >>> ecx;
      keyTable[edx] = ((ebp & 1) << eax) | (~(1 << eax) & keyTable[edx]);
  esi = (esi + 11) % 120;
  System.out.format("%03d %d %08X %08X %08X %08X %08X\n", location, edx, ebp, keyTable[0], keyTable[1], keyTable[2], keyTable[3]);
    }
*/


 
  for(c = 0; c < 4; c++){
    printf("%08X ", values[c]);
  }
}

#endif
once I get it finished I will clean it up, I'm going to clean code, and willing to sacrifice a bit of effiancy to do it. So please don't complain to me about it.

55
General Programming / Re: Check this please
« on: November 02, 2008, 01:52:54 am »
Ya, I noticed that, i'm trying to figure out what makes it diffrent form this:
Code: [Select]
while(rounds-- > 0){
  long param1 = bufA[posA--] & 0x00000000FFFFFFFFl;
  long param2 = mulx & 0x00000000FFFFFFFFl;
  long edxeax = param1 * param2;
      bufB[posB--] = decodedByte + (int)edxeax;
  System.out.println(decodedByte + " " + edxeax);
      decodedByte = (int)(edxeax >> 32);
    }
Code: [Select]
m 00000000 00000000 00000000 00000001
2 5
0 0
0 0
0 0
m 00000000 00000000 00000000 00000007
God damnet
32-bit ints != 64-bit ints

56
General Programming / Check this please
« on: November 02, 2008, 01:44:37 am »
Code: [Select]
    System.out.format("M %08X %08X %08X %08X\n", buf[0], buf[1], buf[2], buf[3]);
    for(int x = 3; x > -1; x--){
  int y = buf[x] * 5;
  System.out.println(buf[x] * 5);
      buf[x] = decodedByte + y;
      decodedByte = y;
}
System.out.format("M %08X %08X %08X %08X\n", buf[0], buf[1], buf[2], buf[3]);
decodedByte starts at 2;
Code: [Select]
M 00000000 00000000 00000000 00000001
5
0
0
0
M 00000000 00000000 00000005 00000007
WHY THE HELL is the 3rd int being set to 5?


57
General Programming / Re: 3d Tracking
« on: October 23, 2008, 01:53:32 pm »
I've done work with Sonar/IR before, But no I have never developed something like this before. Which is why i've asked here for ideas. I would like to get my own implementation of it working before I go look at someone elses solution. No I don't have the specific equipment i'd need right now. Except for if I did it using IR. But meh. Its all in the planning/thinking stage right now. Once I get a solid idea backedup with a bit of research i'll get to work on the physical thing.

I'll look more into RF once my boss has left the building. Looks promising sofar except for the refractions.

58
General Programming / Re: 3d Tracking
« on: October 23, 2008, 11:42:35 am »
Well the reason I was going with IR is simply because I am also working with IR in another project. So I have a shitload of transmitters/receivers, But RF you say.  Hows RF work? Can you give me some links. Does it pass through objects/walls. If so how much degradation does it receive? I ment to do more research last night, but I passed out after about 15 mins of playing Guild wars :X

59
General Programming / Re: 3d Tracking
« on: October 22, 2008, 10:25:59 pm »
I was thinking about that. I will be writing a 2d point tracking system for another part of this project, I was thinking I could incorporate that into the 3d one as well. To make things easier, I'm sure there are cameras out there that will only pickup certain types of light. I'll have to look into it more when i get home.

60
General Programming / Re: 3d Tracking
« on: October 22, 2008, 09:22:53 pm »
Assume i'm sphyrical.
Well, what i'm figuring is having the emitter on the person, and the receiver simply listening for the broadcast. I *could* transmit the timestamps in the IR light, but, there is no guarantee that both, let alone all 5, things have the exact same time. If there was only a way to get around that it would be simple. Well, I can guarantee that the receivers have the same time, as they could easily be 1 unit. And don't you need a 4th to figure Z?
Oh, ya you're right, Light is ridiculously fast, to fast for any accurate timer at this low of a distance. God damnit, now I have to find a place that will allow me to play with sound emitters/receivers. AND figure out a way to send data over sound.

Pages: 1 2 3 [4] 5 6 ... 21