Skip to content

Instantly share code, notes, and snippets.

1- create
gpg --gen-key
2- list
gpg --list-keys
OR
gpg -k
Above command will show the key from the public keyring. To view the secret key ring, use- gpg --list-secret-keys (OR gpg -K)
3- export
To send your public key to a correspondent you must first export it-
gpg --output <public-gpg-key.gpg> --armor --export [email protected]
@kpnemo
kpnemo / gigitalocean_vpn.sh
Last active November 23, 2015 09:11
digitalocean vpn
#!/bin/bash
echo "Select on option:"
echo "1) Set up new PoPToP server AND create one user"
echo "2) Create additional users"
read x
if test $x -eq 1; then
echo "Enter username that you want to create (eg. client1 or john):"
read u
echo "Specify password that you want the server to use:"
read p
@seyhunak
seyhunak / digitalocean.sh
Created October 29, 2014 13:51
DigitalOcean - Scaling
Client Key: A2a9SfT4NeFBl6df5cu42
API Key: mnqWGdu4OfLBwwJPee6cpjkeY70qv9mKicqZYvtHJ
#!/usr/bin/python
# Exploit Title: ossec 2.8 Insecure Temporary File Creation Vulnerability Privilege Escalation
# Date: 14-11-14
# Exploit Author: skynet-13
# Vendor Homepage: www.ossec.net/
# Software Link: https://github.com/ossec/ossec-hids/archive/2.8.1.tar.gz
# Version: OSSEC - 2.8
# Tested on: Ubunutu x86_64
# CVE : 2014-5284
@juliancantillo
juliancantillo / wp_laravel_site
Created May 29, 2015 15:46
nginix with laravel and wordpress
server {
listen 80;
#listen [::]:80 ipv6only=on;
root /srv/staging/inmovis_laravel/public;
index index.php index.html index.htm;
error_log /srv/staging/logs/error.log warn;
# Make site accessible from http://localhost/
@worawit
worawit / http_sys_pseudo.c
Last active July 30, 2021 04:18
MS15-034 (CVE-2015-1635) PoCs
/*
Pseudo code in HTTP.sys to understand flow related to MS15-034
All pseudo code are reversed from vulnerable HTTP.sys on Windows 7 SP1 x86
For anyone want to know what function are patched.
Just open patched version and find all functions reference to RtlULongLongAdd().
*/
@cloudrck
cloudrck / debian-gfs.sh
Created July 10, 2015 02:04
Debian 8 Jessie GlusterFS Install and Configuration
#!/bin/bash
set -e
# Debian 8 'Jessie' GlusterFS Install
#########
#ToDo:
# * Change guid/suid of mount
# * Give option for cluster type
# * Change variables via command line read
########
@danreb
danreb / base64_finder.sh
Last active August 9, 2018 18:20
Find all PHP code with base64_decode - useful to find suspected hacker files
find /home/HOMEDIR/public_html \( -name "*.php" \) -type f -print0 | xargs -0 grep --binary-files=without-match -ir "base64_decode\s*("

Installing Open vSwitch on Ubuntu 14.04

Open vSwitch is a production quality, multilayer virtual switch licensed under the open source Apache 2.0 license. This guide shows how to install and configure Open vSwitch properly on Ubuntu 14.04.

Installing Open vSwitch

sudo apt-get install openvswitch-switch openvswitch-common

Creating virtual bridge

@slayerfat
slayerfat / phpmd-ruleset.xml
Last active January 10, 2025 11:58
php mess detector ruleset for laravel and similar frameworks
<?xml version="1.0" encoding="UTF-8"?>
<ruleset name="Laravel and similar phpmd ruleset"
xmlns="http://pmd.sf.net/ruleset/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd"
xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd">
<description>
Inspired by https://github.com/phpmd/phpmd/issues/137
using http://phpmd.org/documentation/creating-a-ruleset.html
</description>