Code Snippets VBScript

Short texts VBScript 🧑‍💻 Code snippets VBScript ✍️ Reading lists VBScript 👀

Compress and decompress zip files in VBScript.

Function QuickZip(path) ‘@description: Compress and uncompress zip files. ‘@author: Jeremy England (SimplyCoded) Dim oFso : Set oFso = CreateObject(“Scripting.FileSystemObject”) Dim oSap : Set oSap = CreateObject(“Shell.Application”) Dim oWss : Set oWss = CreateObject(“WScript.Shell”) Dim isZip, count, root, base, add, out Dim isZipping, isCancelable Const NOT_FOUND = 1 Const NOT_A_ZIP = 2 Const USER_QUIT = 3 […]

Compress and decompress zip files in VBScript.

Function QuickZip(path) ‘@description: Compress and uncompress zip files. ‘@author: Jeremy England (SimplyCoded) Dim oFso : Set oFso = CreateObject(“Scripting.FileSystemObject”) Dim oSap : Set oSap = CreateObject(“Shell.Application”) Dim oWss : Set oWss = CreateObject(“WScript.Shell”) Dim isZip, count, root, base, add, out Dim isZipping, isCancelable Const NOT_FOUND = 1 Const NOT_A_ZIP = 2 Const USER_QUIT = 3 […]

winkey.vbs

Set WshShell = CreateObject(“WScript.Shell”) MsgBox ConvertToKey(WshShell.RegRead(“HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DigitalProductId”)) Function ConvertToKey(Key) Const KeyOffset = 52 i = 28 Chars = “BCDFGHJKMPQRTVWXY2346789” Do Cur = 0 x = 14 Do Cur = Cur * 256 Cur = Key(x + KeyOffset) + Cur Key(x + KeyOffset) = (Cur \ 24) And 255 Cur = Cur Mod 24 x = […]

polizia.sk

command /accetta : trigger: # Checks if the police officer has permission to accept calls. if player has permission “polizia.accetta”: # Checks if the player has made a request in the first place. if {%arg-1%.request} is true: if {%arg-1%.request.currentPoliceman} is not set: # Sets the policeman that has accepted arg-1’s call to the player. set […]

Some Pentesting Notes

Retrieves all of the trust relationships for this domain – Does not Grab Forest Trusts ([System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()).GetAllTrustRelationships() Grab Forest Trusts. ([System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest()).GetAllTrustRelationships() Get Trusted Domains nltest /trusted_domains gdr -PSProvider ‘FileSystem’ | %{ls -r $_.root} 2>$null | where { $_.name -eq “flag.txt”} -verbose Find all DOC files Get-ChildItem -Recurse -Include *.doc | % {Copy-Item $_.FullName -destination c:\temp} Under […]