Skip to content

Instantly share code, notes, and snippets.

View ozzi-'s full-sized avatar
🎯
On point

ozzi-

🎯
On point
View GitHub Profile

Red Team Phishing with Gophish

This guide will help you set up a red team phishing infrastructure as well as creating, perform and evaluate a phishing campaign. This is the basic lifecycle of your phishingn campaign:

+---------------------+
|Get Hardware         |   Order / setup a vServer
+---------------------+
+---------------------+
|Setup                |   Install Gophish & Mail Server
+---------------------+
@ozzi-
ozzi- / confluence_export_rewrite.sh
Last active April 24, 2024 07:24
rewrites URLs in confluence xml export zip files and creates sensible named zips
#!/bin/bash
if ! [ -x "$(command -v zip)" ]; then
echo 'Error: zip is not installed.' >&2
exit 1
fi
if ! [ -x "$(command -v unzip)" ]; then
echo 'Error: unzip is not installed.' >&2
exit 1
fi
@ozzi-
ozzi- / a.bat
Created February 13, 2024 17:18
start taskmgr
@ozzi-
ozzi- / a.html
Created February 13, 2024 17:13
<input type="file" id="avatar" name="avatar" />
@ozzi-
ozzi- / a.js
Last active February 13, 2024 17:05
var oShell = new ActiveXObject("WScript.Shell");
oShell.Run("cmd.exe /C start microsoft-edge:http://www.microsoft.com");
@ozzi-
ozzi- / JSON - Remove Trailing Comma
Created December 3, 2020 09:09
removes trailing commas in JSON strings
// Input:
// [
// {
// "f00" : "bar",
// "info" : "this comma to my right is wrong",
// },
// {
// "f00" : "bar",
// "info" : "the comma on the line below is wrong too!"
// },
import java.util.Collections;
public class RingBuffer<T> {
int length;
int currentPos = 0;
int firstPos = 0;
int lastPos;
private T[] buffer;
@ozzi-
ozzi- / index.html
Last active May 21, 2021 09:44
JavaScript form submit timeout handling
<html>
Form being submitted
<!-- longresponse.phg will take 30 seconds to respons, in order to simulate a timeout -->
<form id="response" method="GET" action="https://oz-web.com/longresponse.php">
<input type="hidden" name="status" id="status" value="*empty*" />
</form>
<script>
const form = document.getElementById("response");
function handleFail(){
// replace this with whatever code you have to handle the timeout
@ozzi-
ozzi- / all_curl.sh
Created August 3, 2020 11:26
get response code, all headers, specific headers and response body from CURL
res=$(curl "https://zgheb.com" -i -sS -w "\r\n%{http_code}")
responseCode=$(echo "$res" | tail -1)
headersAndBody=$(echo "$res" | head -n -1)
headers=$(echo "$headersAndBody" | awk '{if($0=="\r")exit;print}')
body=$(echo "$headersAndBody" | awk '{if(body)print;if($0=="\r")body=1}')
powered=$(echo "$res" | grep -Fi "X-Powered-By" | cut -d ":" -f2 | awk '{$1=$1};1')
echo "Response Code:"
@ozzi-
ozzi- / binaryDownload.js
Last active March 29, 2021 13:11
JS - Download a binary file via XHR then prompt the save file dialog
<html>
<a id="downloadBinaryLink"></a>
<script>
// file.php here serves as a pseudo API that returns a binary as octect stream (and according Access-Control-Allow-Origin header)
doBinaryDownload("http://oz-web.com/file.php", loadBinaryScriptEdit);
function loadBinaryScriptEdit(blob){
var dataUri = window.URL.createObjectURL(blob);
var anchor = document.getElementById("downloadBinaryLink");
anchor.setAttribute('href', dataUri);
anchor.setAttribute('download', "pingsender.exe");