Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Munchor on November 11, 2010, 11:43:33 am

Title: Password Protection
Post by: Munchor on November 11, 2010, 11:43:33 am
Hey everybody, some friends in my class love to delete other people's RAM and play my games, and transfer my games to their calculators -.-

So, I thought of some protection, with the Start-Up Application, it would open an Axe file everytime I turned on the calculator.

Now, I need to make a file where I have to input a password and if it is wrong, let me try again, anytimes I want to, infinitely and no keys can turn it off.

So, do something like:

Code: [Select]
.LOGCALC
A=1
While A != 5
Lbl 1
Repeat getKey->Z
End
If Z=x and Z=y and Z=..... (all keys, but 4,down key and 1)
Goto 1
End
If Z=1 //down key
A+A->A
End
If Z=34 //1 key
A+A->A
End
If Z=35 // 4key
A+1->A //A should now be 5
End

So, to turn on the calculator i have to press down key, 1 and 4key by this order.

Any suggestions?
Title: Re: Password Protection
Post by: Builderboy on November 11, 2010, 11:58:08 am
Did you know MirageOS has a great password system?  Merely set your password, go to the main menu, and press On to turn the calculator off.  When it is turned back on, it will prompt for a password, if it is incorrect it will turn back off ^^

But for the sake if programing, you probably want to do something like this:

