rapid7/metasploit-framework — pull request #1203 by h0ng10 (2012-12-23 17:52:33+00:00)
Title: Script shrinking

This pull request contains code to reduce the size of the vbs/aps/apsx scripts by adding a small decoder to the scripts.

Basically the change removes the additional "Chr()" and "&" code from the scripts, so instead of writing:
```
Chr(77)&Chr(90)&Chr(144)&Chr(0)...
```

its only:
```
"4d5a90...."
```

The ASPX code was changed to support base64 encoded payloads.

The following examples show the results when creating a vbs/asp/aspx script with windows/exec as payload to start calc.exe:

Old:
vbs script: 596KB
asp script: 596 KB
aspx script: 289 KB

New:
vbs script: 145KB
asp script: 145KB
aspx script: 100KB

The VBS Script was tested against Windows 7/XP/2003
The ASP/ASPX Scripts were testen against Windows 2003/ASP.NET 1.1 and ASP.NET 2.0

If you have any questions, please let me know.