Skip to content

Commit

Permalink
fix -k option
Browse files Browse the repository at this point in the history
  • Loading branch information
govolution committed Aug 10, 2017
1 parent a86a806 commit b7b788f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 16 deletions.
Binary file modified make_avet
Binary file not shown.
35 changes: 19 additions & 16 deletions make_avet.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,22 +120,6 @@ int main (int argc, char **argv)
fprintf (file_def, "#define LVALUE\n");
fclose(file_def);
}
else if (kvalue)
{
//write KVALUE to defs.h
FILE *file_def;
file_def = fopen ("defs.h","w");

if (file_def == NULL)
{
printf ("Error open defs.h\n");
return -1;
}

fseek (file_def, 0, SEEK_END);
fprintf (file_def, "#define KVALUE \"%s\"\n", kvalue);
fclose(file_def);
}

// write shellcode from a given file to defs.h
else if (fvalue)
Expand Down Expand Up @@ -229,6 +213,24 @@ int main (int argc, char **argv)

fclose(file_def);

//the killswitch
if (kvalue)
{
//write KVALUE to defs.h
FILE *file_def;
file_def = fopen ("defs.h","a");

if (file_def == NULL)
{
printf ("Error open defs.h\n");
return -1;
}

fseek (file_def, 0, SEEK_END);
fprintf (file_def, "#define KVALUE \"%s\"\n", kvalue);
fclose(file_def);
}

} //main

void print_help()
Expand All @@ -241,6 +243,7 @@ void print_help()
printf(" Note: with -l -E is mandatory\n");
//printf("-A use metasploits ASCII encryption, usage is like -E\n");
printf("-F use fopen sandbox evasion\n");
printf("-k \"killswitch\" sandbox evasion with gethostbyname\n");
printf("-X compile for 64 bit\n");
printf("-p print debug information\n");
printf("-h help\n\n");
Expand Down

0 comments on commit b7b788f

Please sign in to comment.