25 Commits
v0.31 ... v0.32

Author SHA1 Message Date
PartialVolume
154490e56f Merge pull request #347 from PartialVolume/update_ready_for_0.32_release
Update files for 0.32 release
2021-10-28 23:40:29 +01:00
PartialVolume
753e758b0a Update files for 0.32 release
Confirmed the following release files were/are updated.
configure.ac
CHANGELOG.md
nwipe.1
version.c
2021-10-28 23:34:46 +01:00
PartialVolume
7d58587eb0 Merge pull request #346 from PartialVolume/update_readme_with_new_ones_wipe_and_verification
Update README.md with new wipe methods
2021-10-28 22:18:14 +01:00
PartialVolume
996c6cbf02 Update README.md with new wipe methods
Updated with Ones wipe & Ones verification.
2021-10-28 22:16:37 +01:00
PartialVolume
7eba0aeb1b Merge pull request #345 from PartialVolume/add_verify_ones
Add ones (0xFF) verification method.
2021-10-28 21:55:50 +01:00
PartialVolume
a379329fca Add ones (0xFF) verification method. 2021-10-28 21:50:19 +01:00
PartialVolume
9196e7748b Merge pull request #344 from PartialVolume/update_help_and_man_pages_for_zeros_ones
Update help, man and options for the ones method
2021-10-28 10:46:56 +01:00
PartialVolume
f7730b9fea Update ones method, help, man and options 2021-10-28 10:44:09 +01:00
PartialVolume
bcb34f7a83 Merge pull request #343 from PartialVolume/Adjust_info_for_max_80_columns
Adjust method info for 80+ column display
2021-10-28 00:40:27 +01:00
PartialVolume
a8dbbd46ec Adjust method info for 80+ column display 2021-10-28 00:36:53 +01:00
PartialVolume
7a3f2f573f Merge pull request #342 from PartialVolume/add_wipe_with_ones_method
Add ones 0xFF method.
2021-10-27 23:42:15 +01:00
PartialVolume
8336653926 Add ones 0xFF method. 2021-10-27 23:40:30 +01:00
PartialVolume
e629d9b2d1 Merge pull request #341 from PartialVolume/Remove_syslinux.cfg_lines
Remove the old syslinux configuration hints.

Help on nwipe options is available from the command
line nwipe --help or man help.
2021-10-27 22:30:58 +01:00
PartialVolume
70c5383d97 Remove the old syslinux configuration hints.
Help on nwipe options is available from the command
line nwipe --help or man help.
2021-10-27 22:22:15 +01:00
PartialVolume
708c4e02c8 Merge pull request #340 from PartialVolume/Move_method_info
Move the method description
2021-10-27 21:12:16 +01:00
PartialVolume
8fcb314ed4 Move the method description
Move the method description to the right hand side
of the list of methods. This allows us to extend the
list of methods so that the info doesn't fall of the
terminal on a 80x24 system that is using the frame
buffer such as shredos.

Also updated the information, making it more
description in terms of describing the passes used
for each method.
2021-10-27 21:07:32 +01:00
PartialVolume
6497b43518 Merge pull request #339 from PartialVolume/add_fdata_sync_errors_to_summary_table
Add fdatasync errors to error summary table
2021-10-27 10:17:15 +01:00
PartialVolume
e6e6ed1e30 Add fdatasync errors to error summary table 2021-10-27 09:55:33 +01:00
PartialVolume
c821f3176b Merge pull request #337 from PartialVolume/change_color_theme
Toggle between dark/blank/default screens
2021-10-26 02:09:18 +01:00
PartialVolume
9db8ad854e Toggle between dark/blank/default screens
Using the 'b' key you can now toggle between
dark/blank/default screens during a wipe.

Added the dark option to prevent TFT/LCD image
persistence.

See:
https://en.wikipedia.org/wiki/Image_persistence
2021-10-26 02:03:58 +01:00
PartialVolume
6ce785c2f2 Update and rename ci_ubuntu_16.04.yml to ci_ubuntu_18.04.yml 2021-10-26 01:46:59 +01:00
PartialVolume
cb08dda2de Update README.md with distro info 2021-06-15 23:57:34 +01:00
PartialVolume
2fb882084d Update README.md 2021-06-15 13:36:47 +01:00
PartialVolume
64caac4b16 Update README.md 2021-06-15 13:30:15 +01:00
PartialVolume
47e523cf34 Update nwipe.1 with correct default sync rate 2021-06-08 23:25:17 +01:00
14 changed files with 429 additions and 243 deletions

View File

@@ -1,11 +1,11 @@
name: ci_ubuntu_16.04
name: ci_ubuntu_18.04
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-16.04
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1

View File

