Skip to content

Instantly share code, notes, and snippets.

View knightshrub's full-sized avatar

Elia knightshrub

View GitHub Profile
@knightshrub
knightshrub / rspamd.local.lua
Last active March 9, 2021 15:46
Remove User-Agent header using Rspamd
require 'lua_mime'
rspamd_config.REMOVE_UA = {
callback = function(task)
lua_mime.modify_headers(task, {remove = {['User-Agent'] = 0}})
end,
score=0.0,
description = 'Remove User-Agent header',
}
@knightshrub
knightshrub / brainfuck.py
Created June 4, 2018 19:25
A brainfuck interpreter written in python
#!/usr/bin/env python3
import sys
"""
A brainfuck interpreter written in python
Example usage: python3 brainfck.py test.bfck
Contents of test.bfck:
---------------------
@knightshrub
knightshrub / ddns.sh
Created December 29, 2017 09:47
This script can be used to update a Namecheap dynamic DNS A record from a cron job. This is useful when the host does not have a static IP e.g. when sitting behind a DSL modem and being assigned an IP by the ISP via DHCP.
#!/bin/bash
# This script makes it possible to update a Namecheap dynamic DNS
# A record automatically using a cron job
# configure these
dnshost="host"
dnsdomain="example.com"
dnspw="longasspasswd"
@knightshrub
knightshrub / pisdr-v1.sh
Last active December 3, 2018 00:39
RTL-SDR setup script v1
#!/bin/bash
# This bash script installs all needed tools for using
# RTL2832U based DVB-T tuners as software defined
# receivers (SDR) on Debian/Ubuntu based systems
#
# librtlsdr - basic library needed to communicate with RTL2832U
# dump1090 - ADS-B message decoder with web page google maps display of aircraft locations
# multimon-ng - RF demodulator (can be used for decoding APRS packets)