- Remove extra whitespace
- Trailing whitespace
- Leading whitespace
- Blank lines
- Inline extra spaces
- Remove comments
- Single quote (start of the line)
- Single quote (inline)
- Line splitting (underscore)
$ gem install vbsminSee more install options.
Default usage: CLI
$ vbsmin samples/features.vbsDefault usage: library
Original file size: 344 bytes
Minified file size: 244 bytes
Size saved: 100 bytes
Original file path: samples/features.vbs
Minified file path: samples/features.min.vbs
vm = VBSMin.new
Example of output
So this chunk of script...
' Get WMI Object.
On Error Resume Next
Set objWbemLocator = CreateObject _
if Err.Number Then
REM Display error
WScript.Echo vbCrLf & "Error # " & _
" " & Err.Description
On Error GoTo 0
On Error Resume Next:Set objWbemLocator = CreateObject ("WbemScripting.SWbemLocator"):if Err.Number Then:WScript.Echo vbCrLf & "Error # " & " " & Err.Description:End If:On Error GoTo 0
Homepage / Documentation: https://noraj.github.io/vbsmin/
See why this CLI / tool was required.
- SQLi: when having a SQLi with write permission, you can write some files on the system, but some DBMS like PostgreSQL doesn't support newlines in an insert statement so you have to be able to write a one-line payload
- File size:
- in XSS or Word macro to get the more short and stealthy payload or even to bypass security mechanism based on length or size.
- for performance or file upload limit
Made by Alexandre ZANNI (@noraj)