@@ -1,6 +1,15 @@
RELEASE NOTES
=============
v0.32
-----------------------
- Add ones (0xFF) wipe to the methods. Renamed Zero Fill to Fill with Zeros and the new ones wipe, is called Fill with Ones.
- Add ones verication to the methods. Renamed Verify Blank to Verify Zeros (0x00) and the new verification is called Verify Ones (0xFF).
- Move method information from below the list of methods to the right of the method list. This allows better use of the screen space by allowing more methods to be added to the list, especially relevant to nwipe running as a standalone application on small distros such as shredos 2020 in frame buffer mode.
- Removed the old DBAN syslinux.cfg configuration hints as not relevant to nwipe. See nwipe --help or man nwipe for command line options.
- Add fdatasync errors to the error summary table.
- During a wipe, you can now toggle between dark screen, blank screen and default blue screen by repeatedly pressing the b key. Dark screen, which is grey text on black background has been introduced to prevent TFT/LCD image persistence on monitors that are sensitive to that issue.
v0.31
-----------------------
- Blanking disabled in GUI for OPS2 (mandatory requirement of standard). [#326](https://github.com/martijnvanbrummelen/nwipe/pull/326)

View File

@@ -9,13 +9,15 @@ disks simultaneously. Nwipe can be found in many Linux distro repositories and t
The user can select from a variety of recognised secure erase methods which include:
* Zero Fill - Fills the device with zeros, one round only.
* Fill With Zeros - Fills the device with zeros (0x00), one round only.
* Fill With Ones - Fills the device with ones (0xFF), one round only.
* RCMP TSSIT OPS-II - Royal Candian Mounted Police Technical Security Standard, OPS-II
* DoD Short - The American Department of Defense 5220.22-M short 3 pass wipe (passes 1, 2 & 7).
* DoD 5220.22M - The American Department of Defense 5220.22-M full 7 pass wipe.
* Gutmann Wipe - Peter Gutmann's method (Secure Deletion of Data from Magnetic and Solid-State Memory).
* PRNG Stream - Fills the device with a stream from the PRNG.
* Verify only - This method only reads the device and checks that it is all zero.
* Verify Zeros - This method only reads the device and checks that it is filled with zeros (0x00).
* Verify Ones - This method only reads the device and checks that it is filled with ones (0xFF).
* HMG IS5 enhanced - Secure Sanitisation of Protectively Marked Information or Sensitive Information
It also includes the following pseudo random number generators:
@@ -24,7 +26,7 @@ It also includes the following pseudo random number generators:
It is a fork of the dwipe command used by
Darik's Boot and Nuke (dban). nwipe is included with [partedmagic](https://partedmagic.com), [SystemRescueCD](https://www.system-rescue.org), [gparted live](https://sourceforge.net/projects/gparted/files/gparted-live-testing/1.2.0-2/) and
[ShredOS](https://github.com/nadenislamarre/shredos)/[ShredOS 2020](https://github.com/PartialVolume/shredos.2020.02) if you want a quick and easy, bootable CD or USB version. If you want a bootable version of the very latest nwipe master that you can write to a USB stick, see [quick and easy bootable version of nwipe master](https://github.com/martijnvanbrummelen/nwipe#quick--easy-usb-bootable-version-of-nwipe-master-for-x86_64-systems)
[ShredOS 2020](https://github.com/PartialVolume/shredos.2020.02) ShredOS 2020 was developed in particular to showcase nwipe as a fast to boot standalone method similar to DBAN Available in the following architectures x86_64 and i686 (32 bit), with the following formats .iso for CD-R/DVD-R and .img for USB flash drive version and in both legacy bios and UEFI boot. If you want a bootable version of the very latest nwipe master that you can write to a USB flash memory or CD/DVD, see [quick and easy bootable version of nwipe master](https://github.com/martijnvanbrummelen/nwipe#quick--easy-usb-bootable-version-of-nwipe-master-for-x86_64-systems)
Nwipe was created out of a need to run the DBAN dwipe command outside
of DBAN, in order to allow its use with any host distribution, thus
@@ -189,6 +191,15 @@ If you want to just try out a bootable version of nwipe you can download the Shr
## Which Linux distro uses the latest Nwipe?
See [Repology](https://repology.org/project/nwipe/versions)
And in addition checkout the following distros that all include nwipe:
- [ShredOS 2020](https://github.com/PartialVolume/shredos.2020.02) Always has the latest nwipe release.
- [partedmagic](https://partedmagic.com)
- [SystemRescueCD](https://www.system-rescue.org)
- [gparted live](https://sourceforge.net/projects/gparted/files/gparted-live-testing/1.2.0-2/)
Know of other distros that include nwipe? Then please let us know or issue a PR on this README.md. Thanks.
## Bugs
Bugs can be reported on GitHub:

View File

@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.64])
AC_INIT([nwipe], [0.31], [git@brumit.nl])
AC_INIT([nwipe], [0.32], [git@brumit.nl])
AM_INIT_AUTOMAKE(foreign subdir-objects)
AC_OUTPUT(Makefile src/Makefile man/Makefile)
AC_CONFIG_SRCDIR([src/nwipe.c])

View File

@@ -1,4 +1,4 @@
.TH NWIPE "1" "June 2021" "nwipe version 0.31" "User Commands"
.TH NWIPE "1" "October 2021" "nwipe version 0.32" "User Commands"
.SH NAME
nwipe \- securely erase disks
.SH SYNOPSIS
@@ -39,7 +39,7 @@ Power off system on completion of wipe delayed for for one minute. During
this one minute delay you can abort the shutdown by typing sudo shutdown -c
.TP
\fB\-\-sync\fR=\fINUM\fR
Will perform a syn after NUM writes (default: 10000)
Will perform a syn after NUM writes (default: 100000)
.IP
0 \- fdatasync after the disk is completely written
fdatasync errors not detected until completion.
@@ -98,9 +98,13 @@ ops2 \- RCMP TSSIT OPS\-II
.IP
random / prng / stream \- PRNG Stream
.IP
zero / quick \- Overwrite with zeros
zero / quick \- Overwrite with zeros 0x00
.IP
verify \- Verifies disk is zero filled
one \- Overwrite with ones 0xFF
.IP
verify_zero \- Verifies disk is zero filled
.IP
verify_one \- Verifies disk is 0xFF filled
.IP
is5enh \- HMG IS5 enhanced
.TP

View File

@@ -129,6 +129,7 @@ typedef struct nwipe_context_t_
double duration; // Duration of the wipe in seconds
time_t start_time; // Start time of wipe
time_t end_time; // End time of wipe
u64 fsyncdata_errors; // The number of fsyncdata errors across all passes.
/*
* Identity contains the raw serial number of the drive
* (where applicable), however, for use within nwipe use the

460
src/gui.c
View File

@@ -126,10 +126,10 @@ const char* stats_title = " Statistics ";
const char* main_window_footer = "S=Start m=Method p=PRNG v=Verify r=Rounds b=Blanking Space=Select CTRL+C=Quit";
const char* main_window_footer_warning_lower_case_s = " WARNING: To start the wipe press SHIFT+S (uppercase S) ";
const char* main_window_fotter_warning_no_blanking_with_ops2 =
const char* main_window_footer_warning_no_blanking_with_ops2 =
" WARNING: Zero blanking is not allowed with ops2 method ";
const char* main_window_fotter_warning_no_blanking_with_verify_only =
const char* main_window_footer_warning_no_blanking_with_verify_only =
" WARNING: Zero blanking is not allowed with verify method ";
const char* main_window_footer_warning_no_drive_selected =
@@ -137,9 +137,9 @@ const char* main_window_footer_warning_no_drive_selected =
/* Oddly enough, placing extra quotes around the footer strings fixes corruption to the right
* of the footer message when the terminal is resized, a quirk in ncurses? - DO NOT REMOVE THE \" */
const char* selection_footer = "\"J=Down K=Up Space=Select Backspace=Cancel Ctrl+C=Quit\"";
const char* end_wipe_footer = "\"B=Blank screen Ctrl+C=Quit\"";
const char* rounds_footer = "\"Left=Erase Esc=Cancel Ctrl+C=Quit\"";
const char* selection_footer = "J=Down K=Up Space=Select Backspace=Cancel Ctrl+C=Quit";
const char* end_wipe_footer = "B=[Toggle between dark\\blank\\blue screen] Ctrl+C=Quit";
const char* rounds_footer = "Left=Erase Esc=Cancel Ctrl+C=Quit";
const char* wipes_finished_footer = "Wipe finished - press enter to exit. Logged to STDOUT";
@@ -155,6 +155,8 @@ int stdscr_lines_previous;
/* The size of the terminal columns when previously checked */
int stdscr_cols_previous;
int tft_saver = 0;
void nwipe_gui_title( WINDOW* w, const char* s )
{
/**
@@ -178,29 +180,19 @@ void nwipe_gui_title( WINDOW* w, const char* s )
margin = 0;
}
/* tft_saver = grey text on black mode */
if( tft_saver )
{
wattron( w, A_BOLD );
}
/* Print the title. */
mvwprintw( w, 0, margin / 2, "%s", s );
} /* nwipe_gui_title */
void nwipe_gui_init( void )
void nwipe_init_pairs( void )
{
/**
* Initializes the ncurses gui.
*/
/* Initialize the screen. */
initscr();
/* Disable TTY line buffering. */
cbreak();
/* Disable TTY echo. */
noecho();
/* Enable most special keys. */
keypad( stdscr, TRUE );
if( has_colors() )
{
/* Initialize color capabilities. */
@@ -212,8 +204,16 @@ void nwipe_gui_init( void )
init_color( COLOR_CYAN, 128, 128, 128 );
}
/* Set white on blue as the emphasis color. */
init_pair( 1, COLOR_WHITE, COLOR_BLUE );
/* If we are in tft saver mode set grey text on black background else
* Set white on blue as the emphasis color */
if( tft_saver )
{
init_pair( 1, COLOR_BLACK, COLOR_BLACK );
}
else
{
init_pair( 1, COLOR_WHITE, COLOR_BLUE );
}
/* Set gray (or cyan) on blue as the normal color. */
init_pair( 2, COLOR_CYAN, COLOR_BLUE );
@@ -221,8 +221,16 @@ void nwipe_gui_init( void )
/* Set red on blue as the hilite color. */
init_pair( 3, COLOR_RED, COLOR_BLUE );
/* Set blue on white as the color for the header and footer windows. */
init_pair( 4, COLOR_BLUE, COLOR_WHITE );
/* If we are in tft saver mode set grey text on black background else
* Set white on blue as the emphasis color */
if( tft_saver )
{
init_pair( 4, COLOR_BLACK, COLOR_BLACK );
}
else
{
init_pair( 4, COLOR_BLUE, COLOR_WHITE );
}
/* Set white on green for success messages. */
init_pair( 5, COLOR_WHITE, COLOR_GREEN );
@@ -245,6 +253,28 @@ void nwipe_gui_init( void )
/* Set the background style. */
wbkgdset( stdscr, COLOR_PAIR( 1 ) | ' ' );
}
}
void nwipe_gui_init( void )
{
/**
* Initializes the ncurses gui.
*/
/* Initialize the screen. */
initscr();
/* Disable TTY line buffering. */
cbreak();
/* Disable TTY echo. */
noecho();
/* Enable most special keys. */
keypad( stdscr, TRUE );
/* Create the text/background color pairs */
nwipe_init_pairs();
/* Clear the screen. */
wclear( stdscr );
@@ -339,6 +369,16 @@ void nwipe_gui_create_main_window()
/* Apply the color change. */
wattron( main_window, COLOR_PAIR( 1 ) );
/* In tft saver mode we toggle the intensity bit which gives us grey text */
if( tft_saver )
{
wattron( main_window, A_BOLD );
}
else
{
wattroff( main_window, A_BOLD );
}
}
/* Clear the main window. */
@@ -362,6 +402,11 @@ void nwipe_gui_create_header_window()
{
/* Set the background style of the header window. */
wbkgdset( header_window, COLOR_PAIR( 4 ) | ' ' );
if( tft_saver )
{
wattron( main_window, A_BOLD );
}
}
/* Clear the header window. */
@@ -424,6 +469,11 @@ void nwipe_gui_create_options_window()
/* Apply the color change to the options window. */
wattron( options_window, COLOR_PAIR( 1 ) );
if( tft_saver )
{
wattron( options_window, A_BOLD );
}
}
/* Clear the options window. */
@@ -447,6 +497,11 @@ void nwipe_gui_create_stats_window()
/* Apply the color change to the stats window. */
wattron( stats_window, COLOR_PAIR( 1 ) );
if( tft_saver )
{
wattron( stats_window, A_BOLD );
}
}
/* Clear the new window. */
@@ -467,13 +522,13 @@ void nwipe_gui_create_stats_window()
} /* nwipe_gui_create_stats_window */
void nwipe_gui_create_all_windows_on_terminal_resize( const char* footer_text )
void nwipe_gui_create_all_windows_on_terminal_resize( int force_creation, const char* footer_text )
{
/* Get the terminal size */
getmaxyx( stdscr, stdscr_lines, stdscr_cols );
/* If the user has resized the terminal then recreate the windows and panels */
if( stdscr_cols_previous != stdscr_cols || stdscr_lines_previous != stdscr_lines )
if( stdscr_cols_previous != stdscr_cols || stdscr_lines_previous != stdscr_lines || force_creation == 1 )
{
/* Save the revised terminal size so we check whether the user has resized next time */
stdscr_lines_previous = stdscr_lines;
@@ -567,7 +622,7 @@ void nwipe_gui_select( int count, nwipe_context_t** c )
do
{
nwipe_gui_create_all_windows_on_terminal_resize( main_window_footer );
nwipe_gui_create_all_windows_on_terminal_resize( 0, main_window_footer );
/* There is one slot per line. */
getmaxyx( main_window, wlines, wcols );
@@ -981,7 +1036,7 @@ void nwipe_gui_select( int count, nwipe_context_t** c )
{
/* Warn the user about that zero blanking with the ops2 method is not allowed */
wattron( footer_window, COLOR_PAIR( 10 ) );
nwipe_gui_amend_footer_window( main_window_fotter_warning_no_blanking_with_ops2 );
nwipe_gui_amend_footer_window( main_window_footer_warning_no_blanking_with_ops2 );
doupdate();
sleep( 3 );
wattroff( footer_window, COLOR_PAIR( 10 ) );
@@ -993,11 +1048,11 @@ void nwipe_gui_select( int count, nwipe_context_t** c )
break;
}
if( nwipe_options.method == &nwipe_verify )
if( nwipe_options.method == &nwipe_verify_zero || nwipe_options.method == &nwipe_verify_one )
{
/* Warn the user about that zero blanking with the ops2 method is not allowed */
wattron( footer_window, COLOR_PAIR( 10 ) );
nwipe_gui_amend_footer_window( main_window_fotter_warning_no_blanking_with_verify_only );
nwipe_gui_amend_footer_window( main_window_footer_warning_no_blanking_with_verify_only );
doupdate();
sleep( 3 );
wattroff( footer_window, COLOR_PAIR( 10 ) );
@@ -1189,7 +1244,8 @@ void nwipe_gui_options( void )
mvwprintw( options_window, NWIPE_GUI_OPTIONS_ROUNDS_Y, NWIPE_GUI_OPTIONS_ROUNDS_X, "Rounds: " );
/* Disable blanking for ops2 and verify methods */
if( nwipe_options.method == &nwipe_ops2 || nwipe_options.method == &nwipe_verify )
if( nwipe_options.method == &nwipe_ops2 || nwipe_options.method == &nwipe_verify_zero
|| nwipe_options.method == &nwipe_verify_one )
{
nwipe_options.noblank = 1;
}
@@ -1249,7 +1305,7 @@ void nwipe_gui_rounds( void )
/* Erase the main window. */
werase( main_window );
nwipe_gui_create_all_windows_on_terminal_resize( selection_footer );
nwipe_gui_create_all_windows_on_terminal_resize( 0, selection_footer );
/* Add a border. */
box( main_window, 0, 0 );
@@ -1265,9 +1321,6 @@ void nwipe_gui_rounds( void )
if( focus > 0 )
{
/* Print the syslinux configuration hint. */
mvwprintw( main_window, yy++, tab1, "syslinux.cfg: nuke=\"nwipe --rounds %i\"", focus );
/* Print this line last so that the cursor is in the right place. */
mvwprintw( main_window, 2, tab1, "> %i", focus );
}
@@ -1399,27 +1452,23 @@ void nwipe_gui_prng( void )
/* Clear the main window. */
werase( main_window );
nwipe_gui_create_all_windows_on_terminal_resize( selection_footer );
nwipe_gui_create_all_windows_on_terminal_resize( 0, selection_footer );
/* Initialize the working row. */
yy = 2;
/* Print the options. */
mvwprintw( main_window, yy++, tab1, "" );
mvwprintw( main_window, yy++, tab1, "" );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_twister.label );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_isaac.label );
mvwprintw( main_window, yy++, tab1, "" );
/* Print the cursor. */
mvwaddch( main_window, 4 + focus, tab1, ACS_RARROW );
mvwaddch( main_window, 2 + focus, tab1, ACS_RARROW );
switch( focus )
{
case 0:
mvwprintw( main_window, 2, tab2, "syslinux.cfg: nuke=\"nwipe --prng twister\"" );
mvwprintw( main_window,
yy++,
tab1,
@@ -1448,8 +1497,6 @@ void nwipe_gui_prng( void )
case 1:
mvwprintw( main_window, 2, tab2, "syslinux.cfg: nuke=\"nwipe --prng isaac\"" );
mvwprintw( main_window,
yy++,
tab1,
@@ -1574,7 +1621,7 @@ void nwipe_gui_verify( void )
do
{
nwipe_gui_create_all_windows_on_terminal_resize( selection_footer );
nwipe_gui_create_all_windows_on_terminal_resize( 0, selection_footer );
/* Clear the main window. */
werase( main_window );
@@ -1595,8 +1642,6 @@ void nwipe_gui_verify( void )
{
case 0:
mvwprintw( main_window, 2, tab2, "syslinux.cfg: nuke=\"nwipe --verify off\"" );
mvwprintw( main_window,
yy++,
tab1,
@@ -1609,8 +1654,6 @@ void nwipe_gui_verify( void )
case 1:
mvwprintw( main_window, 2, tab2, "syslinux.cfg: nuke=\"nwipe --verify last\"" );
mvwprintw( main_window,
yy++,
tab1,
@@ -1623,8 +1666,6 @@ void nwipe_gui_verify( void )
case 2:
mvwprintw( main_window, 2, tab2, "syslinux.cfg: nuke=\"nwipe --verify all\"" );
mvwprintw( main_window,
yy++,
tab1,
@@ -1753,7 +1794,7 @@ void nwipe_gui_noblank( void )
do
{
nwipe_gui_create_all_windows_on_terminal_resize( selection_footer );
nwipe_gui_create_all_windows_on_terminal_resize( 0, selection_footer );
/* Clear the main window. */
werase( main_window );
@@ -1773,8 +1814,6 @@ void nwipe_gui_noblank( void )
{
case 0:
mvwprintw( main_window, 2, tab2, "syslinux.cfg: nuke=\"nwipe\"" );
mvwprintw( main_window,
yy++,
tab1,
@@ -1795,8 +1834,6 @@ void nwipe_gui_noblank( void )
case 1:
mvwprintw( main_window, 2, tab2, "syslinux.cfg: nuke=\"nwipe --noblank\"" );
mvwprintw( main_window,
yy++,
tab1,
@@ -1894,7 +1931,7 @@ void nwipe_gui_method( void )
extern int terminate_signal;
/* The number of implemented methods. */
const int count = 8;
const int count = 10;
/* The first tabstop. */
const int tab1 = 2;
@@ -1920,53 +1957,63 @@ void nwipe_gui_method( void )
{
focus = 0;
}
if( nwipe_options.method == &nwipe_ops2 )
if( nwipe_options.method == &nwipe_one )
{
focus = 1;
}
if( nwipe_options.method == &nwipe_dodshort )
if( nwipe_options.method == &nwipe_ops2 )
{
focus = 2;
}
if( nwipe_options.method == &nwipe_dod522022m )
if( nwipe_options.method == &nwipe_dodshort )
{
focus = 3;
}
if( nwipe_options.method == &nwipe_gutmann )
if( nwipe_options.method == &nwipe_dod522022m )
{
focus = 4;
}
if( nwipe_options.method == &nwipe_random )
if( nwipe_options.method == &nwipe_gutmann )
{
focus = 5;
}
if( nwipe_options.method == &nwipe_verify )
if( nwipe_options.method == &nwipe_random )
{
focus = 6;
}
if( nwipe_options.method == &nwipe_is5enh )
if( nwipe_options.method == &nwipe_verify_zero )
{
focus = 7;
}
if( nwipe_options.method == &nwipe_verify_one )
{
focus = 8;
}
if( nwipe_options.method == &nwipe_is5enh )
{
focus = 9;
}
do
{
/* Clear the main window. */
werase( main_window );
nwipe_gui_create_all_windows_on_terminal_resize( selection_footer );
nwipe_gui_create_all_windows_on_terminal_resize( 0, selection_footer );
/* Initialize the working row. */
yy = 2;
/* Print the options. */
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_zero ) );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_one ) );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_ops2 ) );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_dodshort ) );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_dod522022m ) );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_gutmann ) );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_random ) );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_verify ) );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_verify_zero ) );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_verify_one ) );
mvwprintw( main_window, yy++, tab1, " %s", nwipe_method_label( &nwipe_is5enh ) );
mvwprintw( main_window, yy++, tab1, " " );
@@ -1977,169 +2024,131 @@ void nwipe_gui_method( void )
{
case 0:
mvwprintw( main_window, 2, tab2, "syslinux.cfg: nuke=\"nwipe --method zero\"" );
mvwprintw( main_window, 3, tab2, "Security Level: Low (1 pass)" );
mvwprintw( main_window, 2, tab2, "Security Level: high (1 pass)" );
mvwprintw( main_window,
yy++,
tab1,
"This method fills the device with zeros. Note that the rounds option does " );
mvwprintw( main_window,
yy++,
tab1,
"not apply to this method. This method always runs one round. " );
mvwprintw( main_window,
yy++,
tab1,
" " );
mvwprintw( main_window,
yy++,
tab1,
"Use this method to blank disks before internal redeployment, or before " );
mvwprintw( main_window,
yy++,
tab1,
"reinstalling Microsoft Windows to remove the data areas that the format " );
mvwprintw(
main_window, yy++, tab1, "utility preserves. " );
mvwprintw( main_window, 4, tab2, "This method fills the device with zeros. Note " );
mvwprintw( main_window, 5, tab2, "that the rounds option does not apply to this " );
mvwprintw( main_window, 6, tab2, "method. This method always runs one round. " );
mvwprintw( main_window, 7, tab2, " " );
mvwprintw( main_window, 8, tab2, "There is no publically available evidence that " );
mvwprintw( main_window, 9, tab2, "data can be recovered from a modern traditional " );
mvwprintw( main_window, 10, tab2, "hard drive (HDD) that has been zero wiped, " );
mvwprintw( main_window, 11, tab2, "however a wipe that includes a prng may be " );
mvwprintw( main_window, 12, tab2, "preferable. " );
break;
case 1:
mvwprintw( main_window, 2, tab2, "syslinux.cfg: nuke=\"nwipe --method ops2\"" );
mvwprintw( main_window, 3, tab2, "Security Level: Medium (8 passes)" );
mvwprintw( main_window, 2, tab2, "Security Level: high (1 pass)" );
mvwprintw( main_window,
yy++,
tab1,
"The Royal Canadian Mounted Police Technical Security Standard for " );
mvwprintw( main_window,
yy++,
tab1,
"Information Technology, Appendix OPS-II: Media Sanitization. " );
mvwprintw( main_window,
yy++,
tab1,
" " );
mvwprintw( main_window,
yy++,
tab1,
"This implementation, with regards to paragraph 2 section A of the standard, " );
mvwprintw( main_window,
yy++,
tab1,
"uses a pattern that is one random byte and that is changed each round. " );
mvwprintw( main_window, 4, tab2, "This method fills the device with ones. Note that" );
mvwprintw( main_window, 5, tab2, "the rounds option does not apply to this method. " );
mvwprintw( main_window, 6, tab2, "This method always runs one round. " );
mvwprintw( main_window, 7, tab2, " " );
mvwprintw( main_window, 8, tab2, "This method might be used when wiping a solid " );
mvwprintw( main_window, 9, tab2, "state drive if an additional level of security is" );
mvwprintw( main_window, 10, tab2, "required beyond using the drives internal secure " );
mvwprintw( main_window, 11, tab2, "erase features. Alternatively PRNG may be " );
mvwprintw( main_window, 12, tab2, "preferable. " );
break;
case 2:
mvwprintw( main_window, 2, tab2, "syslinux.cfg: nuke=\"nwipe --method dodshort\"" );
mvwprintw( main_window, 3, tab2, "Security Level: Medium (3 passes)" );
mvwprintw( main_window, 2, tab2, "Security Level: higher (8 passes)" );
mvwprintw( main_window,
yy++,
tab1,
"The American Department of Defense 5220.22-M short wipe. " );
mvwprintw( main_window,
yy++,
tab1,
"This method is composed of passes 1, 2 & 7 from the standard wipe. " );
mvwprintw( main_window, 4, tab2, "The Royal Canadian Mounted Police Technical " );
mvwprintw( main_window, 5, tab2, "Security Standard for Information Technology. " );
mvwprintw( main_window, 6, tab2, "Appendix OPS-II: Media Sanitization. " );
mvwprintw( main_window, 7, tab2, " " );
mvwprintw( main_window, 8, tab2, "This implementation, with regards to paragraph 2 " );
mvwprintw( main_window, 9, tab2, "section A of the standard, uses a pattern that is" );
mvwprintw( main_window, 10, tab2, "one random byte and that is changed each round. " );
break;
case 3:
mvwprintw( main_window, 2, tab2, "syslinux.cfg: nuke=\"nwipe --method dod522022m\"" );
mvwprintw( main_window, 3, tab2, "Security Level: Medium (7 passes)" );
mvwprintw( main_window, 2, tab2, "Security Level: higher (3 passes)" );
mvwprintw( main_window,
yy++,
tab1,
"The American Department of Defense 5220.22-M standard wipe. " );
mvwprintw( main_window,
yy++,
tab1,
"This implementation uses the same algorithm as the Heidi Eraser product. " );
mvwprintw( main_window, 4, tab2, "The US Department of Defense 5220.22-M short wipe" );
mvwprintw( main_window, 5, tab2, "This method is composed of passes 1, 2 & 7 from " );
mvwprintw( main_window, 6, tab2, "the standard DoD 5220.22-M wipe. " );
mvwprintw( main_window, 7, tab2, " " );
mvwprintw( main_window, 8, tab2, "Pass 1: A random character " );
mvwprintw( main_window, 9, tab2, "Pass 2: The bitwise complement of pass 1. " );
mvwprintw( main_window, 10, tab2, "Pass 3: A random number generated data stream " );
break;
case 4:
mvwprintw( main_window, 2, tab2, "syslinux.cfg: nuke=\"nwipe --method gutmann\"" );
mvwprintw( main_window, 3, tab2, "Security Level: High (35 passes)" );
mvwprintw( main_window, 2, tab2, "Security Level: higher (7 passes)" );
mvwprintw( main_window,
yy++,
tab1,
"This is the method described by Peter Gutmann in the paper entitled " );
mvwprintw( main_window,
yy++,
tab1,
"\"Secure Deletion of Data from Magnetic and Solid-State Memory\". " );
mvwprintw( main_window, 3, tab2, "The American Department of Defense 5220.22-M " );
mvwprintw( main_window, 4, tab2, "standard wipe. " );
mvwprintw( main_window, 5, tab2, " " );
mvwprintw( main_window, 6, tab2, "Pass 1: A Random character " );
mvwprintw( main_window, 7, tab2, "Pass 2: The bitwise complement of pass 1 " );
mvwprintw( main_window, 8, tab2, "Pass 3: A random number generated data stream " );
mvwprintw( main_window, 9, tab2, "Pass 4: A Random character " );
mvwprintw( main_window, 10, tab2, "Pass 5: A Random character " );
mvwprintw( main_window, 11, tab2, "Pass 6: The bitwise complement of pass 5 " );
mvwprintw( main_window, 12, tab2, "Pass 7: A random number generated data stream " );
break;
case 5:
mvwprintw( main_window, 2, tab2, "syslinux.cfg: nuke=\"nwipe --method random\"" );
mvwprintw( main_window, 3, tab2, "Security Level: Depends on Rounds" );
mvwprintw( main_window, 2, tab2, "Security Level: Paranoid ! (35 passes) " );
mvwprintw( main_window, 3, tab2, "Don't waste your time with this on a modern drive" );
mvwprintw( main_window,
yy++,
tab1,
"This method fills the device with a stream from the PRNG. It is probably the " );
mvwprintw( main_window,
yy++,
tab1,
"best method to use on modern hard disk drives because encoding schemes vary. " );
mvwprintw( main_window,
yy++,
tab1,
" " );
mvwprintw( main_window,
yy++,
tab1,
"This method has a medium security level with 4 rounds, and a high security " );
mvwprintw( main_window,
yy++,
tab1,
"level with 8 rounds. " );
mvwprintw( main_window, 5, tab2, "This is the method described by Peter Gutmann in " );
mvwprintw( main_window, 6, tab2, "the paper entitled \"Secure Deletion of Data from" );
mvwprintw( main_window, 7, tab2, "Magnetic and Solid-State Memory\", however not " );
mvwprintw( main_window, 8, tab2, "relevant in regards to modern hard disk drives. " );
break;
case 6:
mvwprintw( main_window, 2, tab2, "syslinux.cfg: nuke=\"nwipe --method verify\"" );
mvwprintw( main_window, 3, tab2, "Security Level: None" );
mvwprintw( main_window,
yy++,
tab1,
"This method only reads the device and checks that it is all zero. " );
mvwprintw( main_window, 2, tab2, "Security Level: Depends on Rounds" );
mvwprintw( main_window, 4, tab2, "This method fills the device with a stream from " );
mvwprintw( main_window, 5, tab2, "the PRNG. It is probably the best method to use " );
mvwprintw( main_window, 6, tab2, "on modern hard disk drives due to variation in " );
mvwprintw( main_window, 7, tab2, "encoding methods. " );
mvwprintw( main_window, 8, tab2, " " );
mvwprintw( main_window, 9, tab2, "This method has a high security level with 1 " );
mvwprintw( main_window, 10, tab2, "round and an increasingly higher security level " );
mvwprintw( main_window, 11, tab2, "as rounds are increased." );
break;
case 7:
mvwprintw( main_window, 2, tab2, "syslinux.cfg: nuke=\"nwipe --method is5enh\"" );
mvwprintw( main_window, 3, tab2, "Security Level: Medium (3 passes)" );
mvwprintw( main_window, 2, tab2, "Security Level: Not applicable" );
mvwprintw( main_window,
yy++,
tab1,
"HMG IA/IS 5 (Infosec Standard 5): Secure Sanitisation of Protectively Marked " );
mvwprintw( main_window,
yy++,
tab1,
"Information or Sensitive Information " );
mvwprintw( main_window,
yy++,
tab1,
" " );
mvwprintw( main_window,
yy++,
tab1,
"This method fills the device with 0s, then with 1s, then with a PRNG stream, " );
mvwprintw( main_window,
yy++,
tab1,
"then reads the device to verify the PRNG stream was successfully written. " );
mvwprintw( main_window, 4, tab2, "This method only reads the device and checks " );
mvwprintw( main_window, 5, tab2, "that it is all zero. " );
break;
case 8:
mvwprintw( main_window, 2, tab2, "Security Level: Not applicable" );
mvwprintw( main_window, 4, tab2, "This method only reads the device and checks " );
mvwprintw( main_window, 5, tab2, "that it is all ones (0xFF). " );
break;
case 9:
mvwprintw( main_window, 2, tab2, "Security Level: higher (3 passes)" );
mvwprintw( main_window, 4, tab2, "HMG IA/IS 5 (Infosec Standard 5): Secure " );
mvwprintw( main_window, 5, tab2, "Sanitisation of Protectively Marked Information " );
mvwprintw( main_window, 6, tab2, "or Sensitive Information " );
mvwprintw( main_window, 7, tab2, " " );
mvwprintw( main_window, 8, tab2, "This method fills the device with 0s, then with " );
mvwprintw( main_window, 9, tab2, "1s, then with a PRNG stream, then reads the " );
mvwprintw( main_window, 10, tab2, "device to verify the PRNG stream was " );
mvwprintw( main_window, 11, tab2, "successfully written. " );
break;
} /* switch */
@@ -2202,30 +2211,38 @@ void nwipe_gui_method( void )
break;
case 1:
nwipe_options.method = &nwipe_ops2;
nwipe_options.method = &nwipe_one;
break;
case 2:
nwipe_options.method = &nwipe_dodshort;
nwipe_options.method = &nwipe_ops2;
break;
case 3:
nwipe_options.method = &nwipe_dod522022m;
nwipe_options.method = &nwipe_dodshort;
break;
case 4:
nwipe_options.method = &nwipe_gutmann;
nwipe_options.method = &nwipe_dod522022m;
break;
case 5:
nwipe_options.method = &nwipe_random;
nwipe_options.method = &nwipe_gutmann;
break;
case 6:
nwipe_options.method = &nwipe_verify;
nwipe_options.method = &nwipe_random;
break;
case 7:
nwipe_options.method = &nwipe_verify_zero;
break;
case 8:
nwipe_options.method = &nwipe_verify_one;
break;
case 9:
nwipe_options.method = &nwipe_is5enh;
break;
}
@@ -2423,12 +2440,12 @@ void* nwipe_gui_status( void* ptr )
if( nwipe_active != 0 )
{
/* if resizing the terminal during a wipe a specific footer is required */
nwipe_gui_create_all_windows_on_terminal_resize( end_wipe_footer );
nwipe_gui_create_all_windows_on_terminal_resize( 0, end_wipe_footer );
}
else
{
/* and if the wipes have finished a different footer is required */
nwipe_gui_create_all_windows_on_terminal_resize( wipes_finished_footer );
nwipe_gui_create_all_windows_on_terminal_resize( 0, wipes_finished_footer );
}
}
@@ -2459,6 +2476,10 @@ void* nwipe_gui_status( void* ptr )
if( keystroke > 0x0a && keystroke < 0x7e && nwipe_gui_blank == 1 )
{
tft_saver = 0;
nwipe_init_pairs();
nwipe_gui_create_all_windows_on_terminal_resize( 1, end_wipe_footer );
/* Show screen */
nwipe_gui_blank = 0;
@@ -2492,17 +2513,31 @@ void* nwipe_gui_status( void* ptr )
case 'b':
case 'B':
/* Blank screen. */
nwipe_gui_blank = 1;
hide_panel( header_panel );
hide_panel( footer_panel );
hide_panel( stats_panel );
hide_panel( options_panel );
hide_panel( main_panel );
if( nwipe_gui_blank == 0 && tft_saver != 1 )
{
/* grey text on black background */
tft_saver = 1;
nwipe_init_pairs();
nwipe_gui_create_all_windows_on_terminal_resize( 1, end_wipe_footer );
}
else
{
if( nwipe_gui_blank == 0 && tft_saver == 1 )
{
/* Blank screen. */
tft_saver = 0;
nwipe_gui_blank = 1;
hide_panel( header_panel );
hide_panel( footer_panel );
hide_panel( stats_panel );
hide_panel( options_panel );
hide_panel( main_panel );
}
/* Set the background style. */
wbkgdset( stdscr, COLOR_PAIR( 7 ) );
wclear( stdscr );
/* Set the background style. */
wbkgdset( stdscr, COLOR_PAIR( 7 ) );
wclear( stdscr );
}
break;
@@ -2881,6 +2916,7 @@ int compute_stats( void* ptr )
/* Accumulate the error count. */
nwipe_misc_thread_data->errors += c[i]->pass_errors;
nwipe_misc_thread_data->errors += c[i]->verify_errors;
nwipe_misc_thread_data->errors += c[i]->fsyncdata_errors;
} /* for statistics */

