Skip to main content

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;


  1. The above script produces only 6 bit long file containing word "".
    (the source file was DSRD.ENC, 129 bytes.
    Where is the problem?

  2. hmm probably is a new type of file... with old ones (so far tested) it works.


Post a Comment

Popular posts from this blog

Powerline Ethernet fun and secrets.

Many 200 Mb/s powerline adapters nowadays are based on the INTELLON 6300 chipset. Despite what can be thought looking at them, they are all using the same hardware and firmwares. I heard many people with Netgear XAV101 or Linksys PLK 200 or PLE 200 having problems after firmware updates and many other people with other brands having much more problems because of lack of support or configuration/upgrade utilities. So let me explain a few things I learnt studying them. Many of 200 Mb/s powerline ethernet adapters follow the "HomePlug AV" standard. (85 Mb adapters use HomePlug 1.0 standard which is completely different). This standard uses ethernet broadcast packets using the HomePlug AV protocol. The interesting thing is that their firmware is made of two different parts: a .PIB file (Parameter Information Block) and a .NVM file (the code itself). In the P.I.B. there are many interesting things: The branding (mac address, device name, etc) and the tone map. I test

TP-LINK Configuration file encrypt and decrypt.

Here we go! TP-Link is another company that thinks that security by obscurity could ever work. If you "backup" the configuration from most TP-Link routers, you will get a .BIN file which is "encrypted". Use this utility below, to decrypt it (so you can edit it) and encrypt it again. Have fun. Drop files here or

Huawei E585 Unlock download!

Here is the unlocker for you to download! Highlights: 1) very fast (2-3 seconds) 2) Compatible with Xp, Vista and Win7 3) easy to use. Instructions: Download the program. Run the program. Donate via paypal and PASTE the  confirmation number  of your donation. The transaction id should work after a minute from your donation. Donate using the window opened by the program. The code will work only on the PC you run the program. This program works only with Huawei E585. Send me an email if you need an unlimited version. (Unlimited number of unlocks) Note: If the program says "Connect card." that means that E585 drivers are not installed correctly. Remove any "wifi manager" and old drivers, then reinstall E585 drivers from it's virtual cdrom. Please be sure that you have run "autorun.exe" which should have appeared in a pop-up window when you first inserted the Mifi.  This is required to install all the drivers that are needed for the modificatio