Skip to content

Instantly share code, notes, and snippets.

@quietjoy
quietjoy / install.sh
Created November 29, 2017 16:06 — forked from ihor/install-rabbitmq-on-amazon-linux.sh
Install RabbitMQ on Amazon Linux
# Modify /etc/yum.repos.d/epel.repo. Under the section marked [epel], change enabled=0 to enabled=1.
sudo yum install erlang --enablerepo=epel
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.1.1/rabbitmq-server-3.1.1-1.noarch.rpm
sudo rpm -Uvh rabbitmq-server-3.1.1-1.noarch.rpm
# Enable managament plugin
sudo rabbitmq-plugins enable rabbitmq_management
@quietjoy
quietjoy / wifi-remember.ps1
Last active February 11, 2023 15:20
Get wifi networks and passwords
# The following is a powershell script to get all previously joined wifi networks and passwords for windows systems
# The number of lines skipped in the following command may need to be altered if "Group policy profiles" are available
$profiles = $(netsh wlan show profiles) -split "\n" | Select-Object -Skip 9 | Select -SkipLast 1
foreach($profile in $profiles)
{
$network = $profile.Split(":")[1].Replace(" ", "")
$info = $(netsh wlan show profile $network key=clear)
$key = $info | Select-String -Pattern "Key Content"
@quietjoy
quietjoy / netgate-log-parser.ps1
Created March 6, 2017 02:26
Powershell script for parsing netgate router logs
$reader = [System.IO.File]::OpenText("path/to/log")
$ConnectedIPs = New-Object System.Collections.ArrayList
$RejectedConnections = New-Object System.Collections.ArrayList
$RSTScans = New-Object System.Collections.ArrayList
$ACKScans = New-Object System.Collections.ArrayList
while($null -ne ($line = $reader.ReadLine())) {
if ($line.StartsWith('[Internet connected]')) {
$cip = $ConnectedIPs.Add($line.Split('IP address: ').Split(',')[1])
}