Quad Browser V. 1.9 (I think) {Major Update}

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Joey2bost
Posts: 4
Joined: 27 Mar 2016 13:55

Quad Browser V. 1.9 (I think) {Major Update}

#1 Post by Joey2bost » 30 Apr 2016 13:59

Code: Select all

@echo off
cls
title Quad Browser
goto terms

:terms
echo Using this batch browser means you accept the terms like
echo the following.
echo No searching for anything illegal
echo No Changing the code
echo No reposting saying it is yours
echo.
echo Do you accept the terms?
echo 1)Yes
echo 2)No
set /p pop=

if %pop% == 1 goto menu
if %pop% == 2 goto sorry
goto terms

:menu
< info.sav (
  set /p user=
  set /p pass= 
  set /p email= 
)
cls
cls
echo ///////Quad Browser///////
echo 1)Login
echo 2)Register
echo 3)Search w/ no login
echo 4)Recover
echo 5)Exit
echo 6)Uninstall Browser
set /p joj=

if %joj% == 1 goto login
if %joj% == 2 goto reg_check
if %joj% == 3 goto search_no
if %joj% == 4 goto recover
if %joj% == 5 exit
if %joj% == 6 goto uni
goto menu

:reg_check
cls
if EXIST info.sav goto reg_sure
else goto reg
goto eg_check

:reg_sure
cls
echo We have found another user account
echo making a new account erases all others
echo.
echo 1)Yes    2)No
set /p l=

if %l% == 1 goto reg
if %l% == 2 goto menu
goto reg_sure

:uni
cls
echo Do you want to uninstall the browser?
echo this will remove all files that are
echo used with the browser like login and
echo the browser itself.
echo.
echo 1)Uninstall   2)Back
set /p k=

if %k% == 1 goto in
if %k% == 2 goto menu
goto uni

:in
cls
echo We are uninstalling...
echo Please do not turn off
echo.
ping localhost -n 3 >nul
cls
if EXIST info.sav del info.sav
ping localhost -n 1 >nul
del %0

:recover
cls
< info.sav (
  set /p user=
  set /p pass= 
  set /p email= 
)
echo We need to know if it's you
echo Please enter all correct info
echo.
set /p usertry=Username:
set /p emailtry=Email:
cls
goto recover_try

:recover_try
cls
if %usertry% == %user% goto rec_2
else
(goto fail2)

:rec_2
cls
if %emailtry% == %email% goto recovered
else
(goto fail2)

:recovered
cls
echo Here is your info
echo.
echo. %user%
echo. %pass%
echo. %email%
pause
cls
goto menu

:fail2
cls
echo You have entered the wrong information
pause
cls
goto menu

:login
cls
< info.sav (
  set /p user=
  set /p pass= 
  set /p email= 
  set /p book1=
)
cls
echo Please enter your info needed
echo.
set /p use=Username:
set /p pas=Password:
set /p ema=Email:
cls
goto check

:check
cls
if %use% == %user% goto check2
else
(goto failed)
goto check

:check2
cls
if %pas% == %pass% goto check3
else
(goto failed)
goto check2

:check3
cls
if %ema% == %email% goto logged_in
else
(goto failed)
goto check3

:logged_in
cls
echo You are now logged in!
pause
cls
goto main

:failed
cls
echo It seems that you entered the wrong information
echo Pleae retry again once you remeber
pause
cls
goto menu

:search_no
cls
echo You can only search keywords instead of links without registering
echo We reccomend that you do
echo.
set /p lookup=Search:
cls
explorer "http://www.google.com/search?q=%lookup%
cls
goto menu

:reg
cls
echo Sign up for a membership for FREE
echo.
set /p user=Username:
set /p pass=Password:
set /p email=Email:

(
 echo %user%
 echo %pass%
 echo %email%
) > info.sav

cls
echo.
echo Thank you, we will now send you to the main page
pause
cls
goto main

:main
cls
echo /////Main/////
echo Welcome %user%
echo.
echo 1)Search
echo 2)Help
echo 3)Notifaction
echo 4)Batch Dictionary
echo 5)Update
echo 6)Settings
echo 7)Logout
echo 8)Support
set /p pop=

if %pop% == 1 goto search
if %pop% == 2 goto help_main
if %pop% == 3 goto notif
if %pop% == 4 goto diction
if %pop% == 5 goto update
if %pop% == 6 goto settings
if %pop% == 7 goto menu
if %pop% == 8 goto support
goto main

