Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- /*
- twitter : @yxs
- abady-blackfoxs-team
- */
- int main(int argc, char **argv) {
- char *user = "root";
- char pass[30] ={18,60,49,51,59,54,63,72,67,5,1,2,3};
- char flag[30] = {-402, -396, -407, -401, -381, -438, -402, -389, -409, -422, -453, -409, -404, -456, -409, -471, -388, -379};
- char username[30];
- char password[30];
- user:
- printf("username : ");
- scanf("%s", username);
- if(strcmp(user,username)==0){
- pass:
- printf("password : ");
- scanf("%s", password);
- char password1[] = {0};
- int i = 0;
- for (i=0; i<strlen(password); i++)
- {
- password1[i] = ((int)password[i] ) - 48;
- }
- if(memcmp(pass,password1,strlen(pass)-1) == 0)
- {
- int summ = 0,ii = 0;
- printf("flag: ");
- for (int ii = 0; ii < strlen(password1)-1; ii++)
- {
- summ += password1[ii];
- }
- for (int iii = 0; iii < strlen(flag); iii++)
- {
- printf("%c", (flag[iii]+summ));
- }
- }else{
- printf("username and password not match :(\n");
- goto pass;
- }
- }else{
- printf("user not found !\n");
- goto user;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement