Jump to content
BrainDen.com - Brain Teasers
  • 0


Guest
 Share

Question

I'm trying to create password protection for my TI-83 calculator's programs because I don't want them to get ripped while I'm unaware. I made the login program all right, but I have trouble fitting it into my math programs.

Here's the code:

ClrHome

While 1

Input P

If P=ABCDE <--lol, lame fake password, but it doesn't matter for now.

Then

Disp "Right"

Stop

Else

Disp "Wrong"

End

End

------

Now I'll just demonstrate with a simple circle area program.

Program: Circle

prgmPassword

Prompt R

πr²->A

Disp A

---------

I just don't know what's going wrong! It should be working.. but it doesn't go on to execute the program after I've given the password. Please help. It would be much appreciated. :)

Edited by HammyHam
Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

ClrHome

While 1

Input P

If P=ABCDE <--lol, lame fake password, but it doesn't matter for now.

Then

Disp "Right"

Stop

Else

Disp "Wrong"

End

End

There we go, all nicely formatted. Now, lets take a look.

As far as I can tell, there are 2 things wrong with your program (highlighted in red):

First: The line If P=ABCDE is attempting to compare the variable P with the variable ABCDE. I'm guessing you want your password to be ABCDE and not store it in a variable. In that case you should replace it with If P="ABCDE"

Second: You have the command Stop inside of the true portion of the password checking If statement. Unless you want to program to exit when they get the password correct, I would put it inside of the false portion of the statement.

Other than that, it looks great ;D

If you need any other help, feel free to PM me.

Link to comment
Share on other sites

  • 0

Are these the corrections(in italics) you wanted me to make? You're right on the second part(and it's working now, thanks to you! Hooray! :D ), but my calculator gave me a "data type error" with the quotation marks around the password.

ClrHome

While 1

Input P

If P=ABCDE

Then

Disp "Right"

Else

Disp "Wrong"

Stop

End

End

The password program looks like what you suggested except for the quotation marks around the password. I also omitted the superfluous End. It is superfluous, right?

Do you have a password protection system for your calculator? Will you show us what it is, please? I started being obsessed with calculator security just yesterday, but I think it's really interesting! I just want to see for the sake of comparison. I saw another guy's program on this site: http://www.devhardware.com/forums/ti-83-84-102/ti-83-programming-88120.html

He wrote:

lbl M

Menu(''LI/LO'',''Log in'',I,''Log out'',O,''Show State'',S,''Exit'',E

lbl I

0-*******>Y

clrhome

lbl 4

Output(8,1,''Pin?'')

0->X

lbl 1

0->A

While A=0

getkey->A

End

A->B

X+1->X

Disp ''*'' //Multiplication sign if you didn't know

if X=1

Then

A->B

End

if X=2

Then

A->C

End

if X=3

Then

A->D

End

if X=4

Then

A->E

Goto 2

End

Goto 1

lbl 2

Pause

Clrhome

if B=73 and C=74 and D=92 and E=73

Then

Goto3

End

Disp ''Wrong Password''

Disp ''Try Again''

Pause

Clrhome

Goto 4

lbl 3

Disp ''Good Boy!''

1->Y

Disp ''Logged In''

Pause

Goto M

lbl O

0->Y

Clrhome

Disp ''Logged Out''

Pause

Goto M

lbl E

Clrhome

Disp ''EXIT''

Pause

Stop

lbl 5

if Y=0

Then

Clrhome

Disp ''State : ''

Output(4,1,''Logged Out'')

Pause

Clrhome

Goto M

End

if Y=0

Then

Clrhome

Disp ''State: ''

Output(4,1,''Logged In'')

Pause

Clrhome

Goto M

for the main program. and then

Now at the begginning of every program that you want to ''password protect'' write the following

Code:

if Y=0

Then

Clrhome

Output(4,1,''Please Log In'')

Pause

Stop

End

if Y=1

Then

Your original Program

End

I think mine's a lot simpler because my longest code is shorter than his shortest code. lol For the circle program I had up earlier, all I need for the password protection to work is

prgmPASSWORD

Prompt R

πr²->A

Disp A

And for a different question, why aren't Brainden spoiler boxes working for me? I click and click but they don't open! Grrgh. I can't add spoilers, either. The box opens to the extreme left of my window and I can't see the boxes to type in. Actually, I can't use ANY of the help buttons except for Bold, Italicize, and Underline. :(

Oh, yes, and thanks again! :)

