Created
December 14, 2018 10:00
-
-
Save SwapnilSoni1999/28f721eb3877ad730400928debfba835 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
int main(int argc,char* argv[]) | |
{ | |
if(argc==1) { | |
printf("\033[0;31m"); | |
printf("\nNo filename provided! Exiting..."); | |
printf("\033[0m \n"); | |
exit; | |
} | |
else if(argc==2) | |
{ | |
int lmao=0; | |
char filename[128]; | |
char command[512] = "curl --upload-file "; | |
char website[128]= " https://transfer.sh/"; | |
int FILENAME_DEFINED = 0; | |
for(int i=0; i<argc; i++) { | |
if(lmao == 1) { | |
strcpy(filename,argv[i]); | |
FILENAME_DEFINED = 1; | |
} | |
lmao++; | |
} | |
if(FILENAME_DEFINED) { | |
strcat(command, filename); | |
strcat(website, filename); | |
strcat(command, website); | |
} | |
system(command); | |
//printf(command); | |
} | |
printf("\n"); | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment