Skip to content

Instantly share code, notes, and snippets.

View mattaereal's full-sized avatar
♦️
Hacking my way into consciousness ~

Matías Aereal Aeón mattaereal

♦️
Hacking my way into consciousness ~
View GitHub Profile
@mattaereal
mattaereal / 79.137.192.10.txt
Created January 5, 2024 18:19
list of scam websites hosted in 79.137.192.10
listed the 5th of january of 2024
framegovernance-claim.com
albertatechjobs.com
altversedrop.com
authmee6.org
authvulcan.net
authyvulcan.com
authyvulcan.net
bigtimegame.net
bitscheck.org
@mattaereal
mattaereal / ReturnOrRever.sol
Created May 11, 2023 23:26
Return or revert scenarios.
// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.4;
contract RevertWithString {
function buy(uint amount) public payable {
if (msg.value < amount)
revert("Not enough Ether provided.");
}
// transaction cost 21499 gas
// execution cost 295 gas
@mattaereal
mattaereal / CatchMeIfYouCan.sol
Last active May 4, 2023 18:18
CatchMeIfYouCan.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.17;
interface DataFeed { function getData() external returns (uint value); }
contract DataFeedOK is DataFeed {
function getData() public pure returns (uint value) {
return 1;
}
}
@mattaereal
mattaereal / ReturnOrRevert.sol
Last active April 27, 2023 14:33
Return or Revert, gas costs.
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.2 <0.9.0;
error DataResult(bytes32 data);
contract ReturnOrRevert {
function getDataByRevert(string memory x) public pure {
bytes32 data = keccak256(bytes(x));
revert DataResult(data);
@mattaereal
mattaereal / getAddr.fish
Created March 10, 2023 16:53
Manages a list of addresses locally.
function getAddr
set -g addresses_file "$HOME/.ethereum_addresses"
# Create the addresses file if it doesn't exist
if test ! -f $addresses_file
touch $addresses_file
end
# Parse the command-line arguments
switch $argv[1]
@mattaereal
mattaereal / ExploitWETH10.sol
Last active February 23, 2023 19:32
ExploitWETH10
// SPDX-License-Identifier: Manija
/** This exploit consists on abusing a reentrancy.
* This can be done as a consequence of two things:
* 1) The inherited public/external functions from ERC20 are not Reentrancy
* protected
* 2) Check-Effects-Interaction is missing at withdrawAll().
*
* This two cause the following to be possible:
* When you call withdrawAll(), the sendValue allows an attacker to take
* control over the flow of the transaction. And since _burn_, which uses
# If you want to use it, copy this file as Makefile.platform and adjust it to your needs
# Run 'make PLATFORM=' to get an exhaustive list of possible parameters for this file.
#PLATFORM=PM3RDV4
PLATFORM=PM3GENERIC
PLATFORM_SIZE=256
STANDALONE=
SKIP_EM4x50=1
SKIP_ISO15693=1
SKIP_LEGICRF=1
@mattaereal
mattaereal / test.sol
Created August 6, 2018 23:26
Hang solidity issue 4718
pragma solidity ^0.4.24;
contract test {
function f() public {
int YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY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