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
find . \( -type d -exec chmod 775 {} \; \) -o \( -type f -exec chmod 664 {} \; \) |
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
@ECHO OFF | |
REM 03/11/19 | |
REM Bohack | |
REM Activate both Microsoft OS and Office | |
ECHO Activating Windows | |
ECHO ------------------------------------ | |
ECHO . | |
C:\WINDOWS\SYSTEM32\CSCRIPT.EXE C:\WINDOWS\SYSTEM32\SLMGR.VBS /ATO | |
ECHO. | |
ECHO Activating Office 2016 |
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
' Jon Buhagiar | |
' 03/29/19 | |
' Parses the log file of machines deleted | |
' Use this command first to remove interleave formatting | |
' TYPE log.txt > log2.txt | |
Option Explicit | |
Dim objFile, strLine, strInFile | |
Dim objFSO, intCNT, strOutput | |
WScript.Echo "Make sure to clean the file with type logxxxx.txt > logyyyy.txt before using this" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<unattend xmlns="urn:schemas-microsoft-com:unattend"> | |
<settings pass="windowsPE"> | |
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<SetupUILanguage> | |
<UILanguage>en-US</UILanguage> | |
</SetupUILanguage> | |
<InputLocale>0409:00000409</InputLocale> | |
<SystemLocale>en-US</SystemLocale> | |
<UILanguage>en-US</UILanguage> |
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
Find who or what owns an SMTP address | |
Get-Recipient -ResultSize unlimited | where {$_.EmailAddresses -like "*buha*"} | FL DisplayName, EmailAddresses |
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
Get-ChildItem y:\ | ForEach-Object { | |
Get-ChildItem y:\$_ | ForEach-Object { | |
$Size = "{0:N2} MB" -f ((Get-ChildItem $_.fullname -Recurse | Measure-Object -Property Length -Sum).Sum / 1MB) | |
$Out = $_.FullName + "," + $_.LastWriteTime + "," + $Size + "," + $_ | |
Write-Host $Out | |
Out-File -Append -InputObject $Out -FilePath .\output.csv -Encoding ascii | |
} | |
} |
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
@ECHO OFF | |
REM Bohack | |
REM 10/8/18 | |
REM Example of trapping missing EXEs | |
ECHO %ERRORLEVEL% | |
ECHO. | |
pslists | |
IF %ERRORLEVEL% EQU 9009 (COLOR 47 && ECHO. && ECHO ERROR! - Please install PStools from Microsoft. && ECHO.) |
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
@ECHO OFF | |
REM Bohack | |
REM 10/08/18 | |
REM Remote GPO Pusher for VDI Problem | |
IF {%1}=={} (ECHO. && ECHO %0 computername && ECHO. && GOTO :END) | |
WMIC /node:%1 process call create "CMD.EXE /C GPUPDATE.EXE" | |
TIMEOUT 15 /NOBREAK | |
PSKILL \\%1 vmware-view | |
IF %ERRORLEVEL% EQU 9009 (COLOR 47 && ECHO. && ECHO ERROR! - Please install PStools from Microsoft. && ECHO.) | |
:END |
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
#!/bin/bash | |
DEPLOYPATH="/var/www/websitea/" | |
filename=$DEPLOYPATH'rwpermissions.txt' | |
echo Start | |
while read p; do | |
echo runner=$DEPLOYPATH$p | |
runner=$DEPLOYPATH${p/$'\r'/} | |
chmod -R 0666 $runner | |
chcon -v -R --type=httpd_sys_rw_content_t $runner |
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
object-group ip address test_hosts | |
host 10.10.1.151 | |
host 10.10.1.181 | |
object-group ip port test_ports | |
eq 5000 | |
ip access-list IT-Acad-VDC | |
permit tcp 172.16.0.0/12 addrgroup test_hosts portgroup test_ports |
NewerOlder