Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(int argc, char *argv[])
- {
- char theFilePath[512];
- char theIP[20];
- char theFile[100];
- char password[1];
- char username[10];
- printf("Username: ");
- scanf("%s" , &username);
- printf("Enter password: ");
- scanf("%s", &password);
- printf("Enter IP: ");
- scanf("%d" , &theIP);
- printf("Please specify the file: ");
- scanf("%s" , &theFile);
- strcat(theFilePath, "./passfiles/");
- strcat(theFilePath, theFile);
- strcat(theFilePath,".pf");
- sprintf(theFilePath,"%s",theFilePath);
- if (!(file_exist (theFilePath)))
- {
- printf("The file cannot be found in the path %s", theFilePath);
- exit(EXIT_FAILURE);
- } else
- {
- printf("The file exists!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement