Guest User

a guest
Sep 29th, 2014
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import urllib.parse
  2. import re
  3. import base64
  5. # for decode
  7. f = open('param','r')
  8. for l in f:
  9.     un = urllib.parse.unquote(l).split('&')
  10.     part = re.findall('z0=(.*)',un[1])[0]
  11.     print('\n')
  12.     print(base64.b64decode(part))
  14.     if len(un) == 3:
  15.         part = re.findall('z1=(.*)',un[2])[0]
  16.         print('\n')
  17.         print(part)
  18.         print(base64.b64decode(part))
  20.     print('\n\n')
  23. # create x.tar.gz
  25. bina = bytes([
  26.         0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31,
  27.         0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d,
  28.         0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x53,
  29.         0x75, 0x6e, 0x2c, 0x20, 0x30, 0x37, 0x20, 0x53,
  30.         0x65, 0x70, 0x20, 0x32, 0x30, 0x31, 0x34, 0x20,
  31.         0x31, 0x36, 0x3a, 0x33, 0x34, 0x3a, 0x32, 0x33,
  32.         0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65,
  33.         0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70,
  34.         0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32,
  35.         0x2e, 0x31, 0x35, 0x20, 0x28, 0x43, 0x65, 0x6e,
  36.         0x74, 0x4f, 0x53, 0x29, 0x0d, 0x0a, 0x58, 0x2d,
  37.         0x50, 0x6f, 0x77, 0x65, 0x72, 0x65, 0x64, 0x2d,
  38.         0x42, 0x79, 0x3a, 0x20, 0x50, 0x48, 0x50, 0x2f,
  39.         0x35, 0x2e, 0x33, 0x2e, 0x33, 0x0d, 0x0a, 0x56,
  40.         0x61, 0x72, 0x79, 0x3a, 0x20, 0x41, 0x63, 0x63,
  41.         0x65, 0x70, 0x74, 0x2d, 0x45, 0x6e, 0x63, 0x6f,
  42.         0x64, 0x69, 0x6e, 0x67, 0x0d, 0x0a, 0x43, 0x6f,
  43.         0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65,
  44.         0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x31, 0x38,
  45.         0x30, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65,
  46.         0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x63,
  47.         0x6c, 0x6f, 0x73, 0x65, 0x0d, 0x0a, 0x43, 0x6f,
  48.         0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79,
  49.         0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74,
  50.         0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3b, 0x20, 0x63,
  51.         0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, 0x55,
  52.         0x54, 0x46, 0x2d, 0x38, 0x0d, 0x0a, 0x0d, 0x0a,
  53.         0x2d, 0x3e, 0x7c, 0x1f, 0x8b, 0x08, 0x00, 0x32,
  54.         0x85, 0x0c, 0x54, 0x00, 0x03, 0xed, 0xcf, 0xbd,
  55.         0x0a, 0xc2, 0x30, 0x18, 0x85, 0xe1, 0xce, 0x5e,
  56.         0x45, 0xaf, 0xc0, 0x26, 0xfd, 0x73, 0x96, 0x0e,
  57.         0x52, 0x70, 0xeb, 0xe0, 0x18, 0xa2, 0x44, 0x5b,
  58.         0x2c, 0xb6, 0xa4, 0xd1, 0x0a, 0xe2, 0xbd, 0x5b,
  59.         0x05, 0x97, 0x0e, 0x3a, 0x15, 0x11, 0xde, 0x67,
  60.         0x39, 0xc3, 0x77, 0x86, 0xf3, 0x5d, 0xb4, 0x0d,
  61.         0xfa, 0xbe, 0x0f, 0xf6, 0xb5, 0x3e, 0xcc, 0xdd,
  62.         0xd5, 0x79, 0x13, 0x10, 0x83, 0x34, 0x8e, 0x5f,
  63.         0x39, 0x18, 0xa7, 0x10, 0x49, 0xea, 0xc9, 0x30,
  64.         0x16, 0x61, 0x94, 0xc8, 0x45, 0x34, 0xf4, 0x64,
  65.         0xf8, 0xac, 0xfb, 0x62, 0x8a, 0x31, 0x63, 0xe7,
  66.         0xce, 0x69, 0xeb, 0xfb, 0x9e, 0x6d, 0x9a, 0x8f,
  67.         0xcf, 0x7f, 0xbb, 0xff, 0xa9, 0xbc, 0x58, 0xdd,
  68.         0xb2, 0xb2, 0x3a, 0x69, 0x95, 0x95, 0xa2, 0x6d,
  69.         0x8d, 0x55, 0x79, 0xa7, 0x96, 0xaa, 0xa8, 0xab,
  70.         0xdd, 0x51, 0xad, 0x2b, 0xe7, 0x6a, 0xa3, 0x36,
  71.         0x66, 0xdb, 0x95, 0x46, 0xca, 0xfb, 0xec, 0xd7,
  72.         0x6b, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  73.         0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6f,
  74.         0x0f, 0xff, 0xbf, 0xb2, 0x3d, 0x00, 0x28, 0x00,
  75.         0x00, 0x7c, 0x3c, 0x2d]);
  77. of = open('bina','wb')
  78. of.write(bina.split(b'->|')[1].split(b'|<-')[0])
RAW Paste Data Copied