Post a video on YouTube and it will be featured here!
Do you have a brand new device you want me to hack?
Send it to me!
Are you producing a device and want me to check it's security?
Send me an email!
As of now more than 3500 people unlocked Huawei E585, E5830,
E5832S, E583C and HW-01C successfully!

Saturday, May 2, 2015

Samsung SSD firmware encoder/decoder.

Here is a little program that can
obfuscate and deobfuscate
Samsung SSD firmware files.

I'm against obfuscation because it's
a stupid malpractice aimed only
to keep off unliterate people.

Use as you please and drop me a comment/email
if it was useful to you.

Donations are welcome.

#include <stdio.h>
#define HI_NIBBLE(b) (((b) >> 4) & 0x0F)
#define LO_NIBBLE(b) ((b) & 0x0F)

FILE *infile;
FILE *infile2;
FILE *outfile;
int i, j, t;

char table[2][16] = {
  {0x1, 0x3, 0x5, 0x7, 0x9, 0xb, 0xd, 0xf, 0xe, 0xc, 0xa, 0x8, 0x6, 0x4, 0x2, 0x0},
  {0xf, 0x0, 0xe, 0x1, 0xd, 0x2, 0xc, 0x3, 0xb, 0x4, 0xa, 0x5, 0x9, 0x6, 0x8, 0x7}

main (int argc, char *argv[])
  if (argc <= 3)
    printf ("Usage: %s enc/dec infile outfile\n", argv[0]);
      infile = fopen (argv[2], "r");
      outfile = fopen (argv[3], "w");
      while (1)
   i = fgetc (infile);
   if (feof (infile))
   if (strcmp (argv[1], "enc") == 0)
       t = 0;
   else if (strcmp (argv[1], "dec") == 0)
       t = 1;
     printf ("Usage: %s enc/dec infile outfile\n", argv[0]);

   j = ((table[t][HI_NIBBLE (i)]) << 4) | LO_NIBBLE (i);
   fputc (j, outfile);
      fclose (infile);
      fclose (outfile);
      return 0;