Skip to content

Instantly share code, notes, and snippets.

View Warchant's full-sized avatar
🐻
C++ go brrr

Bohdan Warchant

🐻
C++ go brrr
View GitHub Profile
<?php
// simple technique to remove bugs from your code
// example buggy code
$your_code = "<html><Oh man>i hope i don't have any American cockroaches in my code</Oh man></html>";
$list_of_bugs = array('American cockroach', 'Ants', 'Aphids', 'Aphids', 'Asian paper wasp',
'Asian paper wasp nest', 'Assassin bug', 'Australian bag moth', 'Australian bag moth pupa',
'Avondale spider', 'Backswimmer', 'Bamboo moth', 'Banana moth', 'Banana moth pupa',
import struct
f = open("GPT_TABLE", "rb")
w = open("GPT_TABLE_PLUS_ZFS", "wb")
d = f.read()
fields = ["BA7C6E51CF6ED6118FF800022D09712B", # ParittionTypeGUID
"12312312312312312312312312312312", # UniquePartitionGUID
"0068707400000000", # StartingLBA
"0068B07400000000", # EndingLBA
######### PROTECTIVE MBR #########
Mnemonic : Boot code
Byte Offset : 0
Byte Length : 440
Contents : Unused by UEFI systems
Value(hex):
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
bogdan@ws1:~$ drill -T -k ~/sne/unbound/root.key isc.org
;; Number of trusted keys: 1
;; Domain: .
[T] . 172800 IN DNSKEY 257 3 8 ;{id = 19036 (ksk), size = 2048b}
. 172800 IN DNSKEY 256 3 8 ;{id = 46551 (zsk), size = 1024b}
Checking if signing key is trusted:
New key: . 172800 IN DNSKEY 256 3 8 AwEAAcCsATzyk1Hj1xabagAGWi9sZSbB+igdzDM8CMZ5fPcOb314yP9/lmvidoBuApPlMVwlz0lXaj6gzyjoOKBveoDD0VyHTqjCDg9UrcDoClNZciR2sHZoaMZp2yVNFyaC+7MkA8lsrCShieYPEowSjQdkvY5ONlEib/ATXdmAhfgB ;{id = 46551 (zsk), size = 1024b}
Trusted key: . 172800 IN DNSKEY 257 3 8 AwEAAagAIKlVZrpC6Ia7gEzahOR+9W29euxhJhVVLOyQbSEW0O8gcCjFFVQUTf6v58fLjwBd0YI0EzrAcQqBGCzh/RStIoO8g0NfnfL2MTJRkxoXbfDaUeVPQuYEhg37NZWAJQ9VnMVDxP/VHL496M/QZxkjf5/Efucp2gaDX6RS6CXpoY68LsvPVjR0ZSwzz1apAzvN9dlzEheX7ICJBBtuA6G3LQpzW5hOA2hzCTMjJPJ8LbqF6dsV6DoBQzgul0sGIcGOYl7OyQdXfZ57relSQageu+ipAdTTJ25AsRTAoub8ONGcLmqrAmRLKBP1dfwhYB4N7knNnulqQxA+Uk1ihz0= ;{id = 19036 (ksk), size = 2048b}
Trusted key: . 172800 IN DNSKEY 257 3 8 AwEAAagAIKlVZrpC6Ia7gEzahOR+9W29euxhJhVVLOyQbSEW0O8
st1.os3.su. 1800 IN SOA st1.os3.su. me.st1.os3.su. 2014070206 3600 900 1209600 1800
st1.os3.su. 1800 IN RRSIG SOA 8 3 1800 20160927132106 20160830132106 40116 st1.os3.su. X6HzOurzsd6GBhT9s6QH/P8P8F5izpVhZYNO3QWDukGOmGZAsInPB6NW8wYAARX16PL1qYv39Tlv1yikRQiPm3tDavY52mwPtXOSQ/GDvtT/EC3SURSIvaMWL+AM+AmRLTHC+QKd5Q4m3XmYyvPsMouQ1Ct4NSUZ5zgW3XyMEnQ=
st1.os3.su. 1800 IN A 188.130.155.34
st1.os3.su. 1800 IN RRSIG A 8 3 1800 20160927132106 20160830132106 40116 st1.os3.su. X5FgipRQr0KX/McyVSzqcgoAajv8iShyS+LbXp/tPEIl66eYHsYDK1Of6p+QcGu/ekvXIWJlXbE9b2Mk5fSG1Ypad2LFMAfjqYJQ1ou0GtZfEs5V/blWjpPaPEuWK7txIOJp29eiWAiV3sjRyzeEtWjiE1T2+5sb637WpeuEGDY=
st1.os3.su. 1800 IN NS st1.os3.su.
st1.os3.su. 1800 IN NS st2.os3.su.
st1.os3.su. 1800 IN RRSIG NS 8 3 1800 20160927132106 20160830132106 40116 st1.os3.su. UZAE7Pt0TtWi/odPIa6/gCyTsgs5c+m/DKUCa/GSfmyD3T9YZGDKaIul25mufdySJ557zwGzGLYFs5Wm27BcrWl+Y52uKDhI/Rcwe6kS2BLSQvPNSweAcyQ9sZ7OExICIbwRHHC0TGniYviW1ANDuA+iHEUI6FrWh80snLQBnl8=
st1.os3.su. 1800 IN MX 0
@Warchant
Warchant / Dockerfile
Last active January 21, 2019 03:52
sendmail Dockerfile. But `makemap` fails with `makemap: Need to recompile with -DNEWDB for hash support`.
FROM ubuntu
# http://www.linux-sxs.org/internet_serving/sendm2.html
ENV SMUSER smmsp
RUN apt-get update && apt-get install -y \
m4 \
build-essential \
wget \
libsm-dev \
libdb-dev \
openssl \
@Warchant
Warchant / CMakeLists.txt
Created January 20, 2017 07:39
Flatbuffer example
cmake_minimum_required (VERSION 2.8.11)
project (fbtest)
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14" )
add_executable(write1 write1.cpp)
target_include_directories(write1 PUBLIC
"/home/bogdan/tools/flatbuffers/include"
)
@Warchant
Warchant / keepass-forensic-analysis.py
Created February 26, 2017 11:52
Results of our research about forensics properties of keepass
#!/usr/bin/python2
import struct
import math
import string
import salsa20
PTR_SIZE = 8 # bytes.
assert PTR_SIZE == 8 or PTR_SIZE == 4, "x64 or x32"
PACK_FMT = "<Q" if PTR_SIZE == 8 else "<L"
set peer name: 798a30f0f266
IP: 172.18.0.3
{
"ip": "172.18.0.3",
"name": "798a30f0f266",
"privateKey": "4PqdBVRUh41PEKUJdujHDIvE58xH/w7PYrJBmm7ZglyzX4VEzIuyTfxvR/bJ+QBbquRvr2k5zO8dGo/hlcCWVA==",
"publicKey": "CSaHZaX0VNKRczospePGTONffjsUmHLHS8p9yRingg8="
}
============
output: /tmp/me.json