View File

@@ -31,6 +31,7 @@ void nwipe_gui_create_footer_window( const char* ); // Create the footer window
void nwipe_gui_create_options_window( void ); // Create the options window
void nwipe_gui_create_stats_window( void ); // Create the stats window
void nwipe_gui_create_all_windows_on_terminal_resize(
int force_creation,
const char* footer_text ); // If terminal is resized recreate all windows
void nwipe_gui_select( int count, nwipe_context_t** c ); // Select devices to wipe.
void* nwipe_gui_status( void* ptr ); // Update operation progress.

View File

@@ -662,13 +662,13 @@ void nwipe_log_summary( nwipe_context_t** ptr, int nwipe_selected )
nwipe_log( NWIPE_LOG_NOTIMESTAMP, "" );
nwipe_log( NWIPE_LOG_NOTIMESTAMP,
"******************************** Error Summary *********************************" );
nwipe_log( NWIPE_LOG_NOTIMESTAMP, "! Device | Pass Errors | Verifications Errors |" );
nwipe_log( NWIPE_LOG_NOTIMESTAMP, "! Device | Pass Errors | Verifications Errors | Fdatasync I\\O Errors" );
nwipe_log( NWIPE_LOG_NOTIMESTAMP,
"--------------------------------------------------------------------------------" );
for( i = 0; i < nwipe_selected; i++ )
{
if( c[i]->pass_errors != 0 || c[i]->verify_errors != 0 )
if( c[i]->pass_errors != 0 || c[i]->verify_errors != 0 || c[i]->fsyncdata_errors != 0 )
{
strncpy( exclamation_flag, "!", 1 );
exclamation_flag[1] = 0;
@@ -705,11 +705,12 @@ void nwipe_log_summary( nwipe_context_t** ptr, int nwipe_selected )
}
}
nwipe_log( NWIPE_LOG_NOTIMESTAMP,
"%s %s | %10llu | %10llu |",
"%s %s | %10llu | %10llu | %10llu",
exclamation_flag,
device,
c[i]->pass_errors,
c[i]->verify_errors );
c[i]->verify_errors,
c[i]->fsyncdata_errors );
}
nwipe_log( NWIPE_LOG_NOTIMESTAMP,

View File

@@ -63,8 +63,10 @@ const char* nwipe_dodshort_label = "DoD Short";
const char* nwipe_gutmann_label = "Gutmann Wipe";
const char* nwipe_ops2_label = "RCMP TSSIT OPS-II";
const char* nwipe_random_label = "PRNG Stream";
const char* nwipe_zero_label = "Zero Fill";
const char* nwipe_verify_label = "Verify Blank";
const char* nwipe_zero_label = "Fill With Zeros";
const char* nwipe_one_label = "Fill With Ones";
const char* nwipe_verify_zero_label = "Verify Zeros (0x00)";
const char* nwipe_verify_one_label = "Verify Ones (0xFF)";
const char* nwipe_is5enh_label = "HMG IS5 Enhanced";
const char* nwipe_unknown_label = "Unknown Method (FIXME)";
@@ -100,9 +102,17 @@ const char* nwipe_method_label( void* method )
{
return nwipe_zero_label;
}
if( method == &nwipe_verify )
if( method == &nwipe_one )
{
return nwipe_verify_label;
return nwipe_one_label;
}
if( method == &nwipe_verify_zero )
{
return nwipe_verify_zero_label;
}
if( method == &nwipe_verify_one )
{
return nwipe_verify_one_label;
}
if( method == &nwipe_is5enh )
{
@@ -147,10 +157,73 @@ void* nwipe_zero( void* ptr )
return NULL;
} /* nwipe_zero */
void* nwipe_verify( void* ptr )
void* nwipe_one( void* ptr )
{
/**
* Fill the device with zeroes.
* Fill the device with ones.
*/
nwipe_context_t* c;
c = (nwipe_context_t*) ptr;
/* get current time at the start of the wipe */
time( &c->start_time );
/* set wipe in progress flag for GUI */
c->wipe_status = 1;
/* setup for a zero-fill. */
char onefill[1] = { '\xFF' };
nwipe_pattern_t patterns[] = { { 1, &onefill[0] }, // pass 1: 1s
{ 0, NULL } };
/* Run the method. */
c->result = nwipe_runmethod( c, patterns );
/* Finished. Set the wipe_status flag so that the GUI knows */
c->wipe_status = 0;
/* get current time at the end of the wipe */
time( &c->end_time );
return NULL;
} /* nwipe_one */
void* nwipe_verify_zero( void* ptr )
{
/**
* Verify the device is full of zeros.
*/
nwipe_context_t* c;
c = (nwipe_context_t*) ptr;
/* get current time at the start of the wipe */
time( &c->start_time );
/* set wipe in progress flag for GUI */
c->wipe_status = 1;
/* Do nothing because nwipe_runmethod appends a zero-fill. */
nwipe_pattern_t patterns[] = { { 0, NULL } };
/* Run the method. */
c->result = nwipe_runmethod( c, patterns );
/* Finished. Set the wipe_status flag so that the GUI knows */
c->wipe_status = 0;
/* get current time at the end of the wipe */
time( &c->end_time );
return NULL;
} /* nwipe_verify zeros */
void* nwipe_verify_one( void* ptr )
{
/**
* Verify the device is full of ones.
*/
nwipe_context_t* c;
@@ -701,6 +774,9 @@ int nwipe_runmethod( nwipe_context_t* c, nwipe_pattern_t* patterns )
/* The zero-fill pattern for the final pass of most methods. */
nwipe_pattern_t pattern_zero = { 1, "\x00" };
/* The one-fill pattern for verification of the ones fill */
nwipe_pattern_t pattern_one = { 1, "\xFF" };
/* Create the PRNG state buffer. */
c->prng_seed.length = NWIPE_KNOB_PRNG_STATE_LENGTH;
c->prng_seed.s = malloc( c->prng_seed.length );
@@ -731,7 +807,7 @@ int nwipe_runmethod( nwipe_context_t* c, nwipe_pattern_t* patterns )
c->result = c->round_size;
/* If only verifing then the round size is the device size */
if( nwipe_options.method == &nwipe_verify )
if( nwipe_options.method == &nwipe_verify_zero || nwipe_options.method == &nwipe_verify_one )
{
c->round_size = c->device_size;
}
@@ -994,9 +1070,9 @@ int nwipe_runmethod( nwipe_context_t* c, nwipe_pattern_t* patterns )
} /* final ops2 */
else if( nwipe_options.method == &nwipe_verify )
else if( nwipe_options.method == &nwipe_verify_zero )
{
nwipe_log( NWIPE_LOG_NOTICE, "Verifying that %s is empty", c->device_name );
nwipe_log( NWIPE_LOG_NOTICE, "Verifying that %s is zeroed", c->device_name );
/* Verify the final zero pass. */
c->pass_type = NWIPE_PASS_VERIFY;
@@ -1010,11 +1086,36 @@ int nwipe_runmethod( nwipe_context_t* c, nwipe_pattern_t* patterns )
}
if( c->verify_errors == 0 )
{
nwipe_log( NWIPE_LOG_NOTICE, "[SUCCESS] Verified that %s is empty.", c->device_name );
nwipe_log( NWIPE_LOG_NOTICE, "[SUCCESS] Verified that %s is Zeroed.", c->device_name );
}
else
{
nwipe_log( NWIPE_LOG_ERROR, "[FAILURE] %s is not empty .", c->device_name );
nwipe_log( NWIPE_LOG_ERROR, "[FAILURE] %s has not been Zeroed .", c->device_name );
}
} /* verify */
else if( nwipe_options.method == &nwipe_verify_one )
{
nwipe_log( NWIPE_LOG_NOTICE, "Verifying that %s is Ones (0xFF)", c->device_name );
/* Verify the final ones pass. */
c->pass_type = NWIPE_PASS_VERIFY;
r = nwipe_static_verify( c, &pattern_one );
c->pass_type = NWIPE_PASS_NONE;
/* Check for a fatal error. */
if( r < 0 )
{
return r;
}
if( c->verify_errors == 0 )
{
nwipe_log( NWIPE_LOG_NOTICE, "[SUCCESS] Verified that %s is full of ones (0xFF).", c->device_name );
}
else
{
nwipe_log( NWIPE_LOG_ERROR, "[FAILURE] %s is not full of ones (0xFF).", c->device_name );
}
} /* verify */

