I have a script in C, which is able to determine the password of certain data. It uses HMAC and RC4 algorithms to encrypt the given password and then compares that later to the given data. If they are the same, the given password was the original one.

Now I want to implement this method into a John Module to use their speed and environment for dictionaries etc.

I've already read the format.h and some other modules, but I'm still a little overwhelmed where to start.

Could someone give me an outline on what or how I need to write and implement my own John Module?

Update: I've found a fmt_plug file that could fit my needs: This one. But now I'm stuck at the next step. How does John reads the files. It seems like most formats use different formatted files with either a username and/or a salt and always a hash of course. But I cannot find any declaration how the file should be read inside the fmt_plug.c files.

I was thinking about formatting my files with $fmt_name$username#hash1#hash2, because I need to split the hash in 2 parts to use some algorithms on the different parts.

How would I tell John how to read my files?

  • Welcome to this website. Nice job you are doing but your question is really too broad to answer, I think.
    – user45139
    Aug 5, 2015 at 9:54
  • @begueradj Thank you. Why do you think it's too broad? I guess the way of writing a John Module should be more or less the same for different modules. I've already figured out that you need the crypt_all, cmp_all functions etc. to get the module running. But I don't really know where to start or how to implement them in the right way.
    – Thanathan
    Aug 5, 2015 at 9:57
  • A script in C? I think your question belongs to stackoverflow. Aug 5, 2015 at 11:40
  • @KonradGajewski not really since the main part of my question isn't about the script (which works just fine), but on how to write modules for John. Or at least a guideline how I can achieve that.
    – Thanathan
    Aug 5, 2015 at 11:42
  • I agree that we normally close "where do I begin?" type questions for being too broad, but since this is specifically about John, security.SE is probably the right community for the question. (unless John has its own forum) Aug 5, 2015 at 14:46

1 Answer 1


John The Ripper seems to welcome external contribution especially through their "Jumbo" aka "community enhanced" version of the software instead of the mainstream one.

It is described as having a lower quality standard, but easier for patch integration allowing more people to integrate new modules in a more convenient way which, I think, is precisely what you are looking for.

You should start from there. It contains already a bunch (a hundred according to the main site !) of modules you can take as sample, a page with patch-related documentation, and in case all this is not sufficient advice you to get in touch with the John mailing list for even more help.

  • Well in the official wiki, there's not much more help than: "look at formats.h and implement those functions." So some more help or a guidance would be nice.
    – Thanathan
    Aug 5, 2015 at 14:24
  • @Thanathan Have you tried to start from some of the hopefully easier to understand modules, like the MD5 one? It should give you a better view what function are being used for which purpose, etc. You will also see that, while this modules indeed redefines all "extern" functions from formats.h, a lot of them are actually dummy empty methods because they are most probably only needed in some specific scenarios (or in other words, if you don't know or understand their usage, it is most probably because you don't need them for your project). Aug 5, 2015 at 14:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .