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 | |
# http://www.alfredklomp.com/programming/shrinkpdf | |
# Licensed under the 3-clause BSD license: | |
# | |
# Copyright (c) 2014, Alfred Klomp | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: |
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
# NOTE: Follow the bridge separation guide here first: | |
# https://www.dd-wrt.com/wiki/index.php/Separate_LAN_and_WLAN | |
iptables -I FORWARD -i br0 -m state --state NEW -j ACCEPT | |
iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu | |
iptables -I FORWARD -i br1 -o br0 -m state --state NEW -j DROP | |
iptables -i FORWARD -i br1 -d `nvram get lan_ipaddr`/`nvram get lan_netmask` -m state --state NEW -j DROP | |
iptables -t nat -I POSTROUTING -o br1 -j SNAT --to 10.0.0.254 | |
iptables -I INPUT -i br1 -m state --state NEW -j DROP |
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
###--# BTA Inventory Check 1.0b | |
# This script was built to mass-check the inventory of many Furcadia characters | |
# and document the results. | |
# | |
# Author: Artex / IceDragon <[email protected]> | |
# | |
import re | |
import socket | |
import csv |
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
def str_reverse(s): | |
t = [z for z in s] | |
t.reverse() | |
return "".join(t) | |
def str_plus_reverse(s): | |
return s + str_reverse(s) | |
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
# Block Skype ads | |
127.0.0.1 *.msads.net | |
127.0.0.1 *.msecn.net | |
127.0.0.1 *.rad.msn.com | |
127.0.0.1 *.adnexus.net | |
127.0.0.1 a.ads2.msads.net | |
127.0.0.1 ac3.msn.com | |
127.0.0.1 ad.doubleclick.net | |
127.0.0.1 adnexus.net | |
127.0.0.1 adnxs.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
# Protocol Obfuscator (aka: University Firewall Countermeasure) | |
# | |
# This little script was made to punch a hole through the anti-SSH firewall | |
# rule my university seems to have added for the server I use. The rule resets | |
# connections that seem to exhibit OpenSSH banner/signature in them, which | |
# kinda sucks, since I can't just pick another port: I have to hide that SSH | |
# banner somehow. | |
# | |
# This script comes in pairs: | |
# * station: sits on the server itself, on an accessible (FW-unaffected) port |
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
import org.apache.mina.core.buffer.IoBuffer; | |
import org.apache.mina.core.service.IoHandlerAdapter; | |
import org.apache.mina.core.session.IdleStatus; | |
import org.apache.mina.core.session.IoSession; | |
import org.apache.mina.transport.socket.nio.NioSocketConnector; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import java.io.UnsupportedEncodingException; | |
import java.net.InetSocketAddress; |
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
# We take CSV headers from this file... | |
src_file = "source.csv" | |
# ...and add to this file as the first line | |
dst_file = "destination.csv" | |
# Output file that's created (to avoid possibly damaging the destination file) | |
output_file = "output.csv" | |
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
RM = /bin/rm | |
CC = /usr/bin/g++ | |
CC_FLAGS = -pthread -std=c++11 -ggdb | |
LIB = -L/usr/lib/x86_64-linux-gnu/ -lpthread -lglut -lGL -lGLU | |
INCLUDE = -I/usr/include/GL/ | |
# File names | |
# EXECUTION: | |
# make && GL_PRELOAD=/usr/lib/x86_64-linux-gnu/libpthread.so ./ass |
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
from glob import glob | |
import os | |
# Extract the date (YYYY-MM-DD) part of the filename | |
def get_date(filename): | |
return filename.split(' ')[0] | |
# Obtain a list of all .jpg files in the current dir | |
# File format: "YYYY-MM-DD HH.mm.ss.jpg" | |
files = glob('*.jpg') |