Skip to content

Instantly share code, notes, and snippets.

🎯
On point

ozzi-

🎯
On point
Block or report user

Report or block ozzi-

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ozzi-
ozzi- / jp2j.java
Last active Sep 6, 2019
java pojo to json
View jp2j.java
// convert json string into pojo
public static Object getAsObject(String json, Class<?> objClass) throws Exception {
JsonParser jParser = new JsonParser();
JsonObject jObj = (JsonObject) jParser.parse(json);
Object obj = objClass.newInstance();
Field[] fields = objClass.getDeclaredFields();
for (int i = 0; i < fields.length; i++) {
String fieldName = fields[i].getName();
Field field = obj.getClass().getDeclaredField(fieldName);
View sendmail.sh (netcat)
#!/usr/bin/expect
# Usage: ./sendmail.sh 192.168.200.1 from@domain.ch to@hdomain.ch "Some Subject" "Some Text\r\nSome more Text!"
# Prerequisites: apt-get install expect
set mailserver [lrange $argv 0 0]
set from [lrange $argv 1 1]
set to [lrange $argv 2 2]
set subject [lrange $argv 3 3]
set message [lrange $argv 4 4]
View SecureHTTPClient.java
public class SecureHTTPClient {
public static CloseableHttpClient getSecureHTTPClient() {
try {
SSLContext sslContext = SSLContexts.createDefault();
SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext,
new String[]{"TLSv1.2"},
new String[]{"TLS_DHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"},
SSLConnectionSocketFactory.getDefaultHostnameVerifier());
return HttpClients.custom()
View simplesmtp.php
<?php
function smtpSend($to, $from, $message, $host, $port, &$error){
$recipientString="";
if ($h = fsockopen($host, $port, $errno, $errstr, 5)){
$data = array();
array_push($data, 0);
array_push($data, "EHLO $host");
array_push($data, "MAIL FROM: <$from>");
if(is_array($to)){
foreach ($to as $toRcpt) {
@ozzi-
ozzi- / confluence_export_rewrite.sh
Last active Dec 13, 2018
rewrites URLs in confluence xml export zip files and creates sensible named zips
View confluence_export_rewrite.sh
#!/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
View Red Team Phishing with Gophish.md

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- / readme.md
Last active Feb 12, 2019
Zimbra - Persistent XSS - CWE-79 - CVE-2018-6882 - Zimbra Bug ID #108786
View readme.md
View gist:554a1bf12b73d35496efe0000ec243e5
/**
* @param target url such as test.ch
* @return set of subdomains that have at one point a https cert
*/
public static HashSet<String> runCRTSH(String target){
HashSet<String> subdomainSet = new HashSet<String>();
try {
String html = HTTP.get("https://crt.sh/?q=%25."+target);
Document doc = Jsoup.parse(html);
Elements elements = doc.select("td");
You can’t perform that action at this time.