If you have modified our software and would like to submit or otherwise distribute a patch for others to use, please use the following command on a Unix-like system (or on Cygwin if you use Windows) to generate the patch file:
TZ=UTC diff -urpN NAME-VERSION.orig NAME-VERSION > NAME-VERSION-WHAT-REVISION.diff
For example, revision 12 of the jumbo patch 1.7.2 was generated with:
TZ=UTC diff -urpN john-1.7.2.orig john-1.7.2 > john-1.7.2-all-12.diff
gzip -9 john-1.7.2-all-12.diff
Or, to have it on one single line:
TZ=UTC diff -urpN john-1.7.2.orig john-1.7.2 | gzip -c9 > john-1.7.2-all-12.diff.gz
For a new patch, or a patch to a new version of the software, use revision 1. This will help us track any updates to the patch that we or you might make later.
If you intend to send a patch by e-mail, or especially to post it to one of our mailing lists , please leave it uncompressed (as long as the patch is smaller than, say, 50 KB) and attach it to the message, with
text/plain
, text/x-patch
, or text/x-diff
as the MIMEContent-Type. This makes the patch visible in web-based archives of the mailing lists, as well as makes it easier to quote and comment on it in any follow-ups.Patches for John the Ripper may also be uploaded to the proper wiki page, and then you may post the wiki URL to john-users. Whatever way you choose to share your code with the community, please make sure you're licensing your code properly.
When re-generating patches to apply additional changes, the existing patches should be applied with
patch -Z
, for example like this:cd NAME-VERSION
patch -p1 -Z < ../NAME-VERSION-WHAT-REVISION.diff
The use of timestamps in UTC lets us better preserve them over patch file updates and reduces the amount of changes between revisions, which makes it easier to review any changes.
Please remember to format your code properly:
indent -kr -i8 -nlp -nbbo -l79 -lc79