Skip to content

Instantly share code, notes, and snippets.

Avatar
:electron:
Stay awhile and listen.

APogiatzis apogiatzis

:electron:
Stay awhile and listen.
View GitHub Profile
@apogiatzis
apogiatzis / Orderbook.sol
Created Dec 2, 2020
Orderbook template contract for Blockchain for Fintect course
View Orderbook.sol
pragma solidity ^0.5.2;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/ERC20.sol";
contract Orderbook {
using SafeMath for uint256;
struct Order {
uint256 Amount;
@apogiatzis
apogiatzis / deploy.yml
Last active Nov 15, 2020
Github Workflow for Medium post
View deploy.yml
name: Challenge Deployment
on: push
jobs:
cancel:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.6.0
with:
@apogiatzis
apogiatzis / Dice.sol
Last active Nov 12, 2020
Dice rolling game smart contract skeleton
View Dice.sol
pragma solidity ^0.5.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/IERC20.sol";
contract Dice {
IERC20 public nativeGameToken;
mapping(address => UserBet) private userBets;
struct UserBet {
@apogiatzis
apogiatzis / Token.sol
Last active Nov 4, 2020
C1: Smart Contract Development
View Token.sol
pragma solidity ^0.5.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/ERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/ERC20Detailed.sol";
contract Token is ERC20, ERC20Detailed {
constructor () public ERC20Detailed("<StudentID> Token", "LABT", 18) {
_mint(msg.sender, 1000000 * (10 ** uint256(decimals())));
}
@apogiatzis
apogiatzis / keybase.md
Created Jun 19, 2020
Keybase Verification
View keybase.md

Keybase proof

I hereby claim:

  • I am apogiatzis on github.
  • I am apogiatzis (https://keybase.io/apogiatzis) on keybase.
  • I have a public key whose fingerprint is 6A7F 78A5 4B8F B614 5FCB D3C2 7F4F 701F 9575 6888

To claim this, I am signing this object:

View test.json
{
"flags": [
{
"genre": "`constructor.constructor(\"alert('xss')\")()`",
"name": {},
"point": "{{1+1}}",
"flag": "`constructor.constructor(\"alert('xss')\")()`"
}
],
"name": "aaaa",
@apogiatzis
apogiatzis / checksec.py
Created Aug 11, 2019
Windows checksec equivalent
View checksec.py
import lief
from sys import argv
import colorama
def _color_print(name):
colorama.init(autoreset=True)
def color_print(func):
def wrapper(*args, **kwargs):
ret = func(*args, **kwargs)
if ret != False:
@apogiatzis
apogiatzis / common_modulus.py
Created Nov 13, 2018
RSA Common modulus attack
View common_modulus.py
import argparse
from fractions import gcd
parser = argparse.ArgumentParser(description='RSA Common modulus attack')
required_named = parser.add_argument_group('required named arguments')
required_named.add_argument('-n', '--modulus', help='Common modulus', type=long, required=True)
required_named.add_argument('-e1', '--e1', help='First exponent', type=long, required=True)
required_named.add_argument('-e2', '--e2', help='Second exponent', type=long, required=True)
required_named.add_argument('-ct1', '--ct1', help='First ciphertext', type=long, required=True)