Skip to content

Instantly share code, notes, and snippets.

View Sh1n0g1's full-sized avatar
🏠
Working from home

Sh1n0g1 Sh1n0g1

🏠
Working from home
View GitHub Profile
@Sh1n0g1
Sh1n0g1 / Test-RegistryName.ps1
Created March 23, 2017 02:49
Test-RegistryName
<#
.EXAMPLE
Test-RegistryName -Path "HKCU:\Software\Sysinternals\Strings" -Name "EulaAccepted"
#>
function Test-RegistryName {
param (
[parameter(Mandatory=$true)][ValidateNotNullOrEmpty()]$Path,
[parameter(Mandatory=$true)][ValidateNotNullOrEmpty()]$Name
)
@Sh1n0g1
Sh1n0g1 / pefile_peid.py
Created January 25, 2017 11:32
Get the matching result of UserDB.txt(PEid) using pefile
import sys
import peutils
import pefile
try:
pe = pefile.PE(sys.argv[1])
signatures = peutils.SignatureDatabase('./sig/userdb.txt')
matches = signatures.match_all(pe, ep_only = True)
if type(matches) is list:
for m in matches:
@Sh1n0g1
Sh1n0g1 / ScreenShot.ps1
Created January 10, 2017 01:27
Take a screenshot by powershell
[Reflection.Assembly]::LoadWithPartialName("System.Drawing")
function screenshot([Drawing.Rectangle]$bounds, $path) {
$bmp = New-Object Drawing.Bitmap $bounds.width, $bounds.height
$graphics = [Drawing.Graphics]::FromImage($bmp)
$graphics.CopyFromScreen($bounds.Location, [Drawing.Point]::Empty, $bounds.size)
$bmp.Save($path)
$graphics.Dispose()
@Sh1n0g1
Sh1n0g1 / ip2geo.py
Created December 21, 2016 01:02
IP2geolocation
#Bulk IP Address 2 Geolocation Using freegeoip.net
#Input: IP Address List
#Output: IP, Latitude, Longitude (CSV Format)
import urllib, json
#Paste your ipaddress list
ips="""