Batch

The ubiquitous operating system, discussion of its (many) flaws, and how to mitigate the risks of those flaws

Re: Batch

Post by beagle on Fri Aug 01, 2008 11:18 am
([msg=8613]see Re: Batch[/msg])

Here's a pointless application I made that lets you select a website to visit:

Code: Select all
@echo off
color 2f
title Site Selector by Beagle
set google=1
set yahoo=2
set hotmail=3
set facebook=4
set myspace=5
set cnn=6
set weather=7
set wikihow=8
set instructables=9
set youtube=10
set answers=11
set wikipedia=12
set exit=e
set back=b
:top
echo ***************************************************************
echo.
echo Site Selector
echo.
echo ***************************************************************
echo.
echo Key: 1 Google - Search Engine
echo 2 Hotmail - Mail Server
echo 3 Yahoo - Search Engine/Mail Server
echo 4 Facebook - Social Networking
echo 5 Myspace - Social Networking
echo 6 CNN - News
echo 7 Weather - Weather
echo 8 WikiHow - A How-To Website
echo 9 Instructables - A How-To Webiste
echo 10 YouTube - Online Videos
echo 11 Answers - Online Encyclopedia
echo 12 Wikipedia - Online Encyclopedia
echo.
echo e Exit
echo.
echo ***************************************************************
echo Enter the number of the website which you would like to go to:
echo.
set /p udefine=
echo.
echo ***************************************************************
if %udefine%==1 start http://www.google.com
if %udefine%==2 start http://www.hotmail.com
if %udefine%==3 start http://www.yahoo.com
if %udefine%==4 start http://www.facebook.com
if %udefine%==5 start http://www.myspace.com
if %udefine%==6 start http://www.cnn.com
if %udefine%==7 start http://www.weather.com
if %udefine%==7 start http://www.wikihow.com
if %udefine%==9 start http://www.instructables.com
if %udefine%==10 start http://www.youtube.com
if %udefine%==11 start http://www.answers.com
if %udefine%==12 start http://www.wikipedia.com
if %udefine%==e goto exit

cls
echo ***************************************************************
echo.
echo Thank You for using Site Selector by Beagle
echo.
echo ***************************************************************
echo Type e to exit or b to go back and select another site.
echo.
set /p udefine=
echo.
echo ***************************************************************
if %udefine%==b goto top
if %udefine%==e goto exit
:exit
cls
echo ***************************************************************
echo.
echo Thank You for using Site Selector by Beagle
echo.
echo ***************************************************************
pause
exit
011000100110010101100001011001110110110001100101
beagle
Poster
Poster
 
Posts: 244
Joined: Wed Jul 02, 2008 2:37 pm
Location: Chico, CA
Blog: View Blog (0)


Re: Batch

Post by mutants_r_us_guild on Fri Aug 01, 2008 12:03 pm
([msg=8614]see Re: Batch[/msg])

YES! I beat Prog1!!! My program worked! I just had to make a greasemonkey script to output the scrambled words into a commanline-friendly format. :)
Image
Image
Image
User avatar
mutants_r_us_guild
Poster
Poster
 
Posts: 246
Joined: Fri May 30, 2008 7:56 pm
Blog: View Blog (0)


Re: Batch

Post by manonst on Fri Aug 01, 2008 12:35 pm
([msg=8617]see Re: Batch[/msg])

My prog1 solution in 45 lines of batch. I originally did it in perl, but decided to do it in batch just to see if i could. Simply put wordlist.txt in the current directory and scrambled.txt should contain a list of the scambled words, one on each line. The first time you run it, it will generate two files. wordlist_numbered.txt will be a copy of the wordlist with each line numbered. wordlist_sorted.txt will also be created which will be the wordlist where each word is alphabetically sorted. This will take a while to run. The next time you run it, it should spit out the answer in 2-3 seconds.

Try and beat my batch kung-fu!


edit: Impressive, but no spoilers, please.
manonst
New User
New User
 
Posts: 1
Joined: Fri Jul 18, 2008 4:08 pm
Blog: View Blog (0)


Re: Batch

Post by anonHacker on Sun Aug 03, 2008 8:54 pm
([msg=8796]see Re: Batch[/msg])

Nasty stuff manonst, but I'm afraid I have you beat with my 22 lines of batch. I included it in my PM, in case the urge to see the hellish innards of my batches seized you. (Actually, this one's relatively easy to follow.)

Amusingly, you use so much structured batch that for a moment I was expecting to see semi-colons. Truth be told, I generally dislike structured batch because it's usually a sign of someone applying Good Habits to The Wrong Language, but your code is actually sensible, so cheers. :)

Also, SAVED and you just posted an answer to Programming 1 which anyone who hasn't finished can now execute to get free points. Might want to edit that post.

Oh hey, mutants_r_us_guild, could you PM me your code? I'm curious about what you scripted. As promised, I'm sending you my code.

EDIT: mutants_r_us_guild, Evidently you included a RAR'd link a few pages back, care to edit that out for heretofore alluded reasons? Your code is quite the beast, tbh. :) Props on solving it with prime numbers. I never thought of doing that.
anonHacker
Experienced User
Experienced User
 
Posts: 76
Joined: Sun Jul 27, 2008 10:51 am
Blog: View Blog (0)


Re: Batch

Post by mutants_r_us_guild on Sun Aug 03, 2008 10:43 pm
([msg=8800]see Re: Batch[/msg])

