Skip to content

Instantly share code, notes, and snippets.

View tintinweb's full-sized avatar
🍣
🐼

tintinweb tintinweb

🍣
🐼
View GitHub Profile
@tintinweb
tintinweb / hb-test.py
Last active August 29, 2015 13:58 — 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)
#!/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
@tintinweb
tintinweb / jenkins_postbuild_save_to_db.gsh.groovy
Last active May 29, 2016 23:29
Jenkins PostBuild groovy script to access current run result/parameters/environment, save it as json and post it to mongodb.
/*
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 / searchObj.js
Created November 5, 2016 17:16
javascript - recursively find a specific key or value in any sub object (quick hack)
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 / inplace-upgrade.py
Last active January 26, 2017 15:58
Try to inplace upgrade from python 2.5 to 2.7
#!/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():

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 / eth-sendRawTransaction.js
Created September 27, 2021 08:24
Ethereum - sign and send raw transaction in batches using infura api
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(){
@tintinweb
tintinweb / asn1cer.py
Last active July 17, 2022 14:45
python ASN1 decoder, x509 certificate decoder, no external dependencies
'''
@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 / fakebeacon.py
Created January 4, 2017 11:11
scapy-fakebeacon - spawn lots of fake wifi access points by injecting beacon frames with scapy (essid)
#!/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 / scapy_tcp_handshake.py
Last active August 4, 2023 19:58
simple scapy tcp three-way handshake
#!/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 / benkojet.js
Created January 24, 2024 23:03
BenkoJet - a hacky adsbexchange jet tracker (+ future BenkoJet tweeter?) 🐦
/***
BenkoJet auto-tweet'er
todo:
- grab a user token from adsbexchange
- implement twitter api
- only tweet if last flight changed
super cheap. salut 🫡