Follow us on Twitter!
Understanding is the answer, hatred is the problem, and hackers are the slaves abused and destroyed in the process of peace online - Deshouleres
Wednesday, April 23, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 22
Guests Online: 20
Members Online: 2

Registered Members: 82885
Newest Member: ConiBE
Latest Articles
View Thread

HellBound Hackers | Computer General | OS specific

Author

simple batch file with a fair few uses


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-07-06 09:37
this is a batch file for running on NT
it speaks for its self
any problems read the remarks in the file

Code
:menu
Rem echos off
echo off
rem clear
cls
rem building menus
echo +------------------------------+
echo ¦ sam hacking project     ¦
echo ¦------------------------------¦
echo ¦ Tch0rts batch file n00b ¦
echo +------------------------------+
echo.
echo.
echo.
echo +------------------------------+
echo ¦Options¦
echo ¦------------------------------¦
echo ¦1. Scandisk ¦
echo ¦2. defrag ¦
echo ¦3. Drive contents ¦
echo ¦4. copy sams to floppy ¦
echo ¦5. format C drive :
echo ¦6. shutdown system ¦
echo ¦7. exit     ¦
echo.
echo.

CHOICE /n /c:1234567 Please selct the option you require
echo off
rem define error levels

if errorlevel=7 goto end
if errorlevel=6 goto shut
if errorlevel=5 goto format
if errorlevel=4 goto copy
if errorlevel=3 goto list
if errorlevel=2 goto defrag
if errorlevel=1 goto scan

:scan
rem launch scandisk
scan
goto menu

:defrag
rem launch defrag
defrag
goto menu

:list
rem list files
dir c:\*.* /s/p
pause
goto menu

:copy
rem copy sams
copy C:\WINDOWS\system32\config a:\
goto menu

:format
rem format c
format c:\
goto menu

:shut
rem shutdown system
shutdown -s 10

:end
rem end of file








Edited by on 28-07-06 13:44
Author

RE: simple batch file with a fair few uses


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-07-06 10:19
The shutdown line only logs off my computer. Add -s and it should shut down.


Author

RE: simple batch file with a fair few uses

dami3n
Member

Your avatar

Posts: 104
Location: Manchester
Joined: 28.06.05
Rank:
Apprentice
Warn Level: 5
Posted on 28-07-06 10:49
Guess u was right for running on NT only

on my xp comp it comes up with

'CHOICE' is not recognized as an internal or external command,
operable program or batch file.

Ah well Pfft
soulboundsecurity.wordpress.com
Author

RE: simple batch file with a fair few uses


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 28-07-06 13:45
mastergamer wrote:
The shutdown line only logs off my computer. Add -s and it should shut down.

changed thanks for the heads up :happy:


Author

RE: The CHOICE command

Uber0n
Member



Posts: 1963
Location: Sweden‭‮
Joined: 13.06.06
Rank:
Hacker Level 3
Posted on 28-07-06 18:54
Well the CHOICE command was integrated in all Windows versions until someone at M$ decided to remove it in XP...:xx: Don't know why, it was the easiest way to create a simple batch menu.... But it's easy enough to write a C++ program which works in the same way Grin.

Btw, I've written a C++ program which works almost in the same way. 1. It takes your input (Like a number, a letter, a word etc)
2. It creates a temp batch file which loads %VARI% with the value you entered
3. It executes the batch file, loading the variable (now you can view it in DOS by typing SET)
4. It deletes the batch file.

So, for using it just do something like this in the batch file:

REM Get variable
ECHO Enter your choice
ECHO.
CALL inputter.exe
ECHO You entered %VARI%

You can also do something like

CALL inputter.exe
IF .%VARI%==.1 GOTO CONTINUE
IF .%VARI%==.2 GOTO END

or

CALL inputter.exe
IF NOT .%VARI%==.poo ECHO You didn't enter the word poo!

If you want source (if you don't want to write your own, of course Pfft) feel free to PM me.

Peace B)


img230.imageshack.us/img230/724/uber0nsig3hj6.gif
http://uber0n.web. . .
Nope http://uber0n.webs.com/