Skip to content

Instantly share code, notes, and snippets.

View darkk's full-sized avatar

Leonid Evdokimov darkk

View GitHub Profile
@darkk
darkk / sshmole
Created March 18, 2022 08:39
OpenWRT /etc/init.d/sshmole
#!/bin/sh /etc/rc.common
# NB: instance name is pure alpha-numeric, it can't have dashes!!!
#
# ==> /etc/config/sshmole <==
# config sshmole consrv
# option remote 4242
# option srv tun-user-c25ca8ab@consrv.example.org
# option respawn_retry 0 ~~ disables stop-on-crashloop
# option respawn_timeout 15 ~~ is sleep() between restarts
@darkk
darkk / 2019-07-17T12:43:26Z.pem
Last active July 29, 2019 10:58
Pile of facebook certs signed by Qaznet (Kaznet) certificate :)
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
09:ad:a8:4b:b3:5a:bb:a9:f0:bf:55:b3:2d:87:47:88
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=KZ, CN=Security Certificate
Validity
Not Before: Jul 16 12:39:52 2019 GMT
Not After : Jul 15 12:39:52 2020 GMT
@darkk
darkk / 00-qazca.pem
Last active October 16, 2022 05:55
facebook cert signed by Qaznet (Kaznet) certificate
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
3d:95:7f:ca:1f:8c:0f:c8:69:2c:01:99:4e:b5:52:31:03:5b:9d:f1
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=KZ, CN=Qaznet Trust Network
Validity
Not Before: Feb 2 05:41:00 2016 GMT
Not After : Feb 2 05:41:00 2046 GMT
@darkk
darkk / README.txt
Created May 17, 2018 17:50
Apple любит PTR
[20:48] *@* ~ $ host apple.com
apple.com has address 17.142.160.59
apple.com has address 17.172.224.47
apple.com has address 17.178.96.59
apple.com mail is handled by 10 ma1-aaemail-dr-lapp03.apple.com.
apple.com mail is handled by 10 ma1-aaemail-dr-lapp02.apple.com.
apple.com mail is handled by 10 ma1-aaemail-dr-lapp01.apple.com.
apple.com mail is handled by 10 nwk-aaemail-lapp03.apple.com.
apple.com mail is handled by 10 nwk-aaemail-lapp02.apple.com.
apple.com mail is handled by 10 nwk-aaemail-lapp01.apple.com.
@darkk
darkk / detox.py
Last active April 22, 2018 11:29
Токсичный реестр... лишние префиксы... бр-р-р!
#!/usr/bin/env python3
import ipaddress
import sys
nets = [ipaddress.ip_network(line.strip())
for line in open('subnets.txt')]
nets.sort()
def do_pass():
for i in range(len(nets)):
@darkk
darkk / Makefile
Last active April 20, 2018 13:04
Социально-значимые сервисы не пострадали (c) РКН
subnets.sql: subnets.txt
echo 'SELECT tld, COUNT(*) FROM domain WHERE' >$@
./mksql.py a1 a2 a3 a4 <$^ >>$@
echo 'GROUP BY tld;' >>$@
subnets.txt: dump.csv
cut -d ';' -f 1 <$^ | tr '| ' '\n' | grep / | sort -n >$@

Keybase proof

I hereby claim:

  • I am darkk on github.
  • I am darkk (https://keybase.io/darkk) on keybase.
  • I have a public key whose fingerprint is 6691 DE6B 4CCD C1C1 76A0 0D4A E1F2 A980 7F50 FAB2

To claim this, I am signing this object:

@darkk
darkk / rnd.darkk.net.ru.lua
Last active June 9, 2017 14:48
PowerDNS recursor LUA code that generates N random IP addresses with specified TTL as a response.
-- uses PowerDNS 4.x, does not work with 3.x
function getnum ( domain )
domain = domain:lower()
ttl, count = string.match(domain, '^(%d+)%.(%d+)%.rnd%.darkk%.net%.ru%.$')
if ttl ~= nil then
return tonumber(ttl), tonumber(count)
end
count = string.match(domain, '^(%d+)%.rnd%.darkk%.net%.ru%.$')
if count ~= nil then
@darkk
darkk / Makefile
Last active August 7, 2016 09:19
latency on PPPoA ADSL Annex A on using Lantiq
SHELL=/bin/bash
OUT=echosrv.x86_64 echosrv.mips
CFLAGS=-Wall -Wextra -Wpedantic -O2
.PHONY: all clean upload
all: $(OUT)
clean:
rm -f $(OUT)
echosrv.x86_64: echosrv.c
@darkk
darkk / rtt.png
Last active October 11, 2015 19:17
rtt.png