Skip to content

Instantly share code, notes, and snippets.

View samatt's full-sized avatar

Surya Mattu samatt

View GitHub Profile
import EventEmitter from 'events'
import pcap from 'pcap'
import pcapFilters from './pcap-filters'
import tlsClientHello from 'is-tls-client-hello'
import sni from 'sni'
class Sniffer extends EventEmitter {
constructor (logDebug = false) {
super()
@samatt
samatt / makefile
Last active October 2, 2020 19:44
maps
cnf ?= config.env
include $(cnf)
export $(shell sed 's/=.*//' $(cnf))
.PHONY: help
help: ## This help.
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.DEFAULT_GOAL := help

Script URL substrings used to detect the embeddings from the companies offering session replay services

  • mc.yandex.ru/metrika/watch.js
  • mc.yandex.ru/metrika/tag.js
  • mc.yandex.ru/webvisor/
  • fullstory.com/s/fs.js
  • d2oh4tlt9mrke9.cloudfront.net/Record/js/sessioncam.recorder.js
  • ws.sessioncam.com/Record/record.asmx
  • userreplay.net
  • script.hotjar.com
class Thing {
constructor(val) {
this.val = val;
}
unwrap() {
throw "unimplemented!";
}
is_ok() {
throw "unimplemented!";
require('dotenv').config()
const tlsClientHello = require('is-tls-client-hello')
const sni = require('sni')
var hash = require('object-hash');
const AWS = require('aws-sdk');
AWS.config.update({
accessKeyId: process.env.ACCESS_KEY_ID,
secretAccessKey: process.env.SECRET_ACCESS_KEY,
@samatt
samatt / gist:b2b8353b9644f0fa850e
Created September 9, 2014 15:34
Leonardo CardReader
/*
* HID RFID Reader Wiegand Interface for Arduino Uno
* Written by Daniel Smith, 2012.01.30
* www.pagemac.com
*
* This program will decode the wiegand data from a HID RFID Reader (or, theoretically,
* any other device that outputs weigand data).
* The Wiegand interface has two data lines, DATA0 and DATA1. These lines are normall held
* high at 5V. When a 0 is sent, DATA0 drops to 0V for a few us. When a 1 is sent, DATA1 drops
* to 0V for a few us. There is usually a few ms between the pulses.
@samatt
samatt / conspiracies.json
Created February 22, 2017 16:55
NEW THING
{
"nodes": [
{
"value": 8,
"type": "person",
"id": "Jeff Sessions"
},
{
"value": 7,
"type": "person",
@samatt
samatt / keybase.md
Last active February 11, 2017 15:53

Keybase proof

I hereby claim:

  • I am samatt on github.
  • I am surya (https://keybase.io/surya) on keybase.
  • I have a public key ASCrVTtyfp7OotqiE1BuO-w48sU81p78EYrtoNfGVtY87Ao

To claim this, I am signing this object:

@samatt
samatt / gist:31d50c68f39bb70fa23807136905e4c4
Created November 16, 2016 16:48 — forked from rtrouton/gist:f92f263414aaeb946e54
Install Xcode command line tools on 10.7.x - 10.10.x. Tested on 10.7.5, 10.8.5, 10.9.5 and 10.10.2.
#!/bin/bash
# Installing the Xcode command line tools on 10.7.x or higher
osx_vers=$(sw_vers -productVersion | awk -F "." '{print $2}')
cmd_line_tools_temp_file="/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress"
# Installing the latest Xcode command line tools on 10.9.x or higher
if [[ "$osx_vers" -ge 9 ]]; then
@samatt
samatt / gist:7855af2103428cb9d7ea799cb3ac2cf0
Created November 16, 2016 16:48 — forked from rtrouton/gist:f92f263414aaeb946e54
Install Xcode command line tools on 10.7.x - 10.10.x. Tested on 10.7.5, 10.8.5, 10.9.5 and 10.10.2.
#!/bin/bash
# Installing the Xcode command line tools on 10.7.x or higher
osx_vers=$(sw_vers -productVersion | awk -F "." '{print $2}')
cmd_line_tools_temp_file="/tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress"
# Installing the latest Xcode command line tools on 10.9.x or higher
if [[ "$osx_vers" -ge 9 ]]; then