File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ int main(int argc, char **argv) {
4343
4444 bool a_debug = false;
4545 bool a_clear = false;
46- bool is_stdin = false ;
46+ bool is_stdin = strcmp ( argv [ argc - 1 ], "-" ) == 0 ;
4747
4848 for (int i = 1 ; i < argc - 1 ; i ++ ) {
4949 if (strcmp (argv [i ], "-d" ) == 0 || strcmp (argv [i ], "--debug" ) == 0 ) {
@@ -59,8 +59,6 @@ int main(int argc, char **argv) {
5959 }
6060 }
6161
62- is_stdin = strcmp (argv [argc - 1 ], "-" ) == 0 ;
63-
6462 FILE * f = 0 ;
6563
6664 if (is_stdin ) {
@@ -97,9 +95,8 @@ int main(int argc, char **argv) {
9795 len ++ ;
9896 }
9997
100- if (!is_stdin ) {
98+ if (!is_stdin )
10199 fclose (f );
102- }
103100
104101 size_t final_len = len ;
105102 if (a_debug ) {
@@ -120,8 +117,6 @@ int main(int argc, char **argv) {
120117 if (!shellcode )
121118 die ("Could not allocate shellcode" );
122119
123- memset (shellcode , 0x90 , final_len );
124-
125120 size_t i = 0 ;
126121
127122 if (a_clear ) {
You can’t perform that action at this time.
0 commit comments