diff --git a/mythril/ether/ethcontract.py b/mythril/ether/ethcontract.py index 2a175ff3..197376b0 100644 --- a/mythril/ether/ethcontract.py +++ b/mythril/ether/ethcontract.py @@ -15,8 +15,6 @@ class ETHContract(persistent.Persistent): # Dynamic contract addresses of the format __[contract-name]_____________ are replaced with a generic address code = re.sub(r'(_+.*_+)', 'aa' * 20, code) - - print(code) self.code = code self.disassembly = Disassembly(self.code) diff --git a/tests/testdata/inputs/weak_random.sol.o b/tests/testdata/inputs/weak_random.sol.o deleted file mode 100644 index 4ee3190f..00000000 --- a/tests/testdata/inputs/weak_random.sol.o +++ /dev/null @@ -1 +0,0 @@ -606060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063c7dbbc47146101d1578063d7c81b55146101fa578063dd11247e14610223578063dfd50f521461024c578063e3ac5d26146102b6578063e9874106146102df575b6000803491505b60326722b1c8c1227a000081151561009357fe5b0482101580156100a557506032600154105b1561016f576001600081548092919060010191905055905060408051908101604052803373ffffffffffffffffffffffffffffffffffffffff1681526020016000548152506002600083815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506020820151816001015590505060326722b1c8c1227a000081151561016557fe5b048203915061007f565b6032600154141561018357610182610308565b5b60008211156101cd573373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f1935050505015156101cc57600080fd5b5b5050005b34156101dc57600080fd5b6101e461051d565b6040518082815260200191505060405180910390f35b341561020557600080fd5b61020d610523565b6040518082815260200191505060405180910390f35b341561022e57600080fd5b610236610529565b6040518082815260200191505060405180910390f35b341561025757600080fd5b61026d600480803590602001909190505061052e565b604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390f35b34156102c157600080fd5b6102c9610572565b6040518082815260200191505060405180910390f35b34156102ea57600080fd5b6102f261057e565b6040518082815260200191505060405180910390f35b6000806000806000806002600060324173ffffffffffffffffffffffffffffffffffffffff1681151561033757fe5b06815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1695506002600060323373ffffffffffffffffffffffffffffffffffffffff1681151561039257fe5b06815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169450449350858585604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c010000000000000000000000000281526014018281526020019350505050604051809103902092506032836001900481151561047857fe5b0691506002600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600080815480929190600101919050555060006001819055508073ffffffffffffffffffffffffffffffffffffffff166108fc6722b1c8c1227a00009081150290604051600060405180830381858888f19350505050151561051557600080fd5b505050505050565b60015481565b60005481565b603281565b60026020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010154905082565b6722b1c8c1227a000081565b60326722b1c8c1227a000081151561059257fe5b04815600a165627a7a7230582099861dd2fb40dc8a6a20e63397adb070d01ccb457a350e4682f9f8d1cceb29c30029 \ No newline at end of file diff --git a/tests/testdata/outputs_expected/weak_random.sol.json b/tests/testdata/outputs_expected/weak_random.sol.json deleted file mode 100644 index 53c6fb41..00000000 --- a/tests/testdata/outputs_expected/weak_random.sol.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "success": true, - "error": null, - "issues": [ - { - "title": "Dependence on predictable environment variable", - "description": "In the function `_function_0xe9874106` the following predictable state variables are used to determine Ether recipient:\n- block.coinbase\n", - "function": "_function_0xe9874106", - "type": "Warning", - "address": 1285, - "debug": "", - "filename": "/inputs/weak_random.sol", - "lineno": 47, - "code": "winningAddress.transfer(prize)" - }, - { - "title": "Ether send", - "description": "In the function `_function_0xe9874106` a non-zero amount of Ether is sent to an address taken from storage slot 0.\nThere is a check on storage index 0. This storage slot can be written to by calling the function `fallback`.\n\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.", - "function": "_function_0xe9874106", - "type": "Warning", - "address": 1285, - "debug": "", - "filename": "/inputs/weak_random.sol", - "lineno": 47, - "code": "winningAddress.transfer(prize)" - }, - { - "title": "Exception state", - "description": "A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking. ", - "function": "fallback", - "type": "Informational", - "address": 356, - "debug": "", - "filename": "/inputs/weak_random.sol", - "lineno": 11, - "code": "prize / totalTickets" - }, - { - "title": "Exception state", - "description": "A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking. ", - "function": "_function_0xe9874106", - "type": "Informational", - "address": 146, - "debug": "", - "filename": "/inputs/weak_random.sol", - "lineno": 11, - "code": "prize / totalTickets" - }, - { - "title": "Integer Overflow ", - "description": "A possible integer overflow exists in the function `_function_0xe9874106`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.", - "function": "_function_0xe9874106", - "type": "Warning", - "address": 1216, - "debug": "", - "filename": "/inputs/weak_random.sol", - "lineno": 45, - "code": "gameId++" - }, - { - "title": "Integer Overflow ", - "description": "A possible integer overflow exists in the function `_function_0xe9874106`.\nThe addition or multiplication may result in a value higher than the maximum representable integer.", - "function": "_function_0xe9874106", - "type": "Warning", - "address": 262, - "debug": "", - "filename": "/inputs/weak_random.sol", - "lineno": 22, - "code": "contestants[currTicket] = Contestant(msg.sender, gameId)" - } - ] -} \ No newline at end of file diff --git a/tests/testdata/outputs_expected/weak_random.sol.o.easm b/tests/testdata/outputs_expected/weak_random.sol.o.easm deleted file mode 100644 index 32b9f7c2..00000000 --- a/tests/testdata/outputs_expected/weak_random.sol.o.easm +++ /dev/null @@ -1,760 +0,0 @@ -0 PUSH1 0x60 -2 PUSH1 0x40 -4 MSTORE -5 PUSH1 0x04 -7 CALLDATASIZE -8 LT -9 PUSH2 0x0078 -12 JUMPI -13 PUSH1 0x00 -15 CALLDATALOAD -16 PUSH29 0x0100000000000000000000000000000000000000000000000000000000 -46 SWAP1 -47 DIV -48 PUSH4 0xffffffff -53 AND -54 DUP1 -55 PUSH4 0xc7dbbc47 -60 EQ -61 PUSH2 0x01d1 -64 JUMPI -65 DUP1 -66 PUSH4 0xd7c81b55 -71 EQ -72 PUSH2 0x01fa -75 JUMPI -76 DUP1 -77 PUSH4 0xdd11247e -82 EQ -83 PUSH2 0x0223 -86 JUMPI -87 DUP1 -88 PUSH4 0xdfd50f52 -93 EQ -94 PUSH2 0x024c -97 JUMPI -98 DUP1 -99 PUSH4 0xe3ac5d26 -104 EQ -105 PUSH2 0x02b6 -108 JUMPI -109 DUP1 -110 PUSH4 0xe9874106 -115 EQ -116 PUSH2 0x02df -119 JUMPI -120 JUMPDEST -121 PUSH1 0x00 -123 DUP1 -124 CALLVALUE -125 SWAP2 -126 POP -127 JUMPDEST -128 PUSH1 0x32 -130 PUSH8 0x22b1c8c1227a0000 -139 DUP2 -140 ISZERO -141 ISZERO -142 PUSH2 0x0093 -145 JUMPI -146 ASSERT_FAIL -147 JUMPDEST -148 DIV -149 DUP3 -150 LT -151 ISZERO -152 DUP1 -153 ISZERO -154 PUSH2 0x00a5 -157 JUMPI -158 POP -159 PUSH1 0x32 -161 PUSH1 0x01 -163 SLOAD -164 LT -165 JUMPDEST -166 ISZERO -167 PUSH2 0x016f -170 JUMPI -171 PUSH1 0x01 -173 PUSH1 0x00 -175 DUP2 -176 SLOAD -177 DUP1 -178 SWAP3 -179 SWAP2 -180 SWAP1 -181 PUSH1 0x01 -183 ADD -184 SWAP2 -185 SWAP1 -186 POP -187 SSTORE -188 SWAP1 -189 POP -190 PUSH1 0x40 -192 DUP1 -193 MLOAD -194 SWAP1 -195 DUP2 -196 ADD -197 PUSH1 0x40 -199 MSTORE -200 DUP1 -201 CALLER -202 PUSH20 0xffffffffffffffffffffffffffffffffffffffff -223 AND -224 DUP2 -225 MSTORE -226 PUSH1 0x20 -228 ADD -229 PUSH1 0x00 -231 SLOAD -232 DUP2 -233 MSTORE -234 POP -235 PUSH1 0x02 -237 PUSH1 0x00 -239 DUP4 -240 DUP2 -241 MSTORE -242 PUSH1 0x20 -244 ADD -245 SWAP1 -246 DUP2 -247 MSTORE -248 PUSH1 0x20 -250 ADD -251 PUSH1 0x00 -253 SHA3 -254 PUSH1 0x00 -256 DUP3 -257 ADD -258 MLOAD -259 DUP2 -260 PUSH1 0x00 -262 ADD -263 PUSH1 0x00 -265 PUSH2 0x0100 -268 EXP -269 DUP2 -270 SLOAD -271 DUP2 -272 PUSH20 0xffffffffffffffffffffffffffffffffffffffff -293 MUL -294 NOT -295 AND -296 SWAP1 -297 DUP4 -298 PUSH20 0xffffffffffffffffffffffffffffffffffffffff -319 AND -320 MUL -321 OR -322 SWAP1 -323 SSTORE -324 POP -325 PUSH1 0x20 -327 DUP3 -328 ADD -329 MLOAD -330 DUP2 -331 PUSH1 0x01 -333 ADD -334 SSTORE -335 SWAP1 -336 POP -337 POP -338 PUSH1 0x32 -340 PUSH8 0x22b1c8c1227a0000 -349 DUP2 -350 ISZERO -351 ISZERO -352 PUSH2 0x0165 -355 JUMPI -356 ASSERT_FAIL -357 JUMPDEST -358 DIV -359 DUP3 -360 SUB -361 SWAP2 -362 POP -363 PUSH2 0x007f -366 JUMP -367 JUMPDEST -368 PUSH1 0x32 -370 PUSH1 0x01 -372 SLOAD -373 EQ -374 ISZERO -375 PUSH2 0x0183 -378 JUMPI -379 PUSH2 0x0182 -382 PUSH2 0x0308 -385 JUMP -386 JUMPDEST -387 JUMPDEST -388 PUSH1 0x00 -390 DUP3 -391 GT -392 ISZERO -393 PUSH2 0x01cd -396 JUMPI -397 CALLER -398 PUSH20 0xffffffffffffffffffffffffffffffffffffffff -419 AND -420 PUSH2 0x08fc -423 DUP4 -424 SWAP1 -425 DUP2 -426 ISZERO -427 MUL -428 SWAP1 -429 PUSH1 0x40 -431 MLOAD -432 PUSH1 0x00 -434 PUSH1 0x40 -436 MLOAD -437 DUP1 -438 DUP4 -439 SUB -440 DUP2 -441 DUP6 -442 DUP9 -443 DUP9 -444 CALL -445 SWAP4 -446 POP -447 POP -448 POP -449 POP -450 ISZERO -451 ISZERO -452 PUSH2 0x01cc -455 JUMPI -456 PUSH1 0x00 -458 DUP1 -459 REVERT -460 JUMPDEST -461 JUMPDEST -462 POP -463 POP -464 STOP -465 JUMPDEST -466 CALLVALUE -467 ISZERO -468 PUSH2 0x01dc -471 JUMPI -472 PUSH1 0x00 -474 DUP1 -475 REVERT -476 JUMPDEST -477 PUSH2 0x01e4 -480 PUSH2 0x051d -483 JUMP -484 JUMPDEST -485 PUSH1 0x40 -487 MLOAD -488 DUP1 -489 DUP3 -490 DUP2 -491 MSTORE -492 PUSH1 0x20 -494 ADD -495 SWAP2 -496 POP -497 POP -498 PUSH1 0x40 -500 MLOAD -501 DUP1 -502 SWAP2 -503 SUB -504 SWAP1 -505 RETURN -506 JUMPDEST -507 CALLVALUE -508 ISZERO -509 PUSH2 0x0205 -512 JUMPI -513 PUSH1 0x00 -515 DUP1 -516 REVERT -517 JUMPDEST -518 PUSH2 0x020d -521 PUSH2 0x0523 -524 JUMP -525 JUMPDEST -526 PUSH1 0x40 -528 MLOAD -529 DUP1 -530 DUP3 -531 DUP2 -532 MSTORE -533 PUSH1 0x20 -535 ADD -536 SWAP2 -537 POP -538 POP -539 PUSH1 0x40 -541 MLOAD -542 DUP1 -543 SWAP2 -544 SUB -545 SWAP1 -546 RETURN -547 JUMPDEST -548 CALLVALUE -549 ISZERO -550 PUSH2 0x022e -553 JUMPI -554 PUSH1 0x00 -556 DUP1 -557 REVERT -558 JUMPDEST -559 PUSH2 0x0236 -562 PUSH2 0x0529 -565 JUMP -566 JUMPDEST -567 PUSH1 0x40 -569 MLOAD -570 DUP1 -571 DUP3 -572 DUP2 -573 MSTORE -574 PUSH1 0x20 -576 ADD -577 SWAP2 -578 POP -579 POP -580 PUSH1 0x40 -582 MLOAD -583 DUP1 -584 SWAP2 -585 SUB -586 SWAP1 -587 RETURN -588 JUMPDEST -589 CALLVALUE -590 ISZERO -591 PUSH2 0x0257 -594 JUMPI -595 PUSH1 0x00 -597 DUP1 -598 REVERT -599 JUMPDEST -600 PUSH2 0x026d -603 PUSH1 0x04 -605 DUP1 -606 DUP1 -607 CALLDATALOAD -608 SWAP1 -609 PUSH1 0x20 -611 ADD -612 SWAP1 -613 SWAP2 -614 SWAP1 -615 POP -616 POP -617 PUSH2 0x052e -620 JUMP -621 JUMPDEST -622 PUSH1 0x40 -624 MLOAD -625 DUP1 -626 DUP4 -627 PUSH20 0xffffffffffffffffffffffffffffffffffffffff -648 AND -649 PUSH20 0xffffffffffffffffffffffffffffffffffffffff -670 AND -671 DUP2 -672 MSTORE -673 PUSH1 0x20 -675 ADD -676 DUP3 -677 DUP2 -678 MSTORE -679 PUSH1 0x20 -681 ADD -682 SWAP3 -683 POP -684 POP -685 POP -686 PUSH1 0x40 -688 MLOAD -689 DUP1 -690 SWAP2 -691 SUB -692 SWAP1 -693 RETURN -694 JUMPDEST -695 CALLVALUE -696 ISZERO -697 PUSH2 0x02c1 -700 JUMPI -701 PUSH1 0x00 -703 DUP1 -704 REVERT -705 JUMPDEST -706 PUSH2 0x02c9 -709 PUSH2 0x0572 -712 JUMP -713 JUMPDEST -714 PUSH1 0x40 -716 MLOAD -717 DUP1 -718 DUP3 -719 DUP2 -720 MSTORE -721 PUSH1 0x20 -723 ADD -724 SWAP2 -725 POP -726 POP -727 PUSH1 0x40 -729 MLOAD -730 DUP1 -731 SWAP2 -732 SUB -733 SWAP1 -734 RETURN -735 JUMPDEST -736 CALLVALUE -737 ISZERO -738 PUSH2 0x02ea -741 JUMPI -742 PUSH1 0x00 -744 DUP1 -745 REVERT -746 JUMPDEST -747 PUSH2 0x02f2 -750 PUSH2 0x057e -753 JUMP -754 JUMPDEST -755 PUSH1 0x40 -757 MLOAD -758 DUP1 -759 DUP3 -760 DUP2 -761 MSTORE -762 PUSH1 0x20 -764 ADD -765 SWAP2 -766 POP -767 POP -768 PUSH1 0x40 -770 MLOAD -771 DUP1 -772 SWAP2 -773 SUB -774 SWAP1 -775 RETURN -776 JUMPDEST -777 PUSH1 0x00 -779 DUP1 -780 PUSH1 0x00 -782 DUP1 -783 PUSH1 0x00 -785 DUP1 -786 PUSH1 0x02 -788 PUSH1 0x00 -790 PUSH1 0x32 -792 COINBASE -793 PUSH20 0xffffffffffffffffffffffffffffffffffffffff -814 AND -815 DUP2 -816 ISZERO -817 ISZERO -818 PUSH2 0x0337 -821 JUMPI -822 ASSERT_FAIL -823 JUMPDEST -824 MOD -825 DUP2 -826 MSTORE -827 PUSH1 0x20 -829 ADD -830 SWAP1 -831 DUP2 -832 MSTORE -833 PUSH1 0x20 -835 ADD -836 PUSH1 0x00 -838 SHA3 -839 PUSH1 0x00 -841 ADD -842 PUSH1 0x00 -844 SWAP1 -845 SLOAD -846 SWAP1 -847 PUSH2 0x0100 -850 EXP -851 SWAP1 -852 DIV -853 PUSH20 0xffffffffffffffffffffffffffffffffffffffff -874 AND -875 SWAP6 -876 POP -877 PUSH1 0x02 -879 PUSH1 0x00 -881 PUSH1 0x32 -883 CALLER -884 PUSH20 0xffffffffffffffffffffffffffffffffffffffff -905 AND -906 DUP2 -907 ISZERO -908 ISZERO -909 PUSH2 0x0392 -912 JUMPI -913 ASSERT_FAIL -914 JUMPDEST -915 MOD -916 DUP2 -917 MSTORE -918 PUSH1 0x20 -920 ADD -921 SWAP1 -922 DUP2 -923 MSTORE -924 PUSH1 0x20 -926 ADD -927 PUSH1 0x00 -929 SHA3 -930 PUSH1 0x00 -932 ADD -933 PUSH1 0x00 -935 SWAP1 -936 SLOAD -937 SWAP1 -938 PUSH2 0x0100 -941 EXP -942 SWAP1 -943 DIV -944 PUSH20 0xffffffffffffffffffffffffffffffffffffffff -965 AND -966 SWAP5 -967 POP -968 DIFFICULTY -969 SWAP4 -970 POP -971 DUP6 -972 DUP6 -973 DUP6 -974 PUSH1 0x40 -976 MLOAD -977 DUP1 -978 DUP5 -979 PUSH20 0xffffffffffffffffffffffffffffffffffffffff -1000 AND -1001 PUSH20 0xffffffffffffffffffffffffffffffffffffffff -1022 AND -1023 PUSH13 0x01000000000000000000000000 -1037 MUL -1038 DUP2 -1039 MSTORE -1040 PUSH1 0x14 -1042 ADD -1043 DUP4 -1044 PUSH20 0xffffffffffffffffffffffffffffffffffffffff -1065 AND -1066 PUSH20 0xffffffffffffffffffffffffffffffffffffffff -1087 AND -1088 PUSH13 0x01000000000000000000000000 -1102 MUL -1103 DUP2 -1104 MSTORE -1105 PUSH1 0x14 -1107 ADD -1108 DUP3 -1109 DUP2 -1110 MSTORE -1111 PUSH1 0x20 -1113 ADD -1114 SWAP4 -1115 POP -1116 POP -1117 POP -1118 POP -1119 PUSH1 0x40 -1121 MLOAD -1122 DUP1 -1123 SWAP2 -1124 SUB -1125 SWAP1 -1126 SHA3 -1127 SWAP3 -1128 POP -1129 PUSH1 0x32 -1131 DUP4 -1132 PUSH1 0x01 -1134 SWAP1 -1135 DIV -1136 DUP2 -1137 ISZERO -1138 ISZERO -1139 PUSH2 0x0478 -1142 JUMPI -1143 ASSERT_FAIL -1144 JUMPDEST -1145 MOD -1146 SWAP2 -1147 POP -1148 PUSH1 0x02 -1150 PUSH1 0x00 -1152 DUP4 -1153 DUP2 -1154 MSTORE -1155 PUSH1 0x20 -1157 ADD -1158 SWAP1 -1159 DUP2 -1160 MSTORE -1161 PUSH1 0x20 -1163 ADD -1164 PUSH1 0x00 -1166 SHA3 -1167 PUSH1 0x00 -1169 ADD -1170 PUSH1 0x00 -1172 SWAP1 -1173 SLOAD -1174 SWAP1 -1175 PUSH2 0x0100 -1178 EXP -1179 SWAP1 -1180 DIV -1181 PUSH20 0xffffffffffffffffffffffffffffffffffffffff -1202 AND -1203 SWAP1 -1204 POP -1205 PUSH1 0x00 -1207 DUP1 -1208 DUP2 -1209 SLOAD -1210 DUP1 -1211 SWAP3 -1212 SWAP2 -1213 SWAP1 -1214 PUSH1 0x01 -1216 ADD -1217 SWAP2 -1218 SWAP1 -1219 POP -1220 SSTORE -1221 POP -1222 PUSH1 0x00 -1224 PUSH1 0x01 -1226 DUP2 -1227 SWAP1 -1228 SSTORE -1229 POP -1230 DUP1 -1231 PUSH20 0xffffffffffffffffffffffffffffffffffffffff -1252 AND -1253 PUSH2 0x08fc -1256 PUSH8 0x22b1c8c1227a0000 -1265 SWAP1 -1266 DUP2 -1267 ISZERO -1268 MUL -1269 SWAP1 -1270 PUSH1 0x40 -1272 MLOAD -1273 PUSH1 0x00 -1275 PUSH1 0x40 -1277 MLOAD -1278 DUP1 -1279 DUP4 -1280 SUB -1281 DUP2 -1282 DUP6 -1283 DUP9 -1284 DUP9 -1285 CALL -1286 SWAP4 -1287 POP -1288 POP -1289 POP -1290 POP -1291 ISZERO -1292 ISZERO -1293 PUSH2 0x0515 -1296 JUMPI -1297 PUSH1 0x00 -1299 DUP1 -1300 REVERT -1301 JUMPDEST -1302 POP -1303 POP -1304 POP -1305 POP -1306 POP -1307 POP -1308 JUMP -1309 JUMPDEST -1310 PUSH1 0x01 -1312 SLOAD -1313 DUP2 -1314 JUMP -1315 JUMPDEST -1316 PUSH1 0x00 -1318 SLOAD -1319 DUP2 -1320 JUMP -1321 JUMPDEST -1322 PUSH1 0x32 -1324 DUP2 -1325 JUMP -1326 JUMPDEST -1327 PUSH1 0x02 -1329 PUSH1 0x20 -1331 MSTORE -1332 DUP1 -1333 PUSH1 0x00 -1335 MSTORE -1336 PUSH1 0x40 -1338 PUSH1 0x00 -1340 SHA3 -1341 PUSH1 0x00 -1343 SWAP2 -1344 POP -1345 SWAP1 -1346 POP -1347 DUP1 -1348 PUSH1 0x00 -1350 ADD -1351 PUSH1 0x00 -1353 SWAP1 -1354 SLOAD -1355 SWAP1 -1356 PUSH2 0x0100 -1359 EXP -1360 SWAP1 -1361 DIV -1362 PUSH20 0xffffffffffffffffffffffffffffffffffffffff -1383 AND -1384 SWAP1 -1385 DUP1 -1386 PUSH1 0x01 -1388 ADD -1389 SLOAD -1390 SWAP1 -1391 POP -1392 DUP3 -1393 JUMP -1394 JUMPDEST -1395 PUSH8 0x22b1c8c1227a0000 -1404 DUP2 -1405 JUMP -1406 JUMPDEST -1407 PUSH1 0x32 -1409 PUSH8 0x22b1c8c1227a0000 -1418 DUP2 -1419 ISZERO -1420 ISZERO -1421 PUSH2 0x0592 -1424 JUMPI -1425 ASSERT_FAIL -1426 JUMPDEST -1427 DIV -1428 DUP2 -1429 JUMP -1430 STOP diff --git a/tests/testdata/outputs_expected/weak_random.sol.o.graph.html b/tests/testdata/outputs_expected/weak_random.sol.o.graph.html deleted file mode 100644 index cad41466..00000000 --- a/tests/testdata/outputs_expected/weak_random.sol.o.graph.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - - -

