MythX Scan Modes

MythX offers 3 different scan modes, available for different subscription plans. Quick, Full and Deep.

Try the different scan modes with our sample contracts

Select the contract sample

Select the scan mode

Contract Code

Sample 1

0 pragma solidity ^0.5.0;

1 contract Vulnerable4Calls {

2

3 address public owner;

4 bool locked;

5 uint256 public maybePrime = 973013;

6

7 modifier onlyOwner {

8 require(msg.sender == owner);

9 _;

10 }

11

12 modifier only_uninitialized {

13 require(owner == address(0));

14 _;

15 }

16

17 constructor() public {

18 _init(msg.sender);

19 locked = true;

20 }

21

22 function _init(address _owner) public only_uninitialized {

23 owner = _owner;

24 }

25

26 function reset() public {

27 owner = address(0);

28 }

29

30 function unlock(uint256 x, uint256 y) public {

31 require(x > 1 && x < maybePrime);

32 require(y > 1 && y < maybePrime);

33 require(x*y != maybePrime);

34

35 locked = false;

36 }

37

38 function kill() public onlyOwner {

39 require(!locked);

40 selfdestruct(msg.sender);

41 }

42 }

Vulnerabilities Detected

low

Severity

SWC-103

Floating Pragma

Line 0 Column 0

low

Severity

SWC-108

State Variable Default Visibility

Line 4 Column 9

Get started today

Every developer has a responsibility to make sure their code is secure.

MythX can help make that happen.

Sign up for an account and see what MythX can do for you.