This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script for automatically update a DNS-A entry for domains hosted by http://hosteurope.de | |
# The purpose of this script is to have a DNS update functionality similar to dyndns, no-ip, or afraid.org. | |
DOMAIN="my.domain" # Domain name | |
HOST="updatetest" # Host Name | |
#NEW_IP="3.2.1.2" # Desired IP address (if not set, external IP will be used) | |
HOSTEUROPE_kdnummer="123456" # Hosteurope "Kundennmmer" | |
HOSTEUROPE_passwd="xgeheimx" # Hosteurope password (must be urlencoded) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script downloads a list of IPs known for brute force attacking within the last two weeks. | |
# The fetched IPs get blocked with iptables with the special comment "BADIP". This script only | |
# modifies iptables rules with that comment. This measure makes it well compatible with other firewall | |
# scripts like the SUSEFirewall. | |
# The iptables rules are updated every time this script is executed. Additionally this script is | |
# quiet on stdout, which makes it well suited for being executed as a cronjob. | |
# | |
# Please also use fail2ban with the badips modification and help to maintain the list of attackers. | |
# See also: fail2ban and http:///www.badips.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
# extract bytes needed for decryption of Petya | |
if [ -z $1 ]; then | |
DEVPART=sdc | |
else | |
DEVPART=$1 | |
fi | |
# extract sector 55 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file provides some nifty command-line tools around DD-WRT's nvram command. | |
https://www.dd-wrt.com/wiki/index.php/Hardware#NVRAM | |
USE WITH CAUTION: fiddling with nvram can wipe your settings and you may loose access to your router. | |
Hint 1: Different version of DD-WRT might use different nvram variables. Thus, be carefull when updating. | |
Hint 2: The commands listed below should be issued via a ssh-connection since the webinterface for issuing commands might time out for the longer commands. | |
Background | |
========== | |
Extracting the content of configuration variables with nvram would provide an easy way of selective backup/restore of settings. However, listing the content of the nvram via | |
nvram show |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script searched for *.ts files recursivly in $SRC_DIR. Then it demuxes the files with ProjectX to $DST_DIR whilest maintaining the folder structure. | |
# This us useful if mpeg files are post-processed with ttcutter or cuttermaran | |
# TODO: projectx.sh doesn't work with spaces in filenames. I found no way to espace them to make it work. | |
# Thomas Wagner 2014 [email protected] | |
# for loop only breaks at linefeed (otherwise space in filename won't work) | |
IFS=$'\012' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/android/gyp/create_apk_operations_script.py b/android/gyp/create_apk_operations_script.py | |
index a39752bcf..c5306dc55 100755 | |
--- a/android/gyp/create_apk_operations_script.py | |
+++ b/android/gyp/create_apk_operations_script.py | |
@@ -87,7 +87,7 @@ def main(args): | |
'TARGET_CPU': repr(args.target_cpu), | |
} | |
script.write(SCRIPT_TEMPLATE.substitute(script_dict)) | |
- os.chmod(args.script_output_path, 0750) | |
+ os.chmod(args.script_output_path, 0o750) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Converts cname, host-records, and dhcp-host entries from a dnsmasq config file | |
called dnsmasq.conf in the current working directory to corresponding lines | |
suitable for OpenWrt's /etc/config/dhcp config file. | |
""" | |
import re | |
from io import StringIO | |
def convert_dnsmasq_conf(filename): | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Convert dd-wrt's forward_spec from 'nvram get forward_spec' to OpenWrt's | |
redirect rules suitable for /etc/network/firewall | |
""" | |
from io import StringIO | |
import re | |
# example forward line taken from 'nvram get forward_spec' on a dd-wrt router | |
forward_spec=r"https:on:tcp:443>192.168.1.201:443 ssh:on:tcp:22>192.168.1.202:22 ssh2:off:tcp:23>192.168.1.117:22" |