Skip to content

Instantly share code, notes, and snippets.

View eltechno's full-sized avatar
:octocat:
Focusing

eltechno eltechno

:octocat:
Focusing
View GitHub Profile
@eltechno
eltechno / pci_dss.md
Created September 26, 2017 13:39 — forked from diyan/pci_dss.md
PCI DSS. Useful resources
@eltechno
eltechno / JavaPasswordSecurity.java
Created October 11, 2017 14:24 — forked from jtan189/JavaPasswordSecurity.java
Java PBKDF2 Password Hashing Code
import java.security.SecureRandom;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.SecretKeyFactory;
import java.math.BigInteger;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
/*
* PBKDF2 salted password hashing.
* Author: havoc AT defuse.ca
@eltechno
eltechno / BCrypt.java
Created October 11, 2017 14:27 — forked from coderberry/BCrypt.java
BCrypt.java
// Copyright (c) 2006 Damien Miller <[email protected]>
//
// Permission to use, copy, modify, and distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
@eltechno
eltechno / Docker Compose Systemd
Created November 14, 2017 19:44 — forked from Luzifer/README.md
Running docker-compose as a systemd service
# Running docker-compose as a systemd service
## Files
| File | Purpose |
| ---- | ---- |
| `/etc/compose/docker-compose.yml` | Compose file describing what to deploy |
| `/etc/systemd/system/docker-compose.service` | Service unit to start and manage docker compose |
| `/etc/systemd/system/docker-compose-reload.service` | Executing unit to trigger reload on `docker-compose.service` |
| `/etc/systemd/system/docker-compose-reload.timer` | Timer unit to plan the reloads |
@eltechno
eltechno / install-gns3-ubuntu-17-10
Created November 16, 2017 21:54 — forked from AJNOURI/install-gns3-ubuntu-17-10
Installing GNS3 on Ubuntu 17.10
sudo add-apt-repository ppa:gns3/unstable
sudo apt-get update
sudo apt-get install gns3-gui
sudo apt install curl
curl -O https://download.docker.com/linux/ubuntu/dists/zesty/pool/stable/amd64/docker-ce_17.09.0~ce-0~ubuntu_amd64.deb
sudo dpkg -i docker-ce_17.09.0~ce-0~ubuntu_amd64.deb
sudo gpasswd -a $USER docker
newgrp docker
sudo apt-get install xtightvncviewer
@eltechno
eltechno / openvpn-server.sh
Created December 13, 2017 22:46 — forked from kremalicious/openvpn-server.sh
Hardened OpenVPN server on Ubuntu including client configuration script
#
# Hardened OpenVPN server on Ubuntu 16.04
# repeatable config generation script at end
#
# TOC
# ----
# 1. SERVER
# 2. NETWORKING
# 3. CLIENTS
# 3.1. REPEAT FOR EACH CLIENT
@eltechno
eltechno / tor-hidden-service-host.sh
Created December 13, 2017 22:47 — forked from kremalicious/tor-hidden-service-host.sh
Install and run Tor hidden service on pretty much anything
##
# for Ubuntu 16.04 Xenial Xerus
##
######################################
# INITIAL SERVER SETUP & HARDENING
######################################
# most VPS providers give you root user from the start
ssh [email protected]
@eltechno
eltechno / tor-openvpn.sh
Created December 13, 2017 22:47 — forked from kremalicious/tor-openvpn.sh
Install and configure Tor as proxy for all OpenVPN server traffic
# what we want:
# client -> OpenVPN -> Tor -> Internet
# Install & configure OpenVPN
# https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04
# assumed OpenVPN configuration
# 10.8.0.1/24-Subnet
# tun0-Interface
@eltechno
eltechno / CiscoKeyGen.py
Created January 4, 2018 16:22 — forked from Sirbank/CiscoKeyGen.py
Cisco IOU License Generator. Originally found at http://www.routingloops.co.uk/cisco/gns3-v1-1-install-on-ubuntu-14-04-lts/, I have done a few changes to it. Make the file executable with " chmod +x CiscoKeyGen.py " and execute it " ./CiscoKeyGen.py ".
#! /usr/bin/python
print "\n*********************************************************************"
print "Cisco IOU License Generator - Kal 2011, python port of 2006 C version"
import os
import socket
import hashlib
import struct
# get the host id and host name to calculate the hostkey
hostid=os.popen("hostid").read().strip()
hostname = socket.gethostname()
@eltechno
eltechno / README-Template.md
Created March 15, 2019 21:56 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites