Skip to content

Instantly share code, notes, and snippets.

Engineering #security stuff in #go and #python in #AWS

Victor Dorneanu dorneanu

Engineering #security stuff in #go and #python in #AWS
View GitHub Profile
dorneanu / subscriptions.opml
Created June 13, 2022 12:03
My RSS Subscriptions
View subscriptions.opml
<?xml version="1.0"?>
<opml version="1.0">
<title>Elfeed-Org Export</title>
<outline title="elfeed">
<outline title="reddit">
<outline title="inbox" xmlUrl=";user=cyneox"/>
<outline title="listings" xmlUrl=";user=cyneox"/>
dorneanu /
Created August 16, 2021 11:49
This will fetch readable content from an URL (using rdrview), convert HTML content to Epub (using pandoc) and finally upload the e-book to Dropbox (using rclone)
dorneanu / go.mod
Created June 10, 2021 11:43
Convert miMind XML exports to JSON
View go.mod
module mimind2json
go 1.16
require v1.1.0
dorneanu / main.go
Last active February 24, 2021 09:10
Simple JS keylogger (can be used in XSS) in combination with a websocket server in Golang. Adapted from the example in the "Black Hat Go" book.
View main.go
package main
import (
dorneanu /
Last active January 30, 2023 07:01
Python: Implement basic plugin architecture with Python and importlib

Implementing a basic plugin architecture shouldn't be a complicated task. The solution described here is working but you still have to import every plugin (inheriting from the base class).

This is my solution:

Basic project structure

$ tree
dorneanu / convert_json_to_strct_list.go
Last active September 20, 2022 03:27
Golang: Convert JSON string/objects to list of structure
View convert_json_to_strct_list.go
// Go Playground:
package main
import (
// Field is a key value structure
dorneanu /
Last active December 7, 2019 17:35
Python: List all repos inside a organization using python and github3
# Make sure you authorize your access token to be used with SAML
# Run:
# python <org>
import github3
import os
dorneanu /
Created October 31, 2016 15:15
Graphviz for plotting stack and dereferenced values
// Show stack and dereferenced values using Graphviz (DOT)
// (c) Victor Dorneanu
digraph G {
// Define layout
graph [pad=".75", ranksep="0.95", nodesep="0.05"];
node [shape="record"];
import requests
import pandas as pd
import os
# Config stuff
headers = {
'User-Agent': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0'
# Add here more headers
dorneanu /
Last active January 21, 2020 13:01
Put nginx and PHP to jail using Debian 8
# Config
export JAIL=/var/www/chroot
function create_chroot {
# Create devices
mkdir $JAIL/dev
mknod -m 0666 $JAIL/dev/null c 1 3