Skip to content

Instantly share code, notes, and snippets.

View kaworu's full-sized avatar

Alexandre Perrin kaworu

View GitHub Profile
@kaworu
kaworu / gcc.patch
Created March 26, 2013 08:58
pkgng patch
diff --git a/external/libelf/elf_update.c b/external/libelf/elf_update.c
index 900ed2a..d5d41e3 100644
--- a/external/libelf/elf_update.c
+++ b/external/libelf/elf_update.c
@@ -502,7 +502,7 @@ _libelf_resync_sections(Elf *e, off_t rc, struct _Elf_Extent_List *extents)
static off_t
_libelf_resync_elf(Elf *e, struct _Elf_Extent_List *extents)
{
- int ec, eh_class, eh_type;
+ int ec, eh_class;
@kaworu
kaworu / gist:5245336
Last active December 15, 2015 10:19
gcc48 fail to build pkgng (525ee02219eaffb7001b5e834c484d720e77866f)
% CC=gcc48 CFLAGS="-O2 -g" make -DWITH_BUNDLED_LIBELF
sed -e 's,%%PKGVERSION%%,1.1.a1,' Doxyfile.in > Doxyfile
===> external (all)
===> external/sqlite (all)
Warning: Object directory not changed from original /usr/home/alex/code/pkgng/external/sqlite
gcc48 -O2 -g -fPIC -DHAVE_READLINE=1 -I/usr/include/edit -DSQLITE_OMIT_AUTOVACUUM -DSQLITE_OMIT_BLOB_LITERAL -DSQLITE_OMIT_DECLTYPE -DSQLITE_OMIT_EXPLAIN -DSQLITE_OMIT_DEPRECATED -DSQLITE_OMIT_LOAD_EXTENSION -DSQLITE_OMIT_PROGRESS_CALLBACK -DSQLITE_OMIT_TCL_VARIABLE -DSQLITE_OMIT_UTF16 -DSQLITE_OMIT_CAT -DSQLITE_OMIT_CHECK -DSQLITE_OMIT_AUTOINIT -DSQLITE_OMIT_COMPILEOPTION_DIAGS -DSQLITE_OMIT_INTEGRITY_CHECK -DSQLITE_OMIT_BUILTIN_TEST -DSQLITE_OMIT_SHARED_CACHE -DUSE_PREAD -DSQLITE_THREADSAFE=1 -DSQLITE_TEMP_STORE=3 -Dmain=sqlite3_shell -DNDEBUG -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wno-pointer-sign -Wformat=2 -Wno-format-extra-args -Werror -c sqlite3.c -o sqlite3.o
gcc48 -O2 -g -fPIC -DHAVE_READLINE=1 -I/usr/incl
@kaworu
kaworu / pf.conf
Created March 26, 2013 22:49
halp
ext_if = re0
loopback = lo0
jail_if = lo1
jail_mail = 127.0.0.2
ssh_port = 4222
icmp_types = "echoreq"
table <bans> persist
@kaworu
kaworu / terminal
Created March 27, 2013 20:22
nc session to Rspamd webui
[alex@debian ~] % nc mail.br0c0.li 80
GET /rspamd/login HTTP/1.1
Password: q1
Host: mail.br0c0.li
Connect: close
HTTP/1.1 200 OK
Server: nginx/1.2.7
Date: Wed, 27 Mar 2013 20:21:17 GMT
Content-Type: text/html; charset=ISO-8859-1
@kaworu
kaworu / httpd.conf
Created March 27, 2013 20:29
nginx & apache proxy config
[...]
<IfModule proxy_module>
ProxyPass /rspamd http://localhost:11336
ProxyPassReverse /rspamd http://localhost:11336
</IfModule>
Alias /rspamdadmin "/usr/local/www/rspamdadmin"
<Directory "/usr/local/www/rspamdadmin">
Options none
AllowOverride Limit
@kaworu
kaworu / 091.121.010.176.11336-091.121.010.176.20469
Created March 27, 2013 22:04
tcpflow (nginx <-> rspamd webui)
HTTP/1.0 200 OK
Content-Length: 256
Content-Type: text/html; charset=ISO-8859-1
Connection: close
{"auth": "ok","version":"0.5.4","uptime": 15748,"error":"none", "clean":0,"probable":1,"greylist":0,"reject":0,"scanned":1,"learned":0}
GET /rspamd/login HTTP/1.1
Host: mail.br0c0.li
Connection: keep-alive
Accept: application/json, text/javascript, */*; q=0.01
X-Requested-With: XMLHttpRequest
Password: q1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.172 Safari/537.22
Referer: http://mail.br0c0.li/webui/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8,fr-CH;q=0.6,fr;q=0.4
@kaworu
kaworu / rmilter.conf
Created April 9, 2013 14:13
rmilter.conf
# Sample config file for rmilter
# $Id$
#
# .include - directive to include other config file
#.include ./rmilter-grey.conf
# pidfile - path to pid file
# Default: pidfile = /var/run/rmilter.pid
@kaworu
kaworu / gist:5453285
Created April 24, 2013 16:02
X-AntiAbuse !
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - server.nodeposit--casino.info
X-AntiAbuse: Original Domain - huongviet.ch
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - welcome-bonus.info
X-Get-Message-Sender-Via: server.nodeposit--casino.info: authenticated_id: coupons4u@welcome-bonus.info
@kaworu
kaworu / pf.conf
Created May 8, 2013 20:08
DA BIOUTIFOUL Pé-èF rulezzz
loopback = lo0
ext_if = re0
ext_ipv4 = 91.121.10.176
ext_ipv6 = 2001:41d0:1:5db0::1
ext_ip = "{" $ext_ipv4 $ext_ipv6 "}"
table <pf_ssh_abuse> persist
table <pf_http_abuse> persist
table <fail2ban> persist
table <fail2ban_ssh> persist