Skip to content

Instantly share code, notes, and snippets.

View asmoore82's full-sized avatar

Adam Moore asmoore82

  • Burlington, NC
View GitHub Profile
@asmoore82
asmoore82 / SuperPaste.ahk
Last active July 27, 2022 16:42
AutoHotKey script to use any clipboard manager to store encrypted passwords.
; SuperPaste - Encrypt/Decrypt/Autotype the clipboard contents
; - Most useful with a separate clipboard manager, hopefully should work with any
; - RC4 with salt is used for encryption, NOTE THAT THIS IS *NOT* STRONG ENCRYPTION! Its purpose is just
; - to prevent the plaintext password from sitting on the clipboard
; - to prevent the plaintext password from being stored in the clipboard manager files
; - to prevent anyone from easily viewing the plaintext either over the shoulder or on screenshare
; - A simple padding is added to the beginning and end of your plaintext to protect against accidentally decrypting
; and using an incomplete item, but this does not protect against items where the middle has been altered
; - To prevent anyone from walking up to your workstation and using these shortcuts to reveal your plaintext
; passwords, either close this script or set a blank or wrong encryption passwor
@asmoore82
asmoore82 / attr_pump.py
Created May 15, 2019 00:26
Python generic attribute processor that calls filter and composer functions
#Copyright (c) 2019 Adam Moore, MIT License
#The generic attribute processor that calls filter and composer functions
import string
def filter_digits_only(s):
return ''.join(c for c in s if c in string.digits)
def get_org_id(data):
return '12345'
@asmoore82
asmoore82 / dumpsql.bash
Created May 3, 2019 21:42
BASH script for a 2 week rotation of MySQL backups with a standardized name - run as cronjob every 2 or 4 hours.
#!/bin/bash
#Copyright (c) 2019 Alamance-Burlington Schools, MIT License
cd "$HOME/backups"
usernm="usernm"
passwd="passwd"
table="dbtable"
week="$( date +%-V )"
@asmoore82
asmoore82 / fw_export_clients.py
Created May 1, 2019 14:48
Python script to call FileWave Admin and export all clients to flat JSON list
#Copyright (c) 2018 Alamance-Burlington Schools, MIT License
import json
import os
import subprocess
#This script will safely do nothing
# when fw_host and scp_host values remain empty
# and/or if FileWaveAdmin.exe is not found as expected
@asmoore82
asmoore82 / fw_walk_clients_json.py
Last active April 30, 2019 13:38
Python script to take the JSON export tree out of FileWave and "flatten" it to a simple list.
#Copyright (c) 2018 Alamance-Burlington School System, MIT License
import json
import os
fwo_clients = 'all-clients.json'
fwo_min = 'all-clients.min.json'
fwo_flat = 'all-clients.flat.json'
fw_skip_groups = ('/LDAP Groups',)