Skip to content

Instantly share code, notes, and snippets.

View rez96-cyber's full-sized avatar

rez96-cyber

  • Joined Oct 30, 2025
View GitHub Profile
@rez96-cyber
rez96-cyber / reentrancy-attack...ReentrancyTest.t.sol
Created November 1, 2025 14:55
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.30+commit.73712a01.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "forge-std/Test.sol";
import "forge-std/console.sol";
import "../src/Vulnerable.sol";
import "../src/Attack.sol";
contract ReentrancyTest is Test {
Vulnerable public vulnerable;
@rez96-cyber
rez96-cyber / reentrancy-attack...Vulnerable.sol
Created November 1, 2025 14:54
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.30+commit.73712a01.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract Vulnerable {
mapping(address => uint) public balances;
function deposit() public payable {
balances[msg.sender] += msg.value;
}
@rez96-cyber
rez96-cyber / reentrancy-attack...Attack.sol
Created November 1, 2025 14:53
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.30+commit.73712a01.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./Vulnerable.sol";
contract Attack {
Vulnerable public vulnerable;
uint public attackCount;
constructor(address _vulnerable) {
@rez96-cyber
rez96-cyber / .prettierrc.json
Created November 1, 2025 14: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.30+commit.73712a01.js&optimize=false&runs=200&gist=
{
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false