Shop OBEX P1 Docs P2 Docs Learn Events
Password Protected Boe - Bot Program — Parallax Forums

Password Protected Boe - Bot Program

MacRulesWorldMacRulesWorld Posts: 4
edited 2008-12-17 19:13 in BASIC Stamp
Hey,

Is there anyway with the DEBUGIN command or something to get a password protected Boe - Bot program so that the program will not run until you have entered a password in Debug Termainal

P.S. It would also be appreciated if there was an explanation on how to change words into **** type symbols if that can be acheived so others cannot see password

Comments

  • SRLMSRLM Posts: 5,045
    edited 2008-12-17 02:36
    You could write a program that checks the debuged password, and if it matches it does whatever you need it to. Take a look at the RFID reader sample code for something similar.

    And no, as far as I know there is no way to hide what you're typing into the debug terminal. Afterall, you're supposed to see it to debug.
  • tpw_mantpw_man Posts: 276
    edited 2008-12-17 02:41
    To make asterisks appear, you can change your serial terminal's echoing function off, and in your code, when a password character is received, send out an asterisk. You can also just not display the password or asterisks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I am 1011, so be surprised!


    Advertisement sponsored by dfletch:
    Come and join us on the Propeller IRC channel for fast and easy help!
    Channel: #propeller
    Server: irc.freenode.net or freenode.net
    If you don't want to bother installing an IRC client, use Mibbit. www.mibbit.com
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2008-12-17 02:54
    Because the BASIC Stamp is hardwired to echo everything it receives, there is no way to intercept and convert received characters to asterisks before they are echoed in plaintext.

    -Phil
  • MacRulesWorldMacRulesWorld Posts: 4
    edited 2008-12-17 03:04
    can anyone give a line of code such as SRLM described in response? tried but no victory when i wrote my own code, couldn't figure it out
  • FranklinFranklin Posts: 4,747
    edited 2008-12-17 04:51
    Show us what you tried and maybe we can find the problem.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • SRLMSRLM Posts: 5,045
    edited 2008-12-17 05:02
    Psuedo code:

    index var
    char var
    password var [noparse]/noparse

    index = 0

    DO


    if var[noparse][[/noparse]index] = debuginChar
    {
    index ++
    }
    else
    {
    index = 0
    }

    Loop until end charecter is met
    debug cls


    I haven't really worked with strings (or char arrays) on the BS2 before, so this is a work around to use the variable section of the program to store your password.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-12-17 17:06
    Perhaps if you were using something like the LCD AppMod you could use a sequence of keypress combinations and get visual feedback on the LCD.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2008-12-17 19:13
    To do this in· PBasic debug you need to prepare the debug·screen which you can find in the IDE under EDIT....PREFERENCES...DEBUG APPEARANCE. Make the Transmitter background color the same as the Transmitter font color, this prevents the typed text from being visible. When the debug screen opens check the box that says Echo Off, this prevents the characters from being echoed back to the screen. Next use code similar to the following, the last line is there for test/verification purposes.

    x VAR Byte(3)
    DEBUGIN· x(0)
    DEBUG "*"
    DEBUGIN· x(1)
    DEBUG "*"
    DEBUGIN· x(2)
    DEBUG "*" ,CR
    DEBUG STR· x \3

    Jeff T.
Sign In or Register to comment.