23.03.2013 Views

Quick introduction to reverse engineering for beginners

Quick introduction to reverse engineering for beginners

Quick introduction to reverse engineering for beginners

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

};<br />

fwrite (buf+(3+4), real_flen, 1, f);<br />

fclose (f);<br />

free (buf);<br />

// run: input output 0/1 password<br />

// 0 <strong>for</strong> encrypt, 1 <strong>for</strong> decrypt<br />

int main(int argc, char *argv[])<br />

{<br />

if (argc!=5)<br />

{<br />

printf ("Incorrect parameters!\n");<br />

return 1;<br />

};<br />

};<br />

if (strcmp (argv[3], "0")==0)<br />

crypt_file (argv[1], argv[2], argv[4]);<br />

else<br />

if (strcmp (argv[3], "1")==0)<br />

decrypt_file (argv[1], argv[2], argv[4]);<br />

else<br />

printf ("Wrong param %s\n", argv[3]);<br />

return 0;<br />

182

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!