This file contains 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
''' | |
Created on Mar 27, 2011 | |
@author: hassane | |
@original: http://code.activestate.com/recipes/577649-dhcp-query/ | |
@modified: Rusty Myers - June 2016 with much help from @frogor and @bruienne. Thanks! | |
@requirments: python3 | |
@function: returns DHCP offer and BSDP list | |
@notes: BSDP format - https://static.afp548.com/mactips/bootpd.html | |
''' |
This file contains 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 | |
#-------------------------------------------------------------------------------------------------- | |
#-- bigfixPkgCustomzer | |
#-------------------------------------------------------------------------------------------------- | |
# Program : bigfixPkgCustomzer | |
# To Complie : n/a | |
# | |
# Purpose : | |
# | |
# Called By : |
This file contains 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
function ConvertTo-ProcessMitigationOption { | |
[OutputType([String])] | |
param ( | |
[Switch] | |
$DEPEnable, | |
[Switch] | |
$DEPATLThunkEnable, | |
[Switch] |
This file contains 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 perl | |
# Author: philsmd (for hashcat) | |
# License: public domain | |
# Date: January 2017 | |
use strict; | |
use warnings; | |
use Crypt::PBKDF2; |
This file contains 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
function Get-DellFoundationServicesWmiObject { | |
<# | |
.SYNOPSIS | |
Performs a WMI query on a Dell Foundation Services server. | |
Author: Matthew Graeber (@mattifestation) | |
License: BSD 3-Clause | |
.DESCRIPTION |
This file contains 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
<# | |
.SYNOPSIS | |
Detects if the passed Physical Disk Id is a Solid State Disk (SSD) or a | |
spindle disk. Returns true for an SSD and false for anything else. | |
.DESCRIPTION | |
Use Get-PhysicalDisk to get the Physical Disk Ids for the system you wish | |
to test. This script supports values being passed throught the pipeline. | |
The methods used for detecting are by reading the Nominal Media Rotation |
This file contains 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
' Calls WshShell.Exec with c and kills the process tree after the specified timeout t | |
' Returns the created WshScriptExec object | |
Function Exec(c, t) | |
Dim s, e : Set s = CreateObject("WScript.Shell") : Set e = s.Exec(c) | |
Do While e.Status = 0 | |
Call s.Run("waitfor /t 1 OneSecond", 0, True) | |
t = t - 1 | |
If 0 >= t Then | |
Call s.Run("taskkill /t /f /pid " & e.ProcessId, 0, True) | |
Exit Do |
This file contains 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
-- Example list of processes to ignore: {"xGestures"} or {"xGestures", "OtherApp", ...} | |
property processesToIgnore : {} | |
-- Get the size of the Display(s), only useful if there is one display | |
-- otherwise it will grab the total size of both displays | |
tell application "Finder" | |
set _b to bounds of window of desktop | |
set screen_width to item 3 of _b | |
set screen_height to item 4 of _b | |
end tell |
This file contains 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 plistlib | |
import CoreFoundation | |
from Foundation import NSDate, NSMutableArray, NSMutableDictionary | |
# read the current ManagedPlugInPolicies | |
policy = CoreFoundation.CFPreferencesCopyAppValue("ManagedPlugInPolicies", "com.apple.Safari") | |
if policy: | |
# policy is an immutable dict, so we have to make a mutable copy | |
my_policy = NSMutableDictionary.alloc().initWithDictionary_copyItems_(policy, True) |
This file contains 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
#region Step #1 (optional): Salvaging of drivers | |
# I had to manually install a disk and network driver the last time I installed Nano Server. | |
# I saved my previous WIM file and exported the installed drivers using the Dism cmdlets. | |
# These paths are specific to my system. | |
# This was my old Nano Server TP5 image. | |
$NanoTP5ImagePath = 'C:\Users\Matt\Desktop\Temp\NanoTP5Setup\NanoServerBin\NanoServer.wim' | |
$WimTempMountDir = 'C:\Users\Matt\Desktop\TempMountDir' | |
$ExportedDriverDir = 'C:\Users\Matt\Desktop\ExportedDrivers' |
OlderNewer