Codex #58 preserved by 0xd7b064F257428e7B0d5f6216BC31EcDebdCCad62
///////////////////////////////////////////////////////////////////////////////////////////////////// // ____ __ __ ___ ___ ___ ______ ___ ___ ____ ____ _ _ // // || )) || || // \\ // // \\ | || | // // \\ || \\ || \\ // // // ||=) || || (( ___ (( ||=|| || (( (( )) || )) ||== )X( // // ||_)) \\_// \\_|| \\__ || || || \\__ \\_// ||_// ||___ // \\ // // // /////////////////////////////////////////////////////////////////////////////////////////////////////
// SPDX-License-Identifier: WTFPL pragma solidity ^0.8.30; import ../interface/BugCat.sol; contract ReentrancyCat is BugCat { mapping(address => uint) public balance; function deposit() public payable { balance[msg.sender] += msg.value; } function withdraw() public { (bool success, ) = msg.sender.call{value: balance[msg.sender]}(""); require(success); balance[msg.sender] = 0; } function caress() public { if (address(this).balance == 0) { emit Meow(msg.sender, "reentrancy"); } } function remember() external view returns (bool) { address TheDAO = 0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413; return TheDAO.code.length > 0; } }
Codex #58 preserved by 0xd7b064F257428e7B0d5f6216BC31EcDebdCCad62
///////////////////////////////////////////////////////////////////////////////////////////////////// // ____ __ __ ___ ___ ___ ______ ___ ___ ____ ____ _ _ // // || )) || || // \\ // // \\ | || | // // \\ || \\ || \\ // // // ||=) || || (( ___ (( ||=|| || (( (( )) || )) ||== )X( // // ||_)) \\_// \\_|| \\__ || || || \\__ \\_// ||_// ||___ // \\ // // // /////////////////////////////////////////////////////////////////////////////////////////////////////
-+---+#++++++++-----++#+++-++++-----++++++++--------+#+++++++---+++#+. .......+###++++------+#+++--- -+---+#++++++#+++---++#++++++++++--++#+#-++++++++++-+#+++++++++--++##. . . +#+..++++++---+#++++++ -+++++##++++#-..-##########+++++++++++.. .+++++++++++#+++++++++..-###- .. +####+...+++++###+++++ -++---+++++++- ...-++++++++++#+++++#-.... -#+++++++++++++++++#+++++-.. ... +--##+-+++++++++++++++ .++--------++-...--.-#+++++++#++++-...--.. #++++++++--------+#+--++... .++#++++++#++++++++------ .++++++-----+-...---. -+++++----+..+..... ++++++++++++++++++++---+##. .. . +++-+++#+----+++++---- -++++++++++++- ...-+....... . ...--..... ++++++++++++++++++---+#+.... .........---+#+++++++++++--- -############+. ..-.. .. .... .-...-+--.-. ++####+#####+..+--##+....... ...-##############+++++++++ -----+#+++++++.... .. ........... ...... .+##+#..---.......++- ....--....++----+--++-++++++#+++-++ -----+#+++++++-.. . .... ...-........ ....++++-.. ....... ...---.-++#-..-+++++--------+#+----- -++--+#+++++++. .. ...... ........ . ...-- ..... .. .-... ..-....-.....-++-...-----+++----- -++--+#+++++#- .... . .. ... .. . ... . ..... ..... ...++--------+++--+++#++---- -++++####+##+. .-+.#- . .+.++-... ...... ........ .-.. .....----.-++++##+++++###+++++ -++------++++. -+.-+. .. .+-..-+... ..... . ....... .... ........ .++---++++++++++++++ -+++------+++. .---. .... .-+++- ........ .... ....... .. ..... .--++...-+++++++------ -+++-++---++++ .............. ... ... ..... ....-......... .... ... . -#-..+++#+++++++++----- -++++++----------. .-+++- . ........ ... . ..... .... ... .... .. -++-..#++++++++++---+ -+++######+++----.... .-................... . ... .... .. ... ..-......-... +####++##########++ -----+#+--++++-.--.....--... ........-. . ....... . .. .. ..... .. .++#...--++--+#++---- .----++++++-.-+--++#+... ... ..... . .. . ....... .........---##+++++#+----- -+---+#++--+++--+++++##+-...... .... ... ..... ..... .-. .. .... ....++-++++#++---- -++-+++++++++++++++++##+-. . .... .. .-.. .... . .....-#+-+++#+++--- -##+###################+... . .. .-. ..... ....--.. .. ... . .... .++#######++++ ------------++#++++++++++... ... . .-. ....... ... .-. .... ..... ...--. --++++++------ -+-----------+#+++++++++#+...........--.... .. ..-. .. .. ... ..+#+. ...+..-+-------- -+++++-------+#++++++++++#+........ .++. .. .... . .. .--...-++++++-. .+#-.-++----+- -+++++++++-+++#+++++++++++++. .. .+---... ...... ..-..... . .++++++++++++ ... -+#++++++---+ -++++########################-. ..----.... . .....-+####+-. ... .---+########. ..--+######++ -----+#+++++++-------+++++++++##---... ... .. -#++++++++++###- . .#++++#+++++ .-++#+------ -----++++++++++------+#+++++#++. ..... ... ....###+++--------++.. .----++++++#. ... ..+#++---- -+---+#++++++++++----+#++#+.. . .......... ......-+++++++------++-. -++++++---++- ..-+#++++--- -++++++++++++++++++++++-... . .. ......-+##++++++++++--++++. ...++++++++-+++##+++++#++++++ -++++++++++++##+++##+............ ......---....+###++++++######+###- ....++#################++++++ -++---------++#+++-.... . ....+++--. . -+#+++++-------+#+++++#+.. ..+#+-------+#+------------+ .+++---------+#+. .. ... .. ..+###+.. .-+++++++++------+#+++++++######++-------+#++++---------+ .++++++---++-........ . .-+++++++..... .-#++++++++++----++++++++++++++++++------+#++++++-------+ -++++++++++......- . .+++++++++. .. .--+##++++++++++++++++++++++++++++++++++----+#++++-+++++---+ -+++######-.-. --. ...++#######+..... .---++##+##############################################+++++ -----+#+++#+-..-.. .-#++-+++++++ .. . -++----------+# BUGCAT CODEX: COMPLETE #+----+ -+---+#++++++++##+++++#+++++-+-.... .+#+++---------+# [reentrancy] [predictable] [overflow] #++---- -++--++++++++++++----+#++++++-.. ..-+++++++++-----+# [unprotected] [misspelled] #+++--- -+++++#+++++++++++++++#++++-. ...-#+++++++++++++++# All wounds witnessed. #++++++ -++++++++++++##+++++++#-.... . ..+##########################################++#############+++++++ --+----------+#+++-++#............+#++------+#+++-----------+#+++++---------+++--------------------- .-++---------+#++++++#....... .+#+++-------+#+++++++-------+#+++++++-------+++-----++++------------ .-++--------++#++++--++++--+++++++---++++++++#+++++++++----++#++++++++++----+++----+++++++----------