2018/07
-
[파이썬][백준]2979 트럭주차코딩/알고리즘 2018. 7. 27. 22:59
# -*- coding: utf-8 -*- class time_Obj(): def __init__(self,arrive,leave): self.arrive = arrive self.leave = leave if __name__ == "__main__": max = 0 #time_List 타임 리스트를 넣는 오브젝트 time_List = [] A,B,C = map(int, input().split(' ')) for i in range(3): at,lt = map(int ,input().split(' ')) if( max < lt ): max = lt time_List.append(time_Obj(at,lt)) time = 0 time_flow_q = [] value = 0 while(True): for t..
-
솔리디티 로우레벨 취약점카테고리 없음 2018. 7. 17. 14:24
해당 컨트랙트에 Deposit 함수를 사용하여 계약 주소를충전한 후 send()를 사용하여 계약 주소를 전송합니다 여기서 전송결과는 false라는 사실을 확인 할 수 있다. 즉 악의적인 컨트랙트로 이러한 기능을 보낼때 수신자가 컨트랙트이므로 계약서에 폴백 기능이 있어야 한다.그러한 기능이 없는 경우 컨트랙트는 정기적인 거래를 통해 ether를 받을 수 없다 폴백기능이더를 수신하려면 fallback 기능을 표시행헌더,payable 없다 Contracts that receive Ether directly (without a function call, i.e. using send or transfer) but do not define a fallback function throw an exception, se..
-
솔리티디 smt 취약점 분석카테고리 없음 2018. 7. 17. 13:52
function transferProxy(address _from, address _to, uint256 _value, uint256 _feeSmt, uint8 _v,bytes32 _r, bytes32 _s) public transferAllowed(_from) returns (bool){ if(balances[_from] < _feeSmt + _value) revert(); uint256 nonce = nonces[_from]; bytes32 h = keccak256(_from,_to,_value,_feeSmt,nonce); if(_from != ecrecover(h,_v,_r,_s)) revert(); if(balances[_to] + _value < balances[_to] || balances[m..