PDA

View Full Version : Need help on HASP seeds & return codes


cah
September 27th, 2001, 23:17
How to find Seed codes & 4 return codes, if I have hasp dongle data like passwords, Id & memory contents.

Any tutor or help on this regard.

cah...

MeteO
October 11th, 2001, 19:40
/**************************************************************************
*
* This code is only for demo and educational use!
*
* The HASP(R)codegenerator and its documentation are copyrighted by //UCL.
* All rights reserved.
*
* This is *complete* HASP seed code generator for NetHASP(TM), MacHASP(TM),
* DataHASP(TM), TimeHASP(TM), SerialHASP(TM), HASP36(TM), MemoHASP36(TM),
* NetHASP36(TM), OpenHASP(TM), HASPCard(TM) of Aladdin Knowledge Systems Ltd.
*
* (c)1998 by MeteO, Fixit
* e-mail us: meteo@null.net
* admin@fixit.spb.ru
*************************************************************************/

#include <stdio.h>

long pwd;
char al_buf[8];
static unsigned char ch[10];
unsigned int tab[64];
unsigned int seed,j,k;

HASP_rows[8][8]={
{0,0,0,0,0,0,0,0},
{0,1,0,1,0,1,0,1},
{1,0,1,0,1,0,1,0},
{0,0,1,1,0,0,1,1},
{1,1,0,0,1,1,0,0},
{0,0,0,0,1,1,1,1},
{1,1,1,1,0,0,0,0},
{1,1,1,1,1,1,1,1}
};

/***************************************
The table is represented as triads
***************************************/

void xor_pwd(void)
{
int i;

pwd^=0x09071966; /* Guess, whose birthday.. */

for(i=0;i<8;i++)
{
al_buf[I]= pwd & 7;
pwd = pwd >> 3;
}
};

/***************************************
Main function (HASP_seed)
Original code by bajunny
****************************************/

void emulate_func2( unsigned short seed)
{
int i, j;

for(i=0;i<8;i++)
{
ch[I] = 0;
for(j=0;j<8;j++)
{
seed *= 0x1989;
seed += 5;
ch[I] |= (tab[(seed>>9)&0x3f]) << (7-j);
}
}
}

void main(void)
{
int i;
printf("\nInput 1st HASP password:";
scanf("%4X",(int*) &j);
printf("Input 2nd HASP password:";
scanf("%4X",(int*) &k);

pwd=(long) k*0x10000+j;
printf("\nInput HASP seedcode:";
scanf("%x", (int*) &seed);

xor_pwd();

/************************************
Compute universal secret table
*************************************/

for(i=0;i<8;i++){
for(j=0;j<8;j++){tab[i+j*8]=HASP_rows[al_buf[I]][j];}
}

for(i=0;i<8;i++){
for(j=0;j<8;j++){printf("%1.1d",tab[i*8+j]);}
printf("\n";
}

emulate_func2(seed);

for(i=0;i<4;i++)
{printf("%2.2X%2.2X ", ch[i*2+1],ch[i*2]);}

}

// ------------- end of transmission -----------------

cah
October 11th, 2001, 23:43
Hayya, Mr. MeteO

Many thanks for your help & reply.
Can you help me, How to make hasp dongle emulator for particular flavour of hasp data. I hope you are very expert in this area. Please help me
cah...

MeteO
October 12th, 2001, 04:02
See attach.

cah
October 14th, 2001, 11:16
Many many thanks. I trying to complie it. I have doubts for asm compile. Already I sent personal mail to you. Please help me. I hope you will help me or give me make file

cah...