View File

@@ -51,7 +51,9 @@ void* nwipe_ops2( void* ptr );
void* nwipe_is5enh( void* ptr );
void* nwipe_random( void* ptr );
void* nwipe_zero( void* ptr );
void* nwipe_verify( void* ptr );
void* nwipe_one( void* ptr );
void* nwipe_verify_zero( void* ptr );
void* nwipe_verify_one( void* ptr );
void calculate_round_size( nwipe_context_t* );

View File

@@ -276,9 +276,21 @@ int nwipe_options_parse( int argc, char** argv )
break;
}
if( strcmp( optarg, "verify" ) == 0 )
if( strcmp( optarg, "one" ) == 0 )
{
nwipe_options.method = &nwipe_verify;
nwipe_options.method = &nwipe_one;
break;
}
if( strcmp( optarg, "verify_zero" ) == 0 )
{
nwipe_options.method = &nwipe_verify_zero;
break;
}
if( strcmp( optarg, "verify_one" ) == 0 )
{
nwipe_options.method = &nwipe_verify_one;
break;
}
@@ -529,7 +541,9 @@ void display_help()
puts( " ops2 - RCMP TSSIT OPS-II" );
puts( " random / prng / stream - PRNG Stream" );
puts( " zero / quick - Overwrite with zeros" );
puts( " verify - Verifies disk is zero filled\n" );
puts( " one - Overwrite with ones (0xFF)" );
puts( " verify_zero - Verifies disk is zero filled\n" );
puts( " verify_one - Verifies disk is 0xFF filled\n" );
puts( " -l, --logfile=FILE Filename to log to. Default is STDOUT\n" );
puts( " -p, --prng=METHOD PRNG option (mersenne|twister|isaac)\n" );
puts( " -r, --rounds=NUM Number of times to wipe the device using the selected" );

View File

@@ -130,6 +130,7 @@ int nwipe_random_verify( nwipe_context_t* c )
/* FIXME: Is there a better way to handle this? */
nwipe_perror( errno, __FUNCTION__, "fdatasync" );
nwipe_log( NWIPE_LOG_WARNING, "Buffer flush failure on '%s'.", c->device_name );
c->fsyncdata_errors++;
}
/* Reseed the PRNG. */
@@ -406,6 +407,7 @@ int nwipe_random_pass( NWIPE_METHOD_SIGNATURE )
nwipe_perror( errno, __FUNCTION__, "fdatasync" );
nwipe_log( NWIPE_LOG_WARNING, "Buffer flush failure on '%s'.", c->device_name );
nwipe_log( NWIPE_LOG_WARNING, "Wrote %llu bytes on '%s'.", c->pass_done, c->device_name );
c->fsyncdata_errors++;
free( b );
return -1;
}
@@ -435,6 +437,7 @@ int nwipe_random_pass( NWIPE_METHOD_SIGNATURE )
/* FIXME: Is there a better way to handle this? */
nwipe_perror( errno, __FUNCTION__, "fdatasync" );
nwipe_log( NWIPE_LOG_WARNING, "Buffer flush failure on '%s'.", c->device_name );
c->fsyncdata_errors++;
}
/* We're done. */
@@ -529,6 +532,7 @@ int nwipe_static_verify( NWIPE_METHOD_SIGNATURE, nwipe_pattern_t* pattern )
/* FIXME: Is there a better way to handle this? */
nwipe_perror( errno, __FUNCTION__, "fdatasync" );
nwipe_log( NWIPE_LOG_WARNING, "Buffer flush failure on '%s'.", c->device_name );
c->fsyncdata_errors++;
}
/* Reset the file pointer. */
@@ -823,6 +827,7 @@ int nwipe_static_pass( NWIPE_METHOD_SIGNATURE, nwipe_pattern_t* pattern )
nwipe_perror( errno, __FUNCTION__, "fdatasync" );
nwipe_log( NWIPE_LOG_WARNING, "Buffer flush failure on '%s'.", c->device_name );
nwipe_log( NWIPE_LOG_WARNING, "Wrote %llu bytes on '%s'.", c->pass_done, c->device_name );
c->fsyncdata_errors++;
free( b );
return -1;
}
@@ -849,6 +854,7 @@ int nwipe_static_pass( NWIPE_METHOD_SIGNATURE, nwipe_pattern_t* pattern )
/* FIXME: Is there a better way to handle this? */
nwipe_perror( errno, __FUNCTION__, "fdatasync" );
nwipe_log( NWIPE_LOG_WARNING, "Buffer flush failure on '%s'.", c->device_name );
c->fsyncdata_errors++;
}
/* Release the output buffer. */

View File

@@ -4,7 +4,7 @@
* used by configure to dynamically assign those values
* to documentation files.
*/
const char* version_string = "0.31";
const char* version_string = "0.32";
const char* program_name = "nwipe";
const char* author_name = "Martijn van Brummelen";
const char* email_address = "git@brumit.nl";
@@ -14,4 +14,4 @@ Modifications to original dwipe Copyright Andy Beverley <andy@andybev.com>\n\
This is free software; see the source for copying conditions.\n\
There is NO warranty; not even for MERCHANTABILITY or FITNESS\n\
FOR A PARTICULAR PURPOSE.\n";
const char* banner = "nwipe 0.31";
const char* banner = "nwipe 0.32";