Skip to content

Instantly share code, notes, and snippets.

Avatar
🈚
构想

Sen Yang syang-ng

🈚
构想
  • Shanghai
View GitHub Profile
@syang-ng
syang-ng / fart_repair.py
Created Jan 25, 2021
repair dex by fart
View fart_repair.py
import base64
import os
import re
import sys
def parse_ins_bin(ins_path):
with open(ins_path, 'r') as f:
content = f.read()
ins_array=re.findall(r"{name:(.*?),method_idx:(.*?),offset:(.*?),code_item_len:(.*?),ins:(.*?)}", content) #(.*?)最短匹配
code_items = []
View QWB-EasyFake.sol
contract Contract {
function main() {
memory[0x40:0x60] = 0x80;
if (msg.data.length < 0x04) { stop(); }
var var0 = msg.data[0x00:0x20] / 0x0100000000000000000000000000000000000000000000000000000000 & 0xffffffff;
if (var0 == 0x19ff1d21) {
// Dispatch table entry for hello()
View erc20.sol
contract ERC20 {
//**********9个函数*******
//1.代币的名字,如:"黑马币"
function name() constant public returns (string name);
//2.代币的简称,例如:HMB
function symbol() public constant returns (string symbol);
//3.代币的最小分割量 token使用的小数点后几位。比如如果设置为3,就是支持0.001表示
function decimals() public constant returns (uint8 decimals);
//4.token的总量
function totalSupply() public constant returns (uint totalSupply);
View CodeGate-2020-renderer-routes.py
from flask import Flask, render_template, render_template_string, request, redirect, abort, Blueprint
import urllib2
import time
import hashlib
from os import path
from urlparse import urlparse
front = Blueprint("renderer", __name__)
@syang-ng
syang-ng / scanmoney.py
Created Nov 29, 2018
money of contract
View scanmoney.py
import requests
from bs4 import BeautifulSoup
import os
import sys
reload(sys)
sys.setdefaultencoding('utf8')
def formatAddress(address):
if len(address) == 42:
View blind_inject.py
import string
import requests
s = requests.Session()
def judge(text):
return True
def get(url):
return s.get(url)
@syang-ng
syang-ng / test.js
Created Oct 17, 2018
A test script of chrome profiler
View test.js
const fs = require('fs');
const util = require('util');
const program = require('commander');
const launcher = require('chrome-launcher');
const CDP = require('chrome-remote-interface');
// replace the Promise for high performance
global.Promise = require("bluebird");
const DB = require('./db');
@syang-ng
syang-ng / webapp.py
Created Sep 30, 2018
Dragon CTF 3NTERPRISE s0lution
View webapp.py
import functools
import flask
import backend
import flask_session
import model
from waitress import serve
sql_session = backend.sql_session
@syang-ng
syang-ng / pycalx-solve.py
Created Jul 16, 2018
A solve python file of pycalx, MeePwn CTF
View pycalx-solve.py
import requests
import string
def judge(s,j):
t = s + j
# url = 'http://178.128.96.203/cgi-bin/server.py'
url = 'http://206.189.223.3/cgi-bin/server.py'
View SimpleBootstrap.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Chapter 5</title>
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
</head>