:support
cls
echo Finding errors with your update?
echo Please leave any and all errors or bugs
echo to this email: anonymousgamer752@gmail
echo.
echo We are sure to get back to you!
pause
cls
goto main

:diction
cls
echo Please enetr the number of the word you
echo want to learn what it codes and does.
echo.
echo Batch Code Dictionary
echo.
echo Whelp there was a error somewhere, Please wait for further updates
pause
cls
goto main

:settings
cls
echo What would you like to happen?
echo.
echo 1)Text color
echo 2)New username
echo 3)Clear account
echo 4)Back
set /p ll=

if %ll% == 1 goto new_text
if %ll% == 2 goto new_name
if %11% == 3 goto clear
if %ll% == 4 goto main
goto settings

:clear
cls
echo This will permitly erase everything on your account!
echo Continue?
echo.
echo 1)Yes   2)No
set /p lop=

if %lop% == 1 goto cleared
if %lop% == 2 goto main
goto clear

:cleared
cls
del info.sav
cls
echo Cleared!
pause
cls
goto menu

:new_text
cls
echo Pick a color
echo.
echo 1)Green
echo 2)White
echo 3)blue
echo 4)Back
set /p nun=

if %nun% == 1 color 0a
if %nun% == 2 color 7a
if %nun% == 3 color 1a
if %nun% == 4 goto main
goto new_text

:new_user
cls
echo Please enter a new name
echo.
set /p user=
echo Set username to %user%
pause
(
  echo. %user%
  echo. %pass%
  echo. %email%
) > info.sav

cls
goto main

:update
cls
echo We are taking you to the page you got this code from so you
echo can repost the code again. Please make sure it is a diffrent
echo version, newer versions will have bug fixes and possibly more
echo features.
pause
explorer "http://ss64.org/viewtopic.php?pid=8975#p8975"
cls
goto main

:search
cls
echo Please choose one:
echo.
echo 1)Search Keywords
echo 2)Search Links
echo 3)Bookmarks
echo 4)Back
set /p mo=

if %mo% == 1 goto search_key
if %mo% == 2 goto search_link
if %mo% == 3 goto book_all
if %mo% == 4 goto main
goto search

:book_all
cls
echo Select one
echo.
echo 1)Book Mark
echo 2)Visit Book Mark
echo 3)Back
set /p lp=

if %lp% == 1 goto book
if %lp% == 2 goto book_vist
if %lp% == 3 goto main
goto book_all

:book_visit
cls
explorer "%book1%"
goto main

:book
cls
echo Please enter only links
echo.
set /p book1=
echo Saved!
(
  echo. %user%
  echo. %pass%
  echo. %email%
  echo. %book1%
) > info.sav
pause
cls
goto book_all

:search_key
cls
echo Please enter a keyword
echo.
set /p search=
explorer "http://www.google.com/search?q=%search%"
cls
goto main

:search_link
cls
echo Please enter a link
echo.
set /p link=
explorer "http://%link%"
cls
goto main

:notif
cls
echo Well sorry, there is no notification function yet
echo We are working on it...
pause
cls
goto main

:help_main
cls
echo Please select one of the topics
echo.
echo 1)Searching
echo 2)Bookmarks
echo 3)Acsess Denied Problem
echo.
echo 4)Back
set /p kop=

if %kop% == 1 goto search_help
if %kop% == 2 goto book_help
if %kop% == 3 goto ADP
if %kop% == 4 goto main
goto help_main

:book_help
cls
echo Q:It doesn't save my bookmark when i leave
echo A:Well this could be a problem on either our side
echo or on your side, Your side is you could not have
echo ran as admin which is somewhat needed just incase
echo.
echo Q:It wont go to the right website i wanted
echo A:Try entering the website again and try
pause
cls
goto help_main

:ADP
cls
echo Q:Why does it say "Acsess Denied"
echo A:This section is built for it!
echo The only awnser we could find is we either messed
echo up the code or bigger thing is that you need
echo to run as admin which yes we say this alot
pause
cls
goto help_main

:search_help
cls
echo Q:Why does it crash when i enter or search anything?
echo A:Well it could be that you did not run as admin
echo We reccommend running as admin before opening
echo.
echo Q:Why does it send me to a random place when i search
echo A:Well what we see is that we on our side have messed up
echo Just wait for our next update which may have the fix
echo.
pause
cls
goto help_main

:sorry
cls
echo We are sorry but you are not allowed to use
echo this browser without accepting the terms
pause
cls
exit