Mythril / Ethereum LASER Symbolic VM

-


- - - \ No newline at end of file diff --git a/tests/testdata/outputs_expected/weak_random.sol.o.json b/tests/testdata/outputs_expected/weak_random.sol.o.json deleted file mode 100644 index 2338b178..00000000 --- a/tests/testdata/outputs_expected/weak_random.sol.o.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "success": true, - "error": null, - "issues": [ - { - "title": "Dependence on predictable environment variable", - "description": "In the function `_function_0xe9874106` the following predictable state variables are used to determine Ether recipient:\n- block.coinbase\n", - "function": "_function_0xe9874106", - "type": "Warning", - "address": 1285, - "debug": "" - }, - { - "title": "Ether send", - "description": "In the function `_function_0xe9874106` a non-zero amount of Ether is sent to an address taken from storage slot 0.\nThere is a check on storage index 0. This storage slot can be written to by calling the function `fallback`.\n\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.\nThere is a check on storage index 1. This storage slot can be written to by calling the function `fallback`.", - "function": "_function_0xe9874106", - "type": "Warning", - "address": 1285, - "debug": "" - }, - { - "title": "Exception state", - "description": "A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking. ", - "function": "fallback", - "type": "Informational", - "address": 356, - "debug": "" - }, - { - "title": "Exception state", - "description": "A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking. ", - "function": "_function_0xe9874106", - "type": "Informational", - "address": 146, - "debug": "" - }, - { - "title": "Transaction order dependence", - "description": "A possible transaction order independence vulnerability exists in function _function_0xe9874106. The value or direction of the call statement is determined from a tainted storage location", - "function": "_function_0xe9874106", - "type": "Warning", - "address": 1285, - "debug": "" - } - ] -} \ No newline at end of file diff --git a/tests/testdata/outputs_expected/weak_random.sol.o.markdown b/tests/testdata/outputs_expected/weak_random.sol.o.markdown deleted file mode 100644 index b5744566..00000000 --- a/tests/testdata/outputs_expected/weak_random.sol.o.markdown +++ /dev/null @@ -1,62 +0,0 @@ -# Analysis results for test-filename.sol - -## Dependence on predictable environment variable - -- Type: Warning -- Contract: Unknown -- Function name: `_function_0xe9874106` -- PC address: 1285 - -### Description - -In the function `_function_0xe9874106` the following predictable state variables are used to determine Ether recipient: -- block.coinbase - - -## Ether send - -- Type: Warning -- Contract: Unknown -- Function name: `_function_0xe9874106` -- PC address: 1285 - -### Description - -In the function `_function_0xe9874106` a non-zero amount of Ether is sent to an address taken from storage slot 0. -There is a check on storage index 0. This storage slot can be written to by calling the function `fallback`. - -There is a check on storage index 1. This storage slot can be written to by calling the function `fallback`. -There is a check on storage index 1. This storage slot can be written to by calling the function `fallback`. - -## Exception state - -- Type: Informational -- Contract: Unknown -- Function name: `fallback` -- PC address: 356 - -### Description - -A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking. - -## Exception state - -- Type: Informational -- Contract: Unknown -- Function name: `_function_0xe9874106` -- PC address: 146 - -### Description - -A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking. - -## Transaction order dependence - -- Type: Warning -- Contract: Unknown -- Function name: `_function_0xe9874106` -- PC address: 1285 - -### Description - -A possible transaction order independence vulnerability exists in function _function_0xe9874106. The value or direction of the call statement is determined from a tainted storage location \ No newline at end of file diff --git a/tests/testdata/outputs_expected/weak_random.sol.o.text b/tests/testdata/outputs_expected/weak_random.sol.o.text deleted file mode 100644 index 9e105cfe..00000000 --- a/tests/testdata/outputs_expected/weak_random.sol.o.text +++ /dev/null @@ -1,46 +0,0 @@ -==== Dependence on predictable environment variable ==== -Type: Warning -Contract: Unknown -Function name: _function_0xe9874106 -PC address: 1285 -In the function `_function_0xe9874106` the following predictable state variables are used to determine Ether recipient: -- block.coinbase - --------------------- - -==== Ether send ==== -Type: Warning -Contract: Unknown -Function name: _function_0xe9874106 -PC address: 1285 -In the function `_function_0xe9874106` a non-zero amount of Ether is sent to an address taken from storage slot 0. -There is a check on storage index 0. This storage slot can be written to by calling the function `fallback`. - -There is a check on storage index 1. This storage slot can be written to by calling the function `fallback`. -There is a check on storage index 1. This storage slot can be written to by calling the function `fallback`. --------------------- - -==== Exception state ==== -Type: Informational -Contract: Unknown -Function name: fallback -PC address: 356 -A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking. --------------------- - -==== Exception state ==== -Type: Informational -Contract: Unknown -Function name: _function_0xe9874106 -PC address: 146 -A reachable exception (opcode 0xfe) has been detected. This can be caused by type errors, division by zero, out-of-bounds array access, or assert violations. This is acceptable in most situations. Note however that `assert()` should only be used to check invariants. Use `require()` for regular input checking. --------------------- - -==== Transaction order dependence ==== -Type: Warning -Contract: Unknown -Function name: _function_0xe9874106 -PC address: 1285 -A possible transaction order independence vulnerability exists in function _function_0xe9874106. The value or direction of the call statement is determined from a tainted storage location --------------------- -