Edited by HammyHam
Link to comment
Share on other sites

  • 0

One major problem that I'm seeing with this is that anyone that you'd actually need this kind of protection from is just going to be able to look at the code that you're writing for the password protection, since it will be located on the calculator, and see the password. After all, it's written right in the program, and in plaintext.

Edit: I think there's a way to write programs in a language that isn't TI-Basic (Java, maybe?) and then import them to the calculator, but that may be for a different model than the 83.

Edited by SomeGuy
Link to comment
Share on other sites

  • 0

My calculator gave me a "data type error" with the quotation marks around the password.

ClrHome

While 1

Input P

If P=”ABCDE”

Then

Disp "Right"

Else

Disp "Wrong"

Stop

End

End

Hmmm.... maybe your calculator is still considering "ABCDE" to be a grouping of variables, instead of the letters that you want. The simplest solution I can think of to this problem would be to a have an all-numbers password, instead of letters. That way ABCDE would no longer be variables.

Hope this helps!

Link to comment
Share on other sites

  • 0

One major problem that I'm seeing with this is that anyone that you'd actually need this kind of protection from is just going to be able to look at the code that you're writing for the password protection, since it will be located on the calculator, and see the password. After all, it's written right in the program, and in plaintext.

Edit: I think there's a way to write programs in a language that isn't TI-Basic (Java, maybe?) and then import them to the calculator, but that may be for a different model than the 83.

Good point. I wanted to have my calculator prompt for the password as soon as I entered programs, but I don't know how TI-Basic commands can do that. Do you know how to use Java and then put it on the TI-83 or TI-nspire? I have both the TI-83 and TI-nspire, but I can't find the USB cable. Do you have password protection for your calculator?

Link to comment
Share on other sites

  • 0

Good point. I wanted to have my calculator prompt for the password as soon as I entered programs, but I don't know how TI-Basic commands can do that. Do you know how to use Java and then put it on the TI-83 or TI-nspire? I have both the TI-83 and TI-nspire, but I can't find the USB cable. Do you have password protection for your calculator?

