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
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.19; | |
import "forge-std/Test.sol"; | |
contract Utility { | |
error BadCalldata(); | |
error NonPayable(); | |
error Payable(); | |
error NoCode(); |
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.8.0; | |
import "forge-std/Test.sol"; | |
import "forge-std/console2.sol"; | |
contract ContractA { | |
function destroy() public { | |
selfdestruct(payable(0)); | |
} |
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
// by https://twitter.com/publicqi & https://twitter.com/shoucccc | |
contract PuzzleBoxSolution { | |
constructor() payable {} | |
fallback() payable external { | |
if (msg.data.length > 32) { | |
assembly{ | |
// let x := 0x80 | |
let target := 0x69209d8a7d258515ec9a4d25f7be1db85cb1b826 |
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
/* | |
```_____````````````_````_`````````````````_``````````````_```````````` | |
``/`____|``````````|`|``|`|```````````````|`|````````````|`|``````````` | |
`|`|`````___```___`|`|`_|`|__```___```___`|`|`__```````__|`|`_____```__ | |
`|`|````/`_`\`/`_`\|`|/`/`'_`\`/`_`\`/`_`\|`|/`/``````/`_``|/`_`\`\`/`/ | |
`|`|___|`(_)`|`(_)`|```<|`|_)`|`(_)`|`(_)`|```<```_``|`(_|`|``__/\`V`/` | |
``\_____\___/`\___/|_|\_\_.__/`\___/`\___/|_|\_\`(_)``\__,_|\___|`\_/`` | |
``````````````````````````````````````````````````````````````````````` | |
``````````````````````````````````````````````````````````````````````` | |
*/ |
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
// SPDX-License-Identifier: MIT | |
pragma solidity 0.8.17; | |
function isAsciiPrintableShortString(string memory str) pure returns (bool) { | |
unchecked { | |
uint256 b = uint256(bytes32(hex"0101010101010101010101010101010101010101010101010101010101010101")); | |
bytes32 chars = bytes32(bytes(str)); | |
uint256 len = bytes(str).length; |
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
// SPDX-License-Identifier: MIT | |
pragma solidity >=0.8.19; | |
import { Script } from "forge-std/Script.sol"; | |
abstract contract BaseScript is Script { | |
/// @dev Included to enable compilation of the script without a $MNEMONIC environment variable. | |
string internal constant TEST_MNEMONIC = "test test test test test test test test test test test junk"; | |
/// @dev Needed for the deterministic deployments. |
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
echo "" | |
echo "************ Github Dork Links (must be logged in) *******************" | |
echo "" | |
echo " password" | |
echo "https://github.com/search?q="hackertarget.site"+password&type=Code" | |
echo "https://github.com/search?q=""hackertarget""+password&type=Code" | |
echo "" | |
echo " npmrc _auth" |
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
// SPDX-License-Identifier: UNLICENSED | |
pragma solidity ^0.8.15; | |
import "forge-std/Script.sol"; | |
// L1 | |
import { L1CrossDomainMessenger } from "../L1/L1CrossDomainMessenger.sol"; | |
import { L1ERC721Bridge } from "../L1/L1ERC721Bridge.sol"; | |
import { L1StandardBridge } from "../L1/L1StandardBridge.sol"; | |
import { L2OutputOracle } from "../L1/L2OutputOracle.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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.8; | |
/** | |
* @title ImmutableStringLib | |
* @author Zer0dot | |
* | |
* @notice This library introduces an abstraction to store and decode immutable strings. | |
* This is necessary because simply casting a string to a bytes32 variable will lose the | |
* length, which will be hardcoded as 32 upon re-converting via abi.encode. |