forked from rafiibrahim8/Vault-Blaster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
noKey.c
43 lines (36 loc) · 1.01 KB
/
noKey.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include<stdio.h>
#include<string.h>
#include<conio.h>
int havFile(char *fname);
void autoExt(char *enFileName);
void manuExt(char *enFileName);
void noKey(void)
{
char choice,fileName[105];
printf("\nEnter file Name (with extension):");
gets(fileName);
while(!havFile(fileName))
{
printf("\n\aFile Not Found! Make sure you have entered correct file name with extension.\nPlease enter again: ");
gets(fileName);
}
printf("\n\nPlease choose an option:\n\t1. Automatic Password and extension detection. (Recommended)\n\t2. Manual Mode.");
choice=getch();
while(!(choice=='1' || choice=='2'))
{
printf("\n\n\aValid input is either 1 or 2.\n\t1. Automatic\n\t2. Manual\nPlease Select.");
choice=getch();
}
switch(choice)
{
case '1':
autoExt(fileName);
break;
case '2':
manuExt(fileName);
break;
default:
printf("\nUnknown Error!");
break;
}
}