I'll PM the files to you either tonight or tomorrow. The only finished copy is on my laptop and Im installing Windows updates right now. (upgrading to sp3 instead of sp1 so i can use my new webcam :) ). As soon as I can.. Ill rar up the new bat files and xpi file and upload. The xpi file is a FF extension I made to make the prog1 page display the words in a way that works with my app. (that took some serious JS&DOM skillz lol not really..it was way easier than making the anagram solver :lol: )
Image
Image
Image
User avatar
mutants_r_us_guild
Poster
Poster
 
Posts: 246
Joined: Fri May 30, 2008 7:56 pm
Blog: View Blog (0)


Re: Batch

Post by beagle on Sat Aug 09, 2008 11:49 am
([msg=9178]see Re: Batch[/msg])

Hi again everyone. I'm working on a new game. This one has pretty pictures. Any suggestions on the code so far?
PS: IT'S NOT DONE YET!!

Code: Select all
@echo off
:start
color 0a
echo      *----------------------------------------*
echo      *         *                  *       * :)*
echo      *         *                  *       *   *
echo      *         *                  *           *
echo      ** *****      *              *    *      *
echo      *  *      *          $       *       *   *
echo      *   *     *                  *       *   *
echo      *    *    *                       ****   *
echo      *    *    * *********           *        *
echo      *   *     *         *          **        *
echo      *  *      *         *          **        *
echo      * *             ******      ********     *
echo      **                                       *
echo      *                                        *     
echo      ------------------------------------------
:key
color 0a
echo ***************************************
echo           GOAL OF THE GAME
echo  In this game, you are the dollar sign.You are trying to get to the happy  face. If you run into a wall, you die and have to start over. Good luck!
:commands
echo ***************************************
echo                COMMANDS
echo East-e     South-s
echo West-w     North-n
echo ***************************************
color 0a
set /p a=
if %a%==n  goto 1n
if %a%==e  goto 1e
if %a%==s  goto 1s
if %a%==w  goto 1w
:1n
cls
echo      *----------------------------------------*
echo      *         *           $       *        :)*
echo      *         *                  *       *   *
echo      *                             **         *
echo      *         *                  * * *       *
echo      ** *****      *             *     *      * 
echo      *  *      *                  *      *    *
echo      *   *     *                  *       *   *
echo      *    *    *                       ****   *
echo      *    *    * *********           *        *
echo      *   *     *         *          **        *
echo      *  *      *         *          **        *
echo      * *             ******      ********     *
echo      **                                       *
echo      *                                        *     
echo      ------------------------------------------
echo ***************************************
echo                COMMANDS
echo East-e     South-s
echo West-w     North-n
echo ***************************************
set p a=
011000100110010101100001011001110110110001100101
beagle
Poster
Poster
 
Posts: 244
Joined: Wed Jul 02, 2008 2:37 pm
Location: Chico, CA
Blog: View Blog (0)


Re: Batch

Post by BuTTHeaD on Sun Aug 10, 2008 3:32 am
([msg=9256]see Re: Batch[/msg])

hahahah, i'll make a messenger program soon, i did it last year.
i'm going to have to freshen up on batch commands.
BuTTHeaD
Experienced User
Experienced User
 
Posts: 52
Joined: Tue Jul 15, 2008 4:45 pm
Blog: View Blog (0)


Re: Batch

Post by nosidius on Sun Aug 10, 2008 7:44 pm
([msg=9316]see Re: Batch[/msg])

the wipe out harddrive one, i have several copies of it, and it's useful if you want to keep somen at school and make it so you can delete when u need too............ i found a list of CMD commands, PM me if you want them

my most impressive batch- about 6 lines, but gives me a pass worded admin account on any windows computer (muwahahahahhaha die school teacher files!)

o yes, and i make a lot of others................ and don't let me know ur i.p. address.............. i can (won't unless u REALLY piss me off) shut down ur computer.............
give me knowledge or give me death
User avatar
nosidius
Poster
Poster
 
Posts: 177
Joined: Fri Aug 08, 2008 1:40 pm
Blog: View Blog (0)


Re: Batch

Post by mutants_r_us_guild on Wed Aug 13, 2008 8:48 pm
([msg=9643]see Re: Batch[/msg])

@above post


ummm... how do you think you can shut down a computer... you mean the ping of death? Im sorry to tell you.. but they patched that in later releases of Win95.

However I am curious about the one that gives you admin access on any computer.. how is this done? Is it that AT exploit?
Image
Image
Image
User avatar
mutants_r_us_guild
Poster
Poster
 
Posts: 246
Joined: Fri May 30, 2008 7:56 pm
Blog: View Blog (0)


Re: Batch

Post by anonHacker on Fri Aug 15, 2008 8:51 pm
([msg=9833]see Re: Batch[/msg])

He means using the "shutdown" command set for remote computers.

"Total control" is attained with this command: net use \\Target-IP-or-hostname\IPC$ "" /user:Administrator

Thank Microsoft for making the Safe-Mode-only Administrator account with its default null password perfectly valid for remote logins. Also, pro edition is extra accommodating to remote logins.
anonHacker
Experienced User
Experienced User
 
Posts: 76
Joined: Sun Jul 27, 2008 10:51 am
Blog: View Blog (0)


PreviousNext

Return to Microsoft Windows

Who is online

Users browsing this forum: No registered users and 0 guests