// encrypt wordlists for ScienoSitter/CYBERsitter -- by Cornelius Krasel // decryption was by Bobban / DFR Research & Engineering // from http://fravia.org/saruma1.htm - thanks guys // #include #include typedef unsigned long ulong; typedef unsigned char byte; ulong key = 0xDEADL; void encrypt_line(char *inbuff, char *outbuff) { int in_count , out_count , len; byte c,ch1,ch2; ulong subkey1,subkey2; len = strlen(inbuff); in_count = 0; out_count = 0; for (in_count = 0; in_count < len ; in_count++) { c = *(inbuff + in_count); ch1 = c & 0x0f; ch2 = c & 0xf0; subkey1 = key; subkey1 = (subkey1 >> 4) & 0x1fL; subkey2 = key; subkey2 = (subkey2 >> 8) & 0x1fL; ch2 = (ch2 >> 4) | 0x60; ch2 ^= subkey2; ch1 ^= subkey1 ; ch1 |= 0x30; if (( ch2 & 0x01 ) == 0 ) // if ch2 is even ch1 &= 0x2F ; else ch1 &= 0x3F ; outbuff[out_count] = ch1; ++out_count; outbuff[out_count] = ch2; ++out_count; key += 0x100L - (ulong)c; } outbuff[out_count] = 0; } int readit(char *inbuff,FILE *infile) { int count, c; count = 0; for (;;) { c = fgetc(infile); if (c < 0) { if (count == 0) return(0); break; } if (c == '\n' || c == '\r') { if (count == 0) continue; break; } *inbuff++ = c; count++; } *inbuff = 0; return(1); } int main (void) { FILE *infile; char inbuff[400]; char outbuff[800]; infile = stdin; while(readit(inbuff,infile)) { encrypt_line(inbuff,outbuff); printf("%s\n",outbuff); } close(infile); return 0; }