Skip to content

Instantly share code, notes, and snippets.

Andrea Brancaleoni thypon

View GitHub Profile
@thypon
thypon / Makefile
Last active Nov 9, 2016
make america great again
View Makefile
%:
@echo -n 'Make $@ '
great:
@echo -n 'Great '
again:
@echo 'Again'
View gogs-panic.log
gogs * panic: template: admin/auth/list:37: function "DateFormat" not defined
gogs *
gogs * goroutine 1 [running]:
gogs * html/template.Must(0x0, 0x7f93f8300028, 0xc8204b9100, 0x0)
gogs * /usr/lib/go/src/html/template/template.go:330 +0x4b
gogs * gopkg.in/macaron%2ev1.compile(0xc82023d4c0, 0x13, 0xc820424bb0, 0x1, 0x1, 0x0, 0x0, 0xc82023d520, 0x2, 0x2, ...)
gogs * /tmp/go/src/gopkg.in/macaron.v1/render.go:281 +0x97e
gogs * gopkg.in/macaron%2ev1.(*templateSet).Set(0xc82022b680, 0x10a46a0, 0x7, 0xc820461ef0, 0x0)
gogs * /tmp/go/src/gopkg.in/macaron.v1/render.go:306 +0x4d
gogs * gopkg.in/macaron%2ev1.renderHandler(0xc82023d4c0, 0x13, 0xc820424bb0, 0x1, 0x1, 0x0, 0x0, 0xc82023d520, 0x2, 0x2, ...)
View podofo
From 8480597997fca956359869aecefd577a6c44b263 Mon Sep 17 00:00:00 2001
From: Luca <luca.andrea.fuse@gmx.com>
Date: Sun, 18 Oct 2015 12:43:19 +0200
Subject: [PATCH] New package: podofo-0.9.3
---
common/shlibs | 1 +
srcpkgs/podofo-devel | 1 +
srcpkgs/podofo/template | 24 ++++++++++++++++++++++++
3 files changed, 26 insertions(+)
@thypon
thypon / wheel.cpp
Created Sep 29, 2015
wheel extraction
View wheel.cpp
#include <tuple>
#include <list>
#include <string>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <thread>
#define ENTRY pair<string, unsigned int>
#define LABEL 0
@thypon
thypon / gdbwalkthrough.c
Created Aug 30, 2015
GDB Function Tracer
View gdbwalkthrough.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void startDebugger ();
void stopDebugger ();
char gdbRead ();
void gdbWrite (char c);
void readUntilPrompt (unsigned char *data); // If data is NULL copy to stdout
View Takeover?
$ http get archassault.org
HTTP/1.1 302 Found
Cache-Control: no-cache
Connection: close
Content-Length: 87
Content-Type: text/html; charset=utf-8
Location: https://blackarch.org
P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
Server: nginx/0.7.65 + Phusion Passenger 2.2.5 (mod_rails/mod_rack)
Status: 302
@thypon
thypon / recursivechecksec.sh
Created Aug 24, 2015
check security for all linked libraries
View recursivechecksec.sh
recursivechecksec() {
sudo LD_TRACE_LOADED_OBJECTS=1 LD_VERBOSE=1 /lib/ld-linux-x86-64.so.2 $1 | grep "=>" | sed 's|\s*||' | sed 's|(.*)||g' | awk '{print $3}' | sort | uniq | xargs -n1 ls -la | awk '{print $11}' | xargs -n1 echo /usr/lib/ | sed 's|\s*||g' | xargs -n1 checksec --file
}
@thypon
thypon / dontfork.c
Last active Aug 29, 2015
Daemonize tracer
View dontfork.c
// dontfork.c, a little ptrace utility that traces all child process
// and exits only when the latest spawned child is dead
#include <assert.h>
#include <stdio.h>
#include <sys/ptrace.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <string.h>
#include <linux/ptrace.h>
#include <sys/prctl.h>
@thypon
thypon / Extract Deps
Created Apr 24, 2015
Extract Deps in Ruby
View Extract Deps
#!/usr/bin/env ruby
require 'rubygems'
require 'gems'
require 'json'
class Package < Struct.new(:name, :language, :version, :hash, :source, :homepage, :depends)
end
class Dependencies < Struct.new(:hostmake, :make, :runtime)
View gist:86add332b6d85b9abb39
class Proc
def self.compose(f, g)
lambda { |*args| f[g[*args]] }
end
def *(g)
Proc.compose(self, g.to_proc)
end
def |(g)
You can’t perform that action at this time.