diff options
Diffstat (limited to '')
-rw-r--r-- | src/options.c | 53 |
1 files changed, 43 insertions, 10 deletions
diff --git a/src/options.c b/src/options.c index 95050db..c855d0e 100644 --- a/src/options.c +++ b/src/options.c @@ -42,6 +42,8 @@ int nwipe_options_parse( int argc, char** argv ) extern nwipe_prng_t nwipe_twister; extern nwipe_prng_t nwipe_isaac; extern nwipe_prng_t nwipe_isaac64; + extern nwipe_prng_t nwipe_add_lagg_fibonacci_prng; + extern nwipe_prng_t nwipe_xoroshiro256_prng; /* The getopt() result holder. */ int nwipe_opt; @@ -127,8 +129,9 @@ int nwipe_options_parse( int argc, char** argv ) /* Set default options. */ nwipe_options.autonuke = 0; nwipe_options.autopoweroff = 0; - nwipe_options.method = &nwipe_dodshort; - nwipe_options.prng = ( sizeof( unsigned long int ) >= 8 ) ? &nwipe_isaac64 : &nwipe_isaac; + nwipe_options.method = &nwipe_random; + nwipe_options.prng = + ( sizeof( unsigned long int ) >= 8 ) ? &nwipe_xoroshiro256_prng : &nwipe_add_lagg_fibonacci_prng; nwipe_options.rounds = 1; nwipe_options.noblank = 0; nwipe_options.nousb = 0; @@ -490,6 +493,16 @@ int nwipe_options_parse( int argc, char** argv ) nwipe_options.prng = &nwipe_isaac64; break; } + if( strcmp( optarg, "add_lagg_fibonacci_prng" ) == 0 ) + { + nwipe_options.prng = &nwipe_add_lagg_fibonacci_prng; + break; + } + if( strcmp( optarg, "xoroshiro256_prng" ) == 0 ) + { + nwipe_options.prng = &nwipe_xoroshiro256_prng; + break; + } /* Else we do not know this PRNG. */ fprintf( stderr, "Error: Unknown prng '%s'.\n", optarg ); @@ -539,6 +552,8 @@ void nwipe_options_log( void ) extern nwipe_prng_t nwipe_twister; extern nwipe_prng_t nwipe_isaac; extern nwipe_prng_t nwipe_isaac64; + extern nwipe_prng_t nwipe_add_lagg_fibonacci_prng; + extern nwipe_prng_t nwipe_xoroshiro256_prng; /** * Prints a manifest of options to the log. @@ -592,19 +607,33 @@ void nwipe_options_log( void ) } else { - if( nwipe_options.prng == &nwipe_isaac ) + if( nwipe_options.prng == &nwipe_add_lagg_fibonacci_prng ) { - nwipe_log( NWIPE_LOG_NOTICE, " prng = Isaac" ); + nwipe_log( NWIPE_LOG_NOTICE, " prng = Lagged Fibonacci generator (EXPERIMENTAL!)" ); } else { - if( nwipe_options.prng == &nwipe_isaac64 ) + if( nwipe_options.prng == &nwipe_xoroshiro256_prng ) { - nwipe_log( NWIPE_LOG_NOTICE, " prng = Isaac64" ); + nwipe_log( NWIPE_LOG_NOTICE, " prng = XORoshiro-256 (EXPERIMENTAL!)" ); } else { - nwipe_log( NWIPE_LOG_NOTICE, " prng = Undefined" ); + if( nwipe_options.prng == &nwipe_isaac ) + { + nwipe_log( NWIPE_LOG_NOTICE, " prng = Isaac" ); + } + else + { + if( nwipe_options.prng == &nwipe_isaac64 ) + { + nwipe_log( NWIPE_LOG_NOTICE, " prng = Isaac64" ); + } + else + { + nwipe_log( NWIPE_LOG_NOTICE, " prng = Undefined" ); + } + } } } } @@ -666,7 +695,10 @@ void display_help() puts( " (default: last)" ); puts( " off - Do not verify" ); puts( " last - Verify after the last pass" ); - puts( " all - Verify every pass\n" ); + puts( " all - Verify every pass" ); + puts( " " ); + puts( " Please mind that HMG IS5 enhanced always verifies the" ); + puts( " last (PRNG) pass regardless of this option.\n" ); puts( " -m, --method=METHOD The wiping method. See man page for more details." ); puts( " (default: dodshort)" ); puts( " dod522022m / dod - 7 pass DOD 5220.22-M method" ); @@ -677,11 +709,12 @@ void display_help() puts( " zero / quick - Overwrite with zeros" ); puts( " one - Overwrite with ones (0xFF)" ); puts( " verify_zero - Verifies disk is zero filled" ); - puts( " verify_one - Verifies disk is 0xFF filled\n" ); + puts( " verify_one - Verifies disk is 0xFF filled" ); + puts( " is5enh - HMG IS5 enhanced\n" ); puts( " -l, --logfile=FILE Filename to log to. Default is STDOUT\n" ); puts( " -P, --PDFreportpath=PATH Path to write PDF reports to. Default is \".\"" ); puts( " If set to \"noPDF\" no PDF reports are written.\n" ); - puts( " -p, --prng=METHOD PRNG option (mersenne|twister|isaac|isaac64)\n" ); + puts( " -p, --prng=METHOD PRNG option (mersenne|twister|isaac|isaac64|add_lagg_fibonacci_prng)\n" ); puts( " -q, --quiet Anonymize logs and the GUI by removing unique data, i.e." ); puts( " serial numbers, LU WWN Device ID, and SMBIOS/DMI data" ); puts( " XXXXXX = S/N exists, ????? = S/N not obtainable\n" ); |