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
start() { | |
echo "Starting dropbox..." | |
start-stop-daemon -b -o -c root -S -x /root/.dropbox-dist/dropboxd | |
} | |
stop() { | |
echo "Stopping dropbox..." | |
start-stop-daemon -o -c root -K -x /root/.dropbox-dist/dropboxd | |
} | |
status() { | |
dbpid=$(pgrep -u root dropbox) |
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
# if 32 bit | |
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86" | tar xzf - | |
# if 64 bit | |
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf - |
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
#!/bin/bash | |
# Author: M. Stevenson | |
# Date : 2015-01-06 | |
# Desc : Backup sites to local directory and put in tarball | |
# remove older backups | |
find ~/backups/* -mtime +30 -exec rm {} \; | |
BDIR=~/backups/ |
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
' Author: Michael Stevenson | |
' Desc : Attempts to clean files infected by Bluetooth.exe. Depends on list from FindInfected.vbs | |
Set objFSO = CreateObject("Scripting.FileSystemObject") | |
Set objShell = CreateObject("WScript.Shell") | |
Dim oldName | |
Dim newName | |
Dim oldPath |
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
' Author: Michael Stevenson | |
' Desc : Uses a list of files, and attempts to find files infected with Bluetooth.exe | |
Set objFSO = CreateObject("Scripting.FileSystemObject") | |
Dim oldName | |
Set secondShell = WScript.CreateObject("WScript.Shell") | |
Set objShell = WScript.CreateObject("WScript.Shell") | |
Set logFile = objFSO.CreateTextFile("U:\VirusCleanup\infected_files.txt", True) | |
Set checkedFiles = objFSO.CreateTextFile("U:\VirusCleanup\checked_files.txt", True) |
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
############################################################################# | |
# | |
# Desc: Helper file to be dotted/imported in so that some things | |
# can be done a little bit easier | |
# | |
# Date: 2014-11-04 - M. Stevenson - Initial Version | |
# Added HC-EnableRDP, HC-EnterSession | |
# | |
############################################################################# |
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
# | |
# Author: M. Stevenson | |
# Desc : Enable RDP on a remote computer, given the hostname or IP | |
# Date : 2014-11-04 - M. Stevenson - Initial Version | |
# | |
Function Enable-RDP { | |
[CmdletBinding()] | |
param( | |
[parameter(Mandatory=$true,ValueFromPipeline=$true,HelpMessage="Enter the name/IP of the computer to enable RDP on")] |
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
# | |
# Date : 2014-10-31 M. Stevenson - Initial Version | |
# Desc : Get users that were probably locked out by a | |
# bad password | |
# | |
Get-ADUser -Filter { LockoutTime -gt 0 -and BadPwdCount -ge 5 } -Properties * | sort lockouttime -descending | ForEach-Object { | |
$lockouttime = [DateTime]::FromFileTimeUtc($_.lockoutTime) | |
$bptime = [DateTime]::FromFileTimeUtc($_.badPasswordTime) |
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
if (typeof String.prototype.startsWith != 'function') { | |
String.prototype.startsWith = function (str) { | |
return this.indexOf(str) == 0; | |
}; | |
} | |
function Message (data) { | |
this.data = data; | |
this.fieldsep = data.substring(3,4); | |
this.compsep = data.substring(4,5); |
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
/* | |
Author: Michael Stevenson | |
Date : 2014/09/03 | |
Desc : Receive HL7 message from an MLP tcp interface on a specific port and ip. | |
Saves message to folder on PC. Constructs and sends ACK back to interface | |
*/ | |
var net = require('net'); | |
var fs = require('fs'); |