Skip to content

Instantly share code, notes, and snippets.


Marcin Antkiewicz marcinantkiewicz

View GitHub Profile
View print cookies
//will miss cookies with httpOnly attribute set
function printCookie(match){
var cookies = document.cookie.split(";");
var cookie = {};
for (var i=0; i<cookies.length; i++){
header = cookies[i].trim();
marker = header.indexOf("=");
name = header.substr(0,marker);
value = header.substr(marker+1);
View Risk Management reading

Note, a lot of content here is from SIRA lists/posts. If you are interested in the topic, please join SIRA.


  • Group items in a sane way.
  • The papers probably should be listed in a quotable format of some standard. Same with books?
  • This list grew a bit big, probably should be split into separate lists per category. I started listing by person, but it probably makes no sense.
  • The books and podcasts are the only lists that I think are substantial. The rest is not even stubs.


Some of the books are available used on Ebay, for a fraction of the Amazon price.

marcinantkiewicz /
Created Sep 12, 2018 — forked from joyrexus/
collapsible markdown

collapsible markdown?


yes, even hidden code blocks!

print("hello world!")
marcinantkiewicz / unifi system setup
Last active Jun 8, 2018
Notes - setup of unifi controller in docker
View unifi system setup
USG and UAP - security gateway and access ponit adoption/initial config
- devices want to live on 192.168.1 network.
- IP address can be set through the controller, in the Networks tab, or using CLI (configure, set interfaces ethernet eth1 address, delete interfaces ethernet eth1 address,
- the DNS name used in the Controller tab must resolve to the right IP, else succesful adoption will requie login to the device and "mca-cli, set-inform http://controller-IP-or-resolving-fqdn):8080/inform
Controller setup:
-- runs fine in docker
-- cloud key is convenient, but it was flakey for me. This is not expected, people have good luck with them.
marcinantkiewicz /
Last active Jun 14, 2018
Resources for bluetooth monitoring (ubertooth)
View arp scan in bash (8e529d216b4252a866882c0c77c945f9)
function msa_scan_arp () {
## Discover hosts on a /24 that respond to arp requests.
# Write information about hosts that responded to a file.
# ex: msa_resolve_arp 192.168.1 arp-scan.txt
# yep, this is an ugly hack
# arping -w should provide a qicker timeout for IPs that do not respond, but it works in a way I do not seem to understand.
NET=$1; shift;
FILENAME=$1; shift
View bonding ifaces for monitoring
auto bond0
iface bond0 inet static
hwaddress ether aa:aa:aa:aa:aa:aa # else mac can float based on what's bonded
post-up ifenslave bond0 eth1 eth2 eth3 eth4 eth5
# to verify/monitor
cat /proc/net/bonding/bond0
View Bootable USB drive on OSX
Movign a bootable ISO to USB drive on OSX:
- Insert the USB drive. For portability, format as FAT
- The drive will mount, unmount the volume (but do not "eject")
user $ sudo diskutil unmountDisk /dev/disk2
Unmount of all volumes on disk2 was successful
- I need a GPT partition, in place of some junk here, so OSX formating tools will work just fine:
View power saving linux laptop
# Disable the NMI watchdog
echo '0' > '/proc/sys/kernel/nmi_watchdog';
# Runtime power management for I2C devices
for i in /sys/bus/i2c/devices/*/device/power/control ; do
echo auto > ${i}

On Twitter the other day, I was lamenting the state of OCSP stapling support on Linux servers, and got asked by several people to write-up what I think the requirements are for OCSP stapling support.

  1. Support for keeping a long-lived (disk) cache of OCSP responses.

    This should be fairly simple. Any restarting of the service shouldn't blow away previous responses that were obtained. This doesn't need to be disk, just stable - and disk is an easy stable storage for most server

You can’t perform that action at this time.