Hack Forums

Full Version: My first batch program!!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
This is my first batch program made in 1 night here it is.

Code:
@ echo off
color 07
title G3NER1C's WinPWNer XP
:Menu
echo --------------------------------------------------------------------------------
echo           Welcomes to G3NER1C's WinPWNer XP!
echo.
echo To Make a new ADMIN user ENTER 1                                   K  
echo.
echo To Change any users password ENTER 2                              
echo.
echo To retrieve network information ENTER 3                            S
echo.
echo To disable internet ENTER 4
echo.
echo To renew internet ENTER 5
echo.
echo To use a remote shutdown ENTER 6                                   3
echo.
echo To use a remote APPLICATION shutdown ENTER 7
echo.
echo To start your own CMD (will close winPWNer XP) ENTER 8             2
echo.
echo To EXIT ENTER 9

echo.
echo --------------------------------------------------------------------------------

echo.
set input=nothing
set /p input= ENTER NUMBER HEAR:
if %input%==1 goto 1
if %input%==2 goto 2
if %input%==3 goto 3
if %input%==4 goto 4
if %input%==5 goto 5
if %input%==6 goto 6
if %input%==7 goto 7
if %input%==8 goto 8
if %input%==9 goto 9

:intro
echo --------------------------------------------------------------------------------
echo           Welcomes to G3NER1C's WinPWNer XP!
echo.
echo To Make a new ADMIN user ENTER 1                                   K  
echo.
echo To Change any users password ENTER 2                              
echo.
echo To retrieve network information ENTER 3                            S
echo.
echo To disable internet ENTER 4
echo.
echo To renew internet ENTER 5
echo.
echo To use a remote shutdown ENTER 6                                   3
echo.
echo To use a remote APPLICATION shutdown ENTER 7
echo.
echo To start your own CMD (will close winPWNer XP) ENTER 8             2
echo.
echo To EXIT ENTER 9

echo.
echo --------------------------------------------------------------------------------
echo.

echo.
set input=nothing
set /p input= ENTER NUMBER HEAR:
if %input%==1 goto 1
if %input%==2 goto 2
if %input%==3 goto 3
if %input%==4 goto 4
if %input%==5 goto 5
if %input%==6 goto 6
if %input%==7 goto 7
if %input%==8 goto 8
if %input%==9 goto 9

:1
echo Type in the username
echo.
set input=nothing
set /p u=USERNAME:
echo Type in the password
echo.
set input=nothing
set /p p=PASSWORD:

net user %u% %p% /add
net localgroup administrators %u% /add
goto intro


:2
net user
set input=nothing
echo Type in a username
set /p u=User:
goto 02

:02
net user %u% *
goto intro


:3
ipconfig /all
goto intro

:4
ipconfig /release *CON*
goto intro

:5
ipconfig /renew
goto intro

:6
echo Please enter a computer name or network adreess for remote shutdown
set input=nothing
echo.
set /p ip=NAME OR IP:
echo.
echo Amount of time delay (0-600 seconds) THIS WILL DISPLAY A WARNING ON TARGETS COMPUTER!!! 0 = no warning
set input=nothing
echo.
set /p t=TIME DELAY:
echo.
echo Would you like to flag it as planned? Unplanned will display error message upon reboot.
echo.
echo yes or no?
set input=nothing
echo.
set /p p=PLANNED:
if %p%==yes goto 60
if %p%==no goto 61

:60
shutdown -s -m \\%ip% -t %t% -d [p]:4:2
go to intro

:61
shutdown -s -m \\%ip% -t %t%
goto intro

:7
echo Please enter a computer name or network adreess for all APPLICATIONS shutdown
set input=nothing
echo.
set /p ip=NAME OR IP:
echo.
echo Amount of time delay (0-600 seconds) THIS WILL DISPLAY A WARNING ON TARGETS COMPUTER!!! 0 = no warning
set input=nothing
echo.
set /p t=TIME DELAY:
echo.
echo Would you like to flag it as planned? Unplanned will display error message upon reboot.
echo.
echo yes or no?
set input=nothing
set /p p=PLANNED:
echo.
if %p%==yes goto 70
if %p%==no goto 71


:70
shutdown -f -m \\%ip% -t %t% -d [p]:4:2
go to intro

:71
shutdown -f -m \\%ip% -t %t%
goto intro


:8
start cmd.exe

:9
echo K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32
echo K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32
echo K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32
echo K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32
echo K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32
echo K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32
echo K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32
echo K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32
echo K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32
echo K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32
echo K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32
echo K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32
echo K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32
echo K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32
echo K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32
echo K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32 K-S32
exit
uuummm.......yeah....uummm... good
Not bad. Although I think you need to be an admin to do some of that...
changing the password this isnt enough: net user %username% *
the correct: net user %username% * newpassword
and this can only be done if the user has admin rights on the pc
This won't work.

If this is your first program well done.
If this is your second program get a life.
If this is your third program... (*Pushes red button*)
Yea OXY has always right
OXY Wrote:This won't work.

If this is your first program well done.
If this is your second program get a life.
If this is your third program... (*Pushes red button*)

haha I agree
I know most of of wont unless your admin. But everything works perfect if you are. it was mostly a test of batch logic for myself. As you see you never have to type a single command. every thing is automated.

and yes net user USERNAME * will change your password word your admin.

I plan to try to get this to work with out admin.

beside it my program
Lo0l this was my first batch:
@echo off
msg * "WHOE"
exit

I still have it
well done for first batch.
Pages: 1 2
Reference URL's