Skip to content

Instantly share code, notes, and snippets.

View jakenology's full-sized avatar
🏠
Working from home

JakeNology jakenology

🏠
Working from home
  • Midwest, USA
View GitHub Profile
@jakenology
jakenology / iptables.sh
Created April 14, 2019 21:10 — forked from thomasfr/iptables.sh
iptable rules to allow outgoing DNS lookups, outgoing icmp (ping) requests, outgoing connections to configured package servers, outgoing connections to all ips on port 22, all incoming connections to port 22, 80 and 443 and everything on localhost
#!/bin/bash
IPT="/sbin/iptables"
# Server IP
SERVER_IP="$(ip addr show eth0 | grep 'inet ' | cut -f2 | awk '{ print $2}')"
# Your DNS servers you use: cat /etc/resolv.conf
DNS_SERVER="8.8.4.4 8.8.8.8"
# Allow connections to this package servers
lpadmin -p 'TJJ_Printer' -o printer-is-shared="False" -E -v lpd://printer.tjj.jpits.us/ipp/print -P '/Library/Printers/PPDs/Contents/Resources/HP LaserJet Pro MFP M225-M226.gz' -D 'TJJ Printer'
lpadmin -p 'PetersD_Printer' -o printer-is-shared="False" -E -v lpd://printer.pd.jpits.us/ipp/print -P '/Library/Printers/PPDs/Contents/Resources/HP LaserJet P2035.gz' -D 'PetersD Printer'
## How I got it working
# Prerequestites
1. Golang
2. certbot
# Generating a certificate
# Stop lighttpd (pi-hole admin interface)
service lighttpd stop
certbot certonly --standalone -d <DOMAIN NAME>
Given the config:
$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/certs/server/combined.pem"
ssl.ca-file = "/certs/server/fullchain.pem"
ssl.cipher-list = "ECDHE-RSA-AES256-SHA384:AES256-SHA256:HIGH:!MD5:!aNULL:!EDH:!AESGCM"
ssl.honor-cipher-order = "enable"
ssl.use-sslv2 = "disable"
ssl.use-sslv3 = "disable"
}
@jakenology
jakenology / index.html
Created August 2, 2019 03:46
Math Captcha
<form method="post" id="subForm">
<label id="ebcaptchatext"></label>
<input type="text" class="textbox" id="ebcaptchainput"/>
<button type="submit">Submit</button>
</form>
public function create_site_admin(
$name,
$email,
$password
) {
$payload = [
'cmd' => 'create-admin',
'name' => trim($name),
'email' => trim($email),
'x_password' => trim($password),