분류 전체보기
[Browser Exploitation] picoCTF - Kit Engine
🧡 Explaination d8, source, server.py가 주어진다. 먼저 server.py를 봐보자. size를 입력받고 내가 입력한 스크립트를 실행한 후, 표준 출력과 표준 에러를 출력해 준다. #!/usr/bin/env python3 # With credit/inspiration to the v8 problem in downUnder CTF 2020 import os import subprocess import sys import tempfile def p(a): print(a, flush=True) MAX_SIZE = 20000 input_size = int(input("Provide size. Must be = MAX_SIZE: p(f"Rece..
[CryptoZombie] 1-5 ERC721 & Crypto-Collectibles
🧡 ERC721 Token contract ERC721 { event Transfer(address indexed _from, address indexed _to, uint256 _tokenId); event Approval(address indexed _owner, address indexed _approved, uint256 _tokenId); function balanceOf(address _owner) public view returns (uint256 _balance); function ownerOf(uint256 _tokenId) public view returns (address _owner); function transfer(address _to, uint256 _tokenId) publi..
[CryptoZombie] 1-4 Zombie Battle System
🧡 Payable 이더리움을 지불에 관여할 수 있는 함수 제어자이다. contract OnlineStore { function buySomething() external payable { require(msg.value == 0.001 ether); transferThing(msg.sender); } } 🧡 Random Numbers keccak256을 이용해 난수를 생성할 수 있다. uint randNonce = 0; uint random = uint(keccak256(now, msg.sender, randNonce)) % 100; randNonce++; uint random2 = uint(keccak256(now, msg.sender, randNonce)) % 100; https://share.cry..