Skip to content

Instantly share code, notes, and snippets.

Avatar

Stefan Husch jfqd

View GitHub Profile
@jfqd
jfqd / 0001-remove-upgrade-option.v4.6.4.patch
Last active Aug 9, 2022
Remove "Go fully featured" admin option as long it is not GDPR complient
View 0001-remove-upgrade-option.v4.6.4.patch
From 162ff8353b9cf299b8b0673f7f45d981712fbb23 Mon Sep 17 00:00:00 2001
From: jfqd <jfqd@blun.org>
Date: Tue, 9 Aug 2022 17:13:09 +0200
Subject: [PATCH] remove upgrade option
---
client/sidebar/header/UserDropdown.tsx | 2 +-
client/views/admin/AdministrationRouter.tsx | 2 +-
client/views/admin/routes.js | 5 -----
client/views/admin/sidebar/AdminSidebarPages.tsx | 4 ----
@jfqd
jfqd / immuniweb_mx_scans.md
Last active Apr 20, 2022
immuniweb mailserver scans
View immuniweb_mx_scans.md
View calc
#!/bin/bash
echo "scale=2;$@" | tr -d "." | tr "," "." | bc | tr -d "," | tr "." ","
View auth_code.rb
require 'shiparound_api/rest'
require 'rest-client'
require 'openssl'
require 'base64'
require 'json'
require 'uri'
# auth_code, error = ::ShiparoundApi::AuthCode.get(
# password: "password",
# api_key: "api_key",
@jfqd
jfqd / sample.php
Created Feb 1, 2022 — forked from kkosuge/sample.php
PHP <=> Ruby ( OpenSSL AES-256-CBC )
View sample.php
<?php
const PASSWORD = '!!!!!sufficiently_long_password!!!!!';
const CIPHER_METHOD = 'AES-256-CBC';
function encrypt($str) {
$iv_length = openssl_cipher_iv_length(CIPHER_METHOD);
$iv = mcrypt_create_iv($iv_length, MCRYPT_RAND);
$str = $iv.$str;
$val = openssl_encrypt($str, CIPHER_METHOD, PASSWORD, 0, $iv);
@jfqd
jfqd / install_openvpn.bash
Created May 5, 2021
Install OpenVPN with Homebrew on macOS
View install_openvpn.bash
# install homebrew if not yet done
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# fix me!
IP_ADDRESS="91.123.123.123"
LOCAL_NET="10.168.231.0"
CERTNAME="name.example.com"
brew analytics off
brew install openvpn
@jfqd
jfqd / build_minio_client_on_SmartOS
Last active May 3, 2021
Build minio version 2021-04-22T15-44-28Z on SmartOS with pkgsrc:
View build_minio_client_on_SmartOS
go get -d github.com/minio/mc
GOOS=solaris GOARCH=amd64 GO111MODULE=on go get github.com/minio/mc
@jfqd
jfqd / dial
Created May 2, 2021
This script dials a phone-number given on the command line on macOS via a SNOM hardware phone
View dial
#!/bin/bash
pn=$(echo $@ | tr -d " \t\n\r" | sed "s#+49#0#")
curl -k -m 3 "https://user:password@10.10.10.10/adr.htm?adrnumber=${pn}"
View disable.sh
#!/bin/bash
# IMPORTANT: Don't forget to logout from your Apple ID in the settings before running it!
# IMPORTANT: You will need to run this script from Recovery. In fact, macOS Catalina brings read-only filesystem which prevent this script from working from the main OS.
# This script needs to be run from the volume you wish to use.
# E.g. run it like this: cd /Volumes/Macintosh\ HD && sh /Volumes/Macintosh\ HD/Users/sabri/Desktop/disable.sh
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
@jfqd
jfqd / shodan_ip_list.txt
Created Nov 14, 2020
shodan ip list for blocking traffic
View shodan_ip_list.txt
198.20.69.72/29
198.20.69.96/29
198.20.70.111/32
198.20.70.112/29
198.20.99.128/29
93.120.27.62/32
66.240.236.119/32
71.6.135.131/32
66.240.192.138/32
71.6.167.142/32