Well, I haven't messed around with a TI-83 since high school. My job isn't quite that math intensive. However, one thing that I DID take advantage of was the fact that if you were to, say, turn off your calculator while a program was running, then the program would remain running when you turned the calculator back on. So, you could cause the the calculator to simply loop until the proper password was provided. This way, you password protected the entire calculator. You just needed to remember to run the program whenever you were not using the calculator. (Also, this failed at the physical level. If you pull the batteries out of the calculator, then when you turn the calculator back on the program wouldn't be running).

Link to comment
Share on other sites

  • 0

Hmmm.... maybe your calculator is still considering "ABCDE" to be a grouping of variables, instead of the letters that you want. The simplest solution I can think of to this problem would be to a have an all-numbers password, instead of letters. That way ABCDE would no longer be variables.

Hope this helps!

Nope. I set "12345" as the all-numeric password and it still gives me a data type error.

Link to comment
Share on other sites

  • 0

Well, I haven't messed around with a TI-83 since high school. My job isn't quite that math intensive. However, one thing that I DID take advantage of was the fact that if you were to, say, turn off your calculator while a program was running, then the program would remain running when you turned the calculator back on. So, you could cause the the calculator to simply loop until the proper password was provided. This way, you password protected the entire calculator. You just needed to remember to run the program whenever you were not using the calculator. (Also, this failed at the physical level. If you pull the batteries out of the calculator, then when you turn the calculator back on the program wouldn't be running).

But if I made the calculator loop, someone could do second + quit, turn calculator on and off, and do what you mentioned. Then they'd go over to programs, edit, and use trial-and-error to find the right one(though it'd take them a whole week of Sundays! hehe if they don't pay attention to the start of each program that's protection-worthy.. that'd have prgm***** whatever name I choose) and copy down the password, and use it to do whatever they want. Or they could delete that part completely. :(

Anyways, I did it partly for fun and to keep my brain from rotting during the summer, but when you were in high school, did any teachers/invigilators/proctors try to pry into your calculator? I'm scared of that... none have tried it yet, but I don't like teachers seeing my stuff.

Link to comment
Share on other sites

  • 0

I had nothing worth hiding from my teachers. High school is not worth cheating at, and that's what the teachers would care about. Also, there's a way around 2nd + quit, but I can't remember it. Anyways, password protecting a calculator is not covered by TI's intended uses for it, so it's understandably not an easy thing to do.

Link to comment
Share on other sites

  • 0

I had nothing worth hiding from my teachers. High school is not worth cheating at, and that's what the teachers would care about. Also, there's a way around 2nd + quit, but I can't remember it. Anyways, password protecting a calculator is not covered by TI's intended uses for it, so it's understandably not an easy thing to do.

Lol, I don't cheat. Math is easy anyways! I wouldn't even DARE to have my calculator out in non-math related subjects. I just don't want to share my code for other things like making bouncing text, cramers rule, etc. because I put time and effort into my programs since I don't have a USB cable anymore and can't download stuff off the official site, etc. But thanks for saying I cheat. :)

Link to comment
Share on other sites

  • 0

(1) Cramer's rule is already on your calculator :P [2nd] [x-1] accesses the "MATRIX" editor, where you can define and create matrices. Pan over one to the MATH submenu on the MATRIX editor and option 1 is "det(", which is used to find the determinant of the matrix that's inputted to it. Just letting you know ;D

(2) It's possible to write calculator code in asm, or assembly. This is machine language that's much lower-lever, and a LOT faster. Tutorials and guides here. It's what MirageOS and Ion and the other gaming shells use. The asm gets encrypted and compressed, which is why you can't open it in the normal TI-BASIC program editor. It has to be done from a computer. In this way, your programs can (a) become faster and (b) become locked to outsiders. Also, MirageOS has a password protection system so if you want, people won't even be able to use your assembly programs if you don't want them to

edit ~ as for 2nd+quit, a program caught in an infinite loop ignores this (depending on the calculator version I think) but you can still terminate the loop with the "ON" button

Edited by unreality
Link to comment
Share on other sites

  • 0

(1) Cramer's rule is already on your calculator :P [2nd] [x-1] accesses the "MATRIX" editor, where you can define and create matrices. Pan over one to the MATH submenu on the MATRIX editor and option 1 is "det(", which is used to find the determinant of the matrix that's inputted to it. Just letting you know ;D

(2) It's possible to write calculator code in asm, or assembly. This is machine language that's much lower-lever, and a LOT faster. Tutorials and guides here. It's what MirageOS and Ion and the other gaming shells use. The asm gets encrypted and compressed, which is why you can't open it in the normal TI-BASIC program editor. It has to be done from a computer. In this way, your programs can (a) become faster and (b) become locked to outsiders. Also, MirageOS has a password protection system so if you want, people won't even be able to use your assembly programs if you don't want them to

[edit - typo]

1. I'm aware of that, but it's too slow for me so I made it faster. On my program, all I have to do is give the values of A,B,E,C,D, and F where

Ax+By=E

Cx+Dy=F

and also A,B,C,J,D,E,F,K,G,H,I, and L where

Ax+By+Cz=J

Dx+Ey+Fz=K

Gx+Hy+Iz=L

I'm a big fan of simplicity... long, long ago when my classmates had to reflect linear lines over the x and y axis, they actually worked it out, but I could see the answers in my head because reflection over the x axis is like this:

Reflect this line y=-3x + 2.5 over the x-axis

y=3x-2.5

Reflect the same line over the y-axis

y=3x+2.5

2. Ooh, thanks, but I don't have a USB to upload files to the calculator with right now..

edit: I looked at this "Assembly language programming capability is built-in to the TI-83 Plus. Assembly programs written for the TI-83 will NOT run without modification on the TI-83 Plus; some work is required to port TI-83 assembly programs to the TI-83 Plus." and it makes me doubt if I can even use assembly

because all I have is a regular TI-83 and TI-nspire.

Edited by HammyHam
Link to comment
Share on other sites

  • 0

I would go with unreality's suggestion to use ASM for password protection.

As for your problem, you need to replace your variable p with as string variable in order for it to work.

String variables can be found in VARS>STRING>0-9.

So your code goes from

Input, P

to

Input, Str1

Hopefully that should work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...