sambul35
Posts: 192
Joined: 18 Jan 2012 10:13

Re: Quad Browser V. 1.9 (I think) {Major Update}

#2 Post by sambul35 » 30 Apr 2016 16:19

This seems to be continuation of that. :D

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Quad Browser V. 1.9 (I think) {Major Update}

#3 Post by ShadowThief » 30 Apr 2016 23:33

Would you like notes? Because I have notes.

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Quad Browser V. 1.9 (I think) {Major Update}

#4 Post by penpen » 01 May 2016 02:56

You should notice that your usage of version numbers is just wrong; version number format:
<version number><.subversion number>[.<build number>]

A revision (bugfix, hotfix, ...) increases the build number leaving version and subversion numbers fixed.
A minor upgrade increases the subversion and build number leaving the version number fixed.
A major upgrade increases the version and build number and sets the subversion number to zero.


I also recommend what i've written in my last post.


penpen

Joey2bost
Posts: 4
Joined: 27 Mar 2016 13:55

Re: Quad Browser V. 1.9 (I think) {Major Update}

#5 Post by Joey2bost » 01 May 2016 15:38

ShadowThief wrote:Would you like notes? Because I have notes.

Notes on what? Please tell me what these notes are

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Quad Browser V. 1.9 (I think) {Major Update}

#6 Post by ShadowThief » 02 May 2016 02:11

A good chunk of notes are the same from the last version, but they're worth repeating. If I don't explicitly mention one of the labels, assume the General Notes still apply to it.

General Notes
  • You don't need a goto if the next line is the label you are going to.
  • The terms on both sides of the equals in an if statement should be wrapped in quotes. For example, if %pop% == 1 goto menu should be if "%pop%"=="1" goto menu
  • When you use else, you need to use parentheses and else needs to be on the same line as the first closing parenthesis and the last opening parenthesis, like this:

    Code: Select all

    if "%variable%"=="value" (
        echo Variable is equal to value.
    ) else (
        echo Variable is not equal to value.
    )
  • For menus, use the choice command instead of set /p
  • There are grammar and spelling mistakes throughout your code.

:terms
  • From a grammatical point of view, the phrase "Terms like the following" means that the things listed after that are technically not part of the terms. The correct phrasing is "By using this batch browser, you accept the following terms:"

:menu
  • There is no need to cls twice in a row.

:reg_check
  • You will never go to eg_check, mostly because that label doesn't exist, but also because you go to :reg_sure if info.sav exists and :reg if it doesn't. (Sort of - see my previous note about using else correctly.)

:in
  • The pings don't really add any value except to delay the execution of the code.

:recover
  • If the user successfully recovers their password and does not exit the script, they can re-recover their password by pressing enter twice.

:recover_try and :rec_2
  • You can merge these two by using a nested if statement, like this:

    Code: Select all

    if "%usertry%"=="%user%" (
        if "%emailtry%"=="%email%" (
            goto recovered
       )
    )
    goto fail2

:login
  • The last cls is unnecessary, as both :failed and :logged_in start with a cls
  • If the user logs in correctly and then logs out but does not stop the script, you can log in again by simply pressing enter three times because the variables are still stored.

:check, :check2, and :check3
  • Again, you can use nested if statements instead of multiple labels
  • The goto lines after (goto failed) will never be reached, and would create infinite loops if they did, anyway.

:search_no
  • You are missing a " at the end of your explorer command.
  • Your second cls is unnecessary, since explorer does not display anything on the command prompt.

:reg
  • Passwords should not be entered in plain text.
  • Passwords should not be stored in plain text.
  • Passwords should not be stored in plain text in a visible file in the same directory as the script.

:settings
  • Choosing 2 goes to :new_name, but the label that lets you change your username is :new_user
  • You are checking to see if %11% (not that that's an eleven and not an LL) is equal to 3

:cleared
  • There is no need to cls before deleting info.sav.

:new_text
  • Selecting 2 or 3 changes the background color instead of the text color

:update
  • The best way to check if they have the most recent version of the script is to include the version number in the code itself instead of forcing the user to go line by line to see if things are different.

:book_all
  • Bookmark is one word.
  • If lp is 2, you have the script go to :book_vist instead of :book_visit

:book
  • The . in your echo. statements is causing an extra space to be added to the beginning of the contents of info.sav, which will break your logging-in process when you add quotes to fix your if statements.

:search_link
  • If the user starts the link they enter with http:// or https://, the link breaks. Do not prepend http:// to the link the user enters.

Post Reply