Skip to content

Instantly share code, notes, and snippets.

Avatar
🪴
gardening

tintin tintinweb

🪴
gardening
View GitHub Profile
@tintinweb
tintinweb / eth-sendRawTransaction.js
Created Sep 27, 2021
Ethereum - sign and send raw transaction in batches using infura api
View eth-sendRawTransaction.js
var ethers = require('ethers');
var apiKey = '#yourAPIKey#'; //github is a good source for this :p
var url = `https://goerli.infura.io/v3/${apiKey}`;
var rpc = new ethers.providers.JsonRpcProvider(url);
var privateKey = "#ethPrivateKey#";
var wallet = new ethers.Wallet(privateKey);
console.log("Address: " + wallet.address);
async function main(){
View Readme.md

Keybase proof

I hereby claim:

  • I am tintinweb on github.
  • I am tintinweb (https://keybase.io/tintinweb) on keybase.
  • I have a public key ASCRLJovs-yWFA5fAyyoGxiP3wgkvPhH5XS3CmZI6RS2BAo

To claim this, I am signing this object:

@tintinweb
tintinweb / inplace-upgrade.py
Last active Jan 26, 2017
Try to inplace upgrade from python 2.5 to 2.7
View inplace-upgrade.py
#!/usr/bin/env python2
'''
# ./inplace-upgrade.py
python version: (2, 5, 2, 'final', 0)
[***] newer python interpreter available. switching versions...
python version: sys.version_info(major=2, minor=7, micro=9, releaselevel='final', serial=0)
'''
import os, sys
def try_switch_to_python2_7():
@tintinweb
tintinweb / fakebeacon.py
Created Jan 4, 2017
scapy-fakebeacon - spawn lots of fake wifi access points by injecting beacon frames with scapy (essid)
View fakebeacon.py
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# source: https://www.4armed.com/blog/forging-wifi-beacon-frames-using-scapy/
#
# requires:
# radiotap supported wifi nic/driver (frame injection) (works fine with Ralink RT2571W)
# iwconfig $iface mode monitor
# iw dev $iface set channel $channel
# or
@tintinweb
tintinweb / searchObj.js
Created Nov 5, 2016
javascript - recursively find a specific key or value in any sub object (quick hack)
View searchObj.js
var seen = [];
var results = [];
function searchObj (obj, query, strparent, level) {
level = level || 1;
if (level % 3==0 || level==1)
console.info(level);
for (var key in obj) {
var orig_sig = strparent + "." + key;
var sig = orig_sig.split(".").slice(-2).join(".");
@tintinweb
tintinweb / jenkins_postbuild_save_to_db.gsh.groovy
Last active May 29, 2016
Jenkins PostBuild groovy script to access current run result/parameters/environment, save it as json and post it to mongodb.
View jenkins_postbuild_save_to_db.gsh.groovy
/*
Title : Jenkins PostBuild groovy script to get run status/parameters/environment, save to a json file in order to post it to mongodb
Author : tintinweb@oststrom.com <github.com/tintinweb>
Setup : Jenkins
+ https://wiki.jenkins-ci.org/display/JENKINS/Groovy+Postbuild+Plugin
+ https://wiki.jenkins-ci.org/display/JENKINS/MongoDB+Document+Upload+Plugin
Job:
add post-build action: Groovy Postbuild Plugin (this code)
@tintinweb
tintinweb / scapy_tcp_handshake.py
Last active Sep 24, 2021
simple scapy tcp three-way handshake
View scapy_tcp_handshake.py
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Author : tintinweb@oststrom.com <github.com/tintinweb>
'''
A simple TCP three-way handshake example
#> python scapy_tcp_handshake.py
DEBUG:__main__:init: ('oststrom.com', 80)
DEBUG:__main__:start
DEBUG:__main__:SND: SYN
@tintinweb
tintinweb / asn1cer.py
Last active Apr 12, 2022
python ASN1 decoder, x509 certificate decoder, no external dependencies
View asn1cer.py
'''
@author: tintinweb
python asn.1 decoder including utility functions for pem format certificates
'''
import re,hashlib, binascii
class ASN1Element(object):
TYPE_UNIVERSAL = 0x00
@tintinweb
tintinweb / hb-test.py
Last active Aug 29, 2015 — forked from takeshixx/hb-test.py
CVE-2014-0160 - OpenSSL tcp heartbeat PoC with STARTTLS, XMPP, Proxy CONNECT (SSL) support. Also includes some TLS record fixups, and features like file-dumping, TLS protocol version selection (HBMsg only)
View hb-test.py
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
#
# tintinweb | https://github.com/tintinweb
# added proxy CONNECT support
# added HB packet variation for IPS testing
# added valid HB message padding (without HMAC)
# added options for custom HeartBeat.len, payload, fixed size TLSRecord.len, padding