Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Password little program for dos - request


  • Please log in to reply
9 replies to this topic

#1 Barnack

Barnack

  • Members
  • 91 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Italy
  • Local time:09:02 PM

Posted 04 October 2013 - 12:56 PM

This is not a question, it is a request, so if it have to be in another forum, please, redirect me correctly.

 

I'd like to have an "exe", that works as follows:

The user let start the external bootable device with installed the dos system (in my specific case, a Kingston pendrive with dos6.22),

the the dos is loaded, but before write:

 

A:/_

 

it writes:

 

Insert your password here: _

 

after it does as follows:

if password is equal to the content of the file "password.ini", located inside the pendrive, the DOS starts, else, the message is rewrote.

 

As i'm used to write in GameMakerLanguage, and someone told me that it's similar enought to c++, i can tell this by this way:

 

var_getpass = get_string("Insert your password here: ", "")

var_pass = ini_read_string("general","password","default")

if var_getpass = var_pass

(

let dos work

)

 

 

i don't know if is the same with c++ or Others programming languages, however i think that i explained enought.

I'll just explain this:

ini_read_string("general","password","default")

 

it reads an ini inside section "general", key "password", and if it don't exists, it uses "default". So, in this case, if the ini don't exists, the var_pass will be = "default"



BC AdBot (Login to Remove)

 


#2 Billy O'Neal

Billy O'Neal

    Visual C++ STL Maintainer


  • Malware Response Team
  • 12,304 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Redmond, Washington
  • Local time:01:02 PM

Posted 05 October 2013 - 12:35 AM

Hmmm.. this sounds kind of like a homework assignment.

We aren't going to just provide you a ready made solution for something like this. Do you have a specific item you're having difficulty with?

(Where on Earth did you even get a license for DOS 6.22?)

Billy3
Twitter - My statements do not establish the official position of Microsoft Corporation, and are my own personal opinion. (But you already knew that, right?)
Posted Image

#3 Orange Blossom

Orange Blossom

    OBleepin Investigator


  • Moderator
  • 36,854 posts
  • ONLINE
  •  
  • Gender:Not Telling
  • Location:Bloomington, IN
  • Local time:04:02 PM

Posted 09 October 2013 - 09:43 PM

More context for this is here: http://www.bleepingcomputer.com/forums/t/509748/dos-by-usb-problems/

 

~ OB :cherry:


Help us help you. If HelpBot replies, you MUST follow step 1 in its reply so we know you need help.

Orange Blossom

An ounce of prevention is worth a pound of cure

SpywareBlaster, WinPatrol Plus, ESET Smart Security, Malwarebytes' Anti-Malware, NoScript Firefox ext., Norton noscript

#4 Crazy Cat

Crazy Cat

  • Members
  • 808 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Lunatic Asylum
  • Local time:08:02 AM

Posted 11 October 2013 - 05:17 PM

Insert your password here:

CHOICE http://ss64.com/nt/choice.html
http://www.robvanderwoude.com/choice.php

SET. http://ss64.com/nt/set.html
http://www.robvanderwoude.com/ntset.php
 

Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. ― Albert Einstein ― Insanity is doing the same thing, over and over again, but expecting different results.

 

InternetDefenseLeague-footer-badge.png


#5 Crazy Cat

Crazy Cat

  • Members
  • 808 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Lunatic Asylum
  • Local time:08:02 AM

Posted 12 October 2013 - 12:54 AM

If you enter password "123" (without the " ") you get the Admin and starts notepad.exe
If you enter password "abc" (without the " ") you get the Guest and starts mspaint.exe

@echo off
cls
title ENTER PASSWORD
echo.
Set /P _password=Please enter Password: || Set _password=error
If "%_password%"=="error" goto :password_error
If /i "%_password%"=="123" goto :sub_correct
If /i "%_password%"=="abc" goto :sub_guest


goto:eof

:sub_correct
echo.
color 3e
echo Correct Admin password. ACCESSING...
notepad.exe
exit


goto:eof

:sub_guest
echo.
color 9f 
echo Correct Guest password. ACCESSING...
mspaint.exe
exit

goto:eof

:password_error
title, INCORRECT PASSWORD ENTERED.
color 4e
echo.
echo Incorrect password or no password entered.
echo.
pause
exit

 

Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. ― Albert Einstein ― Insanity is doing the same thing, over and over again, but expecting different results.

 

InternetDefenseLeague-footer-badge.png


#6 Barnack

Barnack
  • Topic Starter

  • Members
  • 91 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Italy
  • Local time:09:02 PM

Posted 12 October 2013 - 11:45 AM

sorry for the long absence... thanks a lot Crazy Cat, but how to make it be an autorun that starts immediately after the Dos has been loaded?



#7 Crazy Cat

Crazy Cat

  • Members
  • 808 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Lunatic Asylum
  • Local time:08:02 AM

Posted 12 October 2013 - 04:59 PM

sorry for the long absence... thanks a lot Crazy Cat, but how to make it be an autorun that starts immediately after the Dos has been loaded?

Save the posted password batch as name.bat Where 'name' is whatever name you give it?

Start Windows normally, insert the USB flash drive. The DOS on your USB flash drive will have a Autoexec.bat file. http://ss64.com/nt/syntax-autoexec.html

Edit the Autoexec.bat file with notepad, or right-click on Autoexec.bat and select edit. At the bottom of the Autoexec.bat file, add "CALL name.bat" without the " " and save.

To run a batch file from within another batch file, use the CALL command, otherwise the first script will exit without performing any further commands. http://ss64.com/nt/syntax-run.html

CALL. Call one batch program from another, or call a subroutine. http://ss64.com/nt/call.html
 

Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. ― Albert Einstein ― Insanity is doing the same thing, over and over again, but expecting different results.

 

InternetDefenseLeague-footer-badge.png


#8 Romeo29

Romeo29

    Learning To Bleep


  • BC Advisor
  • 3,194 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:127.0.0.1
  • Local time:03:02 PM

Posted 15 October 2013 - 09:31 AM

What prevents the user to just press Ctrl+C or Ctrl+Break and just start using DOS ?



#9 Crazy Cat

Crazy Cat

  • Members
  • 808 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Lunatic Asylum
  • Local time:08:02 AM

Posted 18 October 2013 - 01:50 AM

What prevents the user to just press Ctrl+C or Ctrl+Break and just start using DOS ?

Running the batch in normal Windows and pressing Ctrl+C or Ctrl+Break invokes the 'INCORRECT PASSWORD ENTERED'. Changing 'pause' with "shutdown /r /f" or "logoff" (without the " ") for more security.

The 'Set /P' may not work with most DOS, so the 'CHOICE' command has to be invoked.
 

Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. ― Albert Einstein ― Insanity is doing the same thing, over and over again, but expecting different results.

 

InternetDefenseLeague-footer-badge.png


#10 Barnack

Barnack
  • Topic Starter

  • Members
  • 91 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Italy
  • Local time:09:02 PM

Posted 19 October 2013 - 02:12 PM

Thanks, i'll try when i'll have some free time, in theese days i've not so much... i'll let you know if it works correctly!






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users