Code: [Select]
Data(1,2,3,4)->Str1
0->S
Repeat S=4
0->S
ClrHome
For(F,0,3
0->K
Repeat K
getKey->K
End
{Str1+F}=K+S->S
Output(F,0,"*
End
End
Output(0,0,"Welcome!
Title: Re: Password Protection
Post by: Deep Toaster on November 11, 2010, 12:00:49 pm
^ Yep, use Data(. That way you can quickly change which keys you want, and it's a lot smaller, too.

And use Repeat getKey->K instead of 0->K:Repeat K:getKey->K.
Title: Re: Password Protection
Post by: Darl181 on November 11, 2010, 12:11:28 pm
What I've used was Krolypto.  I don't know anybody that could get past it (except for myself, but you need a screwdriver).
If you don't want to do that, see if you have calcutil.  If you do, you can use its run program on startup function
Spoiler For how:
Create a program called PROGLIST
Type in
Code: [Select]
S:<program name here>Test it by turning off the calc, then turning it back on
If Calcutil's installed, it should work
You can make your program run on startup, archived or not, ASM or not.
Title: Re: Password Protection
Post by: Deep Toaster on November 11, 2010, 12:19:33 pm
What I've used was Krolypto.  I don't know anybody that could get past it (except for myself, but you need a screwdriver).
If you don't want to do that, see if you have calcutil.  If you do, you can use its run program on startup function
Spoiler For how:
Create a program called PROGLIST
Type in
Code: [Select]
S:<program name here>Test it by turning off the calc, then turning it back on
If Calcutil's installed, it should work
You can make your program run on startup, archived or not, ASM or not.

I think he's using Startup. But yeah, most of the major shells have password support.

And nice, I didn't know CalcUtil could do that. Feature request for Kerm...
Title: Re: Password Protection
Post by: Munchor on November 11, 2010, 01:23:21 pm
Code: [Select]
Data(1,2,3,4)->Str1
0->S
Repeat S=4
0->S
ClrHome
For(F,0,3
0->K
Repeat K
getKey->K
End
{Str1+F}=K+S->S
Output(F,0,"*
End
End
Output(0,0,"Welcome!

I don't know what Data does. What's in that code, I would have to press keys 1,2,3,4?

I don't really understand that code, comments maybe?

Thanks
_______________________________________________________________________________________________________________________

I managed to do my own one :D

The .8xp is attached you have to press down key, one key and four key to open it in that order :)

Code:

Code: [Select]
:.LOGCALC
:ClrHome
:1→A
:While A≠5
:Lbl 1
:Repeat getKey→Z
:End
:If Z=1 or Z=2 or Z=3 or Z=4 or Z=5 or Z=6 or Z=7 or Z=8 or Z=9 or Z=10 or Z=11 or Z=12 or Z=13 or Z=14 or Z=15 or Z=16 or Z=17 or Z=18 or Z=19 or Z=20 or Z=21 or Z=22 or Z=23 or Z=24 or Z=25 or Z=26 or Z=27 or Z=28 or Z=29 or Z=30 or Z=31 or Z=32 or Z=33 or Z=35 or Z=36 or Z=37 or Z=38 or Z=39 or Z=40 or Z=41 or Z=42 or Z=43 or Z=44 or Z=45 or Z=46 or Z=47 or Z=48 or Z=49 or Z=50 or Z=51 or Z=52 or Z=54
:Goto 1
:End
:If Z=1
:A+A→A
:End
:If Z=34
:A+A→A
:End
:If Z=35
:A+1→A
:End
:End
Title: Re: Password Protection
Post by: Deep Toaster on November 11, 2010, 01:38:26 pm
Data( just stores data. It's like a list in BASIC. Then all Builderboy's routine does is gets keys four times, each time checking to see if it matches the Nth term in the list. You should change 1, 2, 3, and 4 to the keycodes of whatever keys you want :)

It's a lot smaller than hardcoding the key checks yourself.
Title: Re: Password Protection
Post by: Munchor on November 11, 2010, 01:51:28 pm
Data( just stores data. It's like a list in BASIC. Then all Builderboy's routine does is gets keys four times, each time checking to see if it matches the Nth term in the list. You should change 1, 2, 3, and 4 to the keycodes of whatever keys you want :)

It's a lot smaller than hardcoding the key checks yourself.

:O Got it :) Thanks much

So Data is like lists, but you can save them as Strings
Title: Re: Password Protection
Post by: Deep Toaster on November 11, 2010, 01:53:20 pm
Yep, exactly. In Axe, the GDBs, Strs, and Pics are completely interchangeable.
Title: Re: Password Protection
Post by: aeTIos on November 11, 2010, 02:05:11 pm
Code: [Select]
:.LOGCALC
:ClrHome
:1→A
:!If A=5                                     An "!" does the same thing as ≠
:Lbl 1
:Repeat getKey→Z
:End
:! If Z=1+(Z=34)+(Z=35)       to add 'multiple choices' , use "+(-add choice here-)"
:Goto 1
:End
:If Z=1
:2*A→A
:End
:If Z=34
:2*A→A
:End
:If Z=35
:A+1→A
:End
:End


Just a little optimization to show you a few things...
Title: Re: Password Protection
Post by: Runer112 on November 11, 2010, 10:00:09 pm
Code: [Select]
:.LOGCALC
:ClrHome
:1→A
:!If A=5                                     An "!" does the same thing as ≠
:Lbl 1
:Repeat getKey→Z
:End
:! If Z=1+(Z=34)+(Z=35)       to add 'multiple choices' , use "+(-add choice here-)"
:Goto 1
:End
:If Z=1
:2*A→A
:End
:If Z=34
:2*A→A
:End
:If Z=35
:A+1→A
:End
:End


Just a little optimization to show you a few things...

Did somebody say optimization? ;)

Some notes about your optimizations:

And now, the super-optimized version:

Code: [Select]
:.LOGCALC
:.DiagnosticOff and ClrHome are both unnecessary, but make it look better
:DiagnosticOff
:ClrHome
:Lbl S
:!If sub(G)-1
:!If sub(G)-34
:Return!If sub(G)-35
:End
:End
:Goto S
:Lbl G
:Repeat getKey
:End
Title: Re: Password Protection
Post by: DJ Omnimaga on November 12, 2010, 03:41:24 am
Darn that shrank down quite a bit. :O
Title: Re: Password Protection
Post by: aeTIos on November 12, 2010, 07:52:16 am
Quote
...And now, the super-optimized version:

Code: [Select]
:.LOGCALC
:.DiagnosticOff and ClrHome are both unnecessary, but make it look better
:DiagnosticOff
:ClrHome
:Lbl S
:!If sub(G)-1
:!If sub(G)-34
:Return!If sub(G)-35
:End
:End
:Goto S
:Lbl G
:Repeat getKey
:End

WOW :)

BTW, is it possible to un-assemble an assembled file into ASM so you can open it and edit?
Title: Re: Password Protection
Post by: Deep Toaster on November 12, 2010, 01:06:14 pm
Quote
...And now, the super-optimized version:

Code: [Select]
:.LOGCALC
:.DiagnosticOff and ClrHome are both unnecessary, but make it look better
:DiagnosticOff
:ClrHome
:Lbl S
:!If sub(G)-1
:!If sub(G)-34
:Return!If sub(G)-35
:End
:End
:Goto S
:Lbl G
:Repeat getKey
:End

WOW :)

BTW, is it possible to un-assemble an assembled file into ASM so you can open it and edit?


Here: http://www.ticalc.org/archives/files/fileinfo/162/16219.html

It occasionally doesn't work, for some reason...
Title: Re: Password Protection
Post by: aeTIos on November 12, 2010, 01:10:34 pm
thanx
Title: Re: Password Protection
Post by: DJ Omnimaga on November 13, 2010, 01:05:49 am
Dwedit also made one that might work. I don't remember if it was finished, though: http://www.ticalc.org/archives/files/fileinfo/349/34903.html