Jump to content

What does this .vbs code do?? HELP!

Benajim117

Long story short, i need to know what this peaces of code does and i cant figure it out myself as i am not familiar with .vbs. Could anyone please help to explain line by line what this code does when executed in command prompt.

cd %tmp% && copy con rickyou.vbs
While true
Dim oPlayer
Set oPlayer = CreateObject("WMPlayer.OCX")
oPlayer.URL = "https://pixelcoding.nl/download/rickroll.mp3"
oPlayer.controls.play
While oPlayer.playState <> 1 ' 1 = Stopped
WScript.Sleep 100
Wend
oPlayer.close
Wend
## CTRL + Z is pressed here apparantly ##

copy con volup.vbs
do
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys(chr(&hAF))
WScript.Sleep 10
loop
## CTRL + Z is pressed here again apparantly ##
start rickyou.vbs && volup.vbs

the part i think i have worked out is the last part. i believe it sets the volume in windows to 100% and then loops continually to keep the volume at 100%. Obviously the last line starts both the scripts. And just for the record I am aware that this is part of a Rick Roll.

 

Thanks in advance for any help given.

Link to comment
Share on other sites

Link to post
Share on other sites

copy con filename.extension  means  copy what's entered in console window to a file - in this case as the batch file contents is sent to the console, that's being copied to file.

The following lines are copied into the filename specified until the "end of file" character is reached, which in DOS and Windows and other operating systems is Ctrl+Z

 

Basically to VBS files are created and then launched both using the start command.

&hAF  is hexadecimal code 0xAF , which is the virtual key code for VK_VOLUME_UP : https://docs.microsoft.com/en-us/windows/desktop/inputdev/virtual-key-codes

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×