Version v0.2.63 - Fixed OTP thumb drive detection for /media/[username]/[drive_name] structure
This commit is contained in:
60
otp.c
60
otp.c
@@ -132,41 +132,41 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
int interactive_mode(void) {
|
||||
// printf("\n\n\n\n=== OTP Cipher %s ===\n\n", get_version());
|
||||
char input[10];
|
||||
|
||||
while (1) {
|
||||
show_main_menu();
|
||||
char input[10];
|
||||
if (fgets(input, sizeof(input), stdin)) {
|
||||
char choice = toupper(input[0]);
|
||||
|
||||
switch (choice) {
|
||||
case 'T':
|
||||
handle_text_encrypt();
|
||||
break;
|
||||
case 'F':
|
||||
handle_file_encrypt();
|
||||
break;
|
||||
case 'D':
|
||||
handle_decrypt_menu();
|
||||
break;
|
||||
case 'P':
|
||||
handle_pads_menu();
|
||||
break;
|
||||
case 'X':
|
||||
case 'Q':
|
||||
printf("Goodbye!\n");
|
||||
return 0;
|
||||
default:
|
||||
printf("Invalid option. Please select T, F, D, P, or X.\n");
|
||||
continue;
|
||||
}
|
||||
} else {
|
||||
printf("Error reading input. Please try again.\n");
|
||||
continue;
|
||||
|
||||
if (!fgets(input, sizeof(input), stdin)) {
|
||||
printf("Goodbye!\n");
|
||||
break;
|
||||
}
|
||||
|
||||
char choice = toupper(input[0]);
|
||||
|
||||
switch (choice) {
|
||||
case 'T':
|
||||
handle_text_encrypt();
|
||||
break;
|
||||
case 'F':
|
||||
handle_file_encrypt();
|
||||
break;
|
||||
case 'D':
|
||||
handle_decrypt_menu();
|
||||
break;
|
||||
case 'P':
|
||||
handle_pads_menu();
|
||||
break;
|
||||
case 'X':
|
||||
printf("Goodbye!\n");
|
||||
return 0;
|
||||
default:
|
||||
printf("Invalid choice. Please try again.\n");
|
||||
break;
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int command_line_mode(int argc, char* argv[]) {
|
||||
|
||||
Reference in New Issue
Block a user