Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 29 Aug 2011 08:12:36 -0400
From: David Jones <jonesd@...umbus.rr.com>
To: john-dev@...ts.openwall.com
Cc: David Jones <jonesd@...umbus.rr.com>
Subject: Patch for dynamically loaded formats

I made a modification that allows JtR to load a format module from a user specified dynamic library.  The format can be specified on the command line as --dynamic-fmt=dll_name or in the configuration file with a similar option name.  The feature would mean kits for add on or experimental hashes wouldn't require edits to john source and be less dependent on the version
(as long as the fmt_main structure remains unchanged)

I'm still working on cleaning up the kit for demonstrating the feature (an updated OpenVMS module with mixed-case support).  The only piece needed to be added is a FMT_LOADER() function:

struct fmt_main *FMT_LOADER ( int version )
{
    /*
     * Only allow the load if caller's version matches the one we were
     * compiled with.
     */
    if ( version == FMT_MAIN_VERSION ) return &fmt_VMS;

    fprintf (stderr, "Failed to activate %s format due to version mismatch.\n",
	fmt_VMS.params.label );
    fprintf (stderr,"   requested version: %d, supported by DLL: %d\n",
	version, FMT_MAIN_VERSION );

    return 0;
}




[ CONTENT OF TYPE application/octet-stream SKIPPED ]

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