Skip to content

Instantly share code, notes, and snippets.

@mhavrlent
mhavrlent / openpli_with_iptables.md
Last active August 31, 2023 08:42
How to build your own OpenPLi image for VU+ box with iptables support

How to build your own OpenPLi image for VU+ box with iptables support

Note: Following was tested only with vuzero box, but it should also work with any other VU+ box. You just need to change the MACHINE properly below to one of the supported OpenPLi boxes.

Install dependencies

Note: Tested on Ubuntu 18.04

@mhavrlent
mhavrlent / Microsoft.PowerShell_profile.ps1
Created November 27, 2019 14:03
Run Cygwin bash from Powershell in the same directory
function runCygwinBash {
$env:CHERE_INVOKING = "1"
C:\Cygwin64\bin\bash.exe --login -i
}
Set-Alias cygbash runCygwinBash
#!/usr/bin/env python
"""
mail2cert.py:
Extracts certificates from Outlook emails.
Uses only emails received today and with specific subject.
Certificate is saved to a file, where file name is the first FQDN found
in the email.
Can be easily modified to extract anything using given regex.
"""
@mhavrlent
mhavrlent / test.java
Created April 12, 2021 17:07
Decrypt Chrome (>=80) cookies on Windows OS using Java and use them in REST API calls (Spring RestTemplate)
package test;
import com.sun.jna.platform.win32.Crypt32Util;
import org.json.JSONObject;
import org.springframework.http.*;
import org.springframework.web.client.RestTemplate;
import javax.crypto.Cipher;
import javax.crypto.spec.GCMParameterSpec;
import javax.crypto.spec.SecretKeySpec;