Skip to content

Instantly share code, notes, and snippets.

@worr
worr / pkg_search.pl
Created December 21, 2014 01:16
How to search for OpenBSD packages
/(?(?=.*\(.*?(??{ $ARGV[0] }).*?\).*)\(([A-Za-z0-9\.\-_]+)\)(?{ print $1 =~ s\/\.tgz\/\/r . "\n" }))/g foreach do { (-M ".search_cache/SHA256" > 1 or File::Fetch->new(uri => "http://ftp5.usa.openbsd.org/pub/OpenBSD/5.6/packages/amd64/SHA256")->fetch(to => ".search_cache")) and open(my $fh, ".search_cache/SHA256"); <$fh> }
static void RandomSeed(void)
{
/* 1. Seed the weak C PRNGs. */
/* Mix various stuff. */
pid_t pid = getpid();
size_t fqdn_len = strlen(VFQNAME) > 0 ? strlen(VFQNAME) : 1;
time_t start_time = CFSTARTTIME;
time_t now = time(NULL);
NodeList.prototype.forEach = Array.prototype.forEach; HTMLCollection.prototype.forEach = Array.prototype.forEach;
var pokeAll = function() {
document.querySelectorAll("div a[class='_42ft _4jy0 _4jy3 _4jy1 selected']:not([data-gt])").forEach(
function(item) {
item.click();
});
};
setInterval(pokeAll, 1000);

Keybase proof

I hereby claim:

  • I am worr on github.
  • I am worr (https://keybase.io/worr) on keybase.
  • I have a public key ASAOxt3hBMYJKML86stcsy2EbsLuAmShhv4niOFXTw9fJgo

To claim this, I am signing this object:

@worr
worr / CVE-2012-6084.py
Created December 4, 2013 06:22
Code not mine
#!/usr/bin/env python3
from argparse import ArgumentParser
import socket
def own( uri, port ):
sock = socket.socket()
try:
ret = sock.connect_ex(( uri, int( port ) ))
except:
print( "\t[-] Failed To Connect To {}".format( uri ) )
@worr
worr / octeon-rng.diff
Created October 23, 2013 02:42
Octeon rng support for OpenBSD
Index: conf/GENERIC
===================================================================
RCS file: /cvs/src/sys/arch/octeon/conf/GENERIC,v
retrieving revision 1.10
diff -u -b -w -p -r1.10 GENERIC
--- conf/GENERIC 19 Sep 2013 00:15:59 -0000 1.10
+++ conf/GENERIC 23 Oct 2013 01:22:06 -0000
@@ -51,3 +51,6 @@ pciide* at pci? flags 0x0000
# IDE hard drives
@worr
worr / cravatar.pl
Last active December 23, 2015 08:09
package cravatar;
use Dancer ':syntax';
use Dancer::Plugin::LDAP;
use Dancer::Plugin::Cache::CHI;
use Net::LDAP::Util qw/escape_filter_value/;
use Try::Tiny;
our $VERSION = '0.1';
@worr
worr / date.pl
Created July 5, 2013 18:11
matches some dates
my $mos = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ];
my $now = localtime;
my ($prev_month, $cur_month, $cur_day) = ($mos->[($now->mon() - 1) % 12], $mos->[$now->mon()], $now->mday());
map { print $out_fh $_ } grep { /(?:$cur_month|(?(?{$cur_day == 1})($prev_month)|$cur_month))\s+(?(1)(?:(?(?<=Feb\s)(?:28|29))30|31)|(?:$cur_day|(??{$cur_day - 1})))\b/ } <$in_fh>;
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/metaauto/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- Makefile 11 Mar 2013 10:50:11 -0000 1.17
+++ Makefile 7 May 2013 23:06:22 -0000
@@ -3,9 +3,10 @@
COMMENT = wrapper for gnu auto*