I need help making a Password Program ...

please could someone help......

I want to make my own password program.....so I need a little help......

Could someone please tell me....I have a textbox and a command button I want it so that If I type the correct password It will close the program so people can logon to windows.

oh and could someon help me so when a press a key on the keyboard it minimizes my vb program into the systray.

I would also like to know how to make it so that if people press ctrl alt and deleate they can't close my password program..

thanx alot

«1

Comments

  • ok here we go:
    1) well this part sounds kindda strange but:
    If text1.text="the password" then
    End
    End if
    2)For the system tray: there are two ways, the first way is so long I dont have time to write all that code here, the second way is to use the OCX that Microsoft provided, its free, small and very very easy to use, search msdn.microsoft.com for "system tray"

    3)for Alt+ctrl+del add this API in the general section:

    Private Declare Function SystemParametersInfo Lib "user32" Alias "SystemParametersInfoA" (ByVal uAction As Long, ByVal uParam As Long, ByVal lpvParam As Any, ByVal fuWinIni As Long) As Long

    and then use this code in form_load to disable Alt+Ctrl+Del:

    Call SystemParametersInfo(97, bDisabled, CStr(1), 0)

    Remember that it wont work under Win NT/2K/XP

    Note: If you just want to do this program to gain experience, its perfectly ok, but if you really want to "protect" your windows 95, well, in this program you are missing Ctrl+Esc and in general, THERE IS ABSOLUTLY NO WAY TO PROTECT WIN 95/98, NO WAY, PERIOD.

  • : ok here we go:
    : 1) well this part sounds kindda strange but:
    : If text1.text="the password" then
    : End
    : End if


    I suspect that he doesn't want the user to be able to logon to Windows until the user enters the correct password. In which case you will need to use the SetForeGround Window API, and call it in a timer event.

    In the declarations section of your form:

    [code]Private Declare Function SetForegroundWindow Lib "user32" Alias "SetForegroundWindow" (ByVal hwnd As Long) As Long
    [/code]

    Then in your timer sub:

    [code]Form1.WindowState = 2
    SetForegroundWindow Form1.hWnd[/code]

    Put the code given in previous post in the click event of your command button and that should (maybe with a few modifications) lock the system up until the user enters the correct password.







  • why to go for all the API trouble when u can use:
    me.setfocus
    in a timer that is
  • : THERE IS ABSOLUTLY NO WAY TO PROTECT WIN 95/98, NO WAY, PERIOD.

    It's not that hard. Destroy the floppy connection on the motherboard. Remove the ability to gain the boot menu. Create your own shell. About the only way to get in is to physically remove the HD and plant it in another system. But then, you could do that with any OS...
  • : : THERE IS ABSOLUTLY NO WAY TO PROTECT WIN 95/98, NO WAY, PERIOD.

    Since it starts up in DOS, you could do a number of things.

    You could also re-write the HD boot record, and have the password there. No PW, no boot - not even to DOS.

    Most important: Never say never! There's always someone more clever, or with more info, who will come up with somthing. That's the fun of programming (if you're the clever one, that is).

    Happy New Year to all!




    [purple]Melissa[/purple]

  • Dear Melissa,
    when I say "NEVER" be sure there is no other way because i dont usualy use that word!
    in this case it may go as far as pulling out the BIOS battery but still its imposible

  • : why to go for all the API trouble when u can use:
    : me.setfocus
    : in a timer that is
    :

    Me.Setfocus will only work within the App. The SetForegroundWindow will work with all windows Open In Windows.

    You Could also use AppActivate

    AppActivate "Form Caption"

    However, I've found in the past that the SetForegroundWindow API works better.



  • Can I be the clever one here?

    I did this on a government computer I was using, and our Intel couldn't figure it out...


    Have your program start up off a module with sub main, and in that module, load your form, put it on top and all that great stuff.

    Don't pass control to the form.

    What I did to ensure there was no way around my program AFTER it was started, so this did not protect against floppy boot. Since it was NT at the time I wasn't too worried, anyways, At any press of the Esc, Delete, Ctrl, Alt, or any of the F keys, Insert, Home, Pageup/down, whatever,... Use the ExitWindows API and set it to quit applications without saving. Make sure your loop in your module has a doevents so that it can still accept keystrokes for your password. I promise you that will take care of Ctrl-Esc. As for floppy boot, if you want to protect against that, use a bios password, and if you want to protect against a battery removal, Add a feature to your program to encrypt files on shutdown, and decrypt them after the password has been entered.

    That should just about take care of all your problems... Encryption will be slow however for large amounts of files, so you might even want to point all extentions to your program, set file associations with your program, and have your program encrypt/decrypt each time you open and close a file.

    :)

    Well it works for me anyways.

  • : Can I be the clever one here?
    :
    : I did this on a government computer I was using, and our Intel couldn't figure it out...
    :
    :
    : Have your program start up off a module with sub main, and in that module, load your form, put it on top and all that great stuff.
    :
    : Don't pass control to the form.
    :
    : What I did to ensure there was no way around my program AFTER it was started, so this did not protect against floppy boot. Since it was NT at the time I wasn't too worried, anyways, At any press of the Esc, Delete, Ctrl, Alt, or any of the F keys, Insert, Home, Pageup/down, whatever,... Use the ExitWindows API and set it to quit applications without saving. Make sure your loop in your module has a doevents so that it can still accept keystrokes for your password. I promise you that will take care of Ctrl-Esc. As for floppy boot, if you want to protect against that, use a bios password, and if you want to protect against a battery removal, Add a feature to your program to encrypt files on shutdown, and decrypt them after the password has been entered.
    :
    : That should just about take care of all your problems... Encryption will be slow however for large amounts of files, so you might even want to point all extentions to your program, set file associations with your program, and have your program encrypt/decrypt each time you open and close a file.
    :
    : :)
    :
    : Well it works for me anyways.
    :

    You ARE the clever one here :-)
  • : : Can I be the clever one here?
    : :
    : : I did this on a government computer I was using, and our Intel couldn't figure it out...
    : :
    : :
    : : Have your program start up off a module with sub main, and in that module, load your form, put it on top and all that great stuff.
    : :
    : : Don't pass control to the form.
    : :
    : : What I did to ensure there was no way around my program AFTER it was started, so this did not protect against floppy boot. Since it was NT at the time I wasn't too worried, anyways, At any press of the Esc, Delete, Ctrl, Alt, or any of the F keys, Insert, Home, Pageup/down, whatever,... Use the ExitWindows API and set it to quit applications without saving. Make sure your loop in your module has a doevents so that it can still accept keystrokes for your password. I promise you that will take care of Ctrl-Esc. As for floppy boot, if you want to protect against that, use a bios password, and if you want to protect against a battery removal, Add a feature to your program to encrypt files on shutdown, and decrypt them after the password has been entered.
    : :
    : : That should just about take care of all your problems... Encryption will be slow however for large amounts of files, so you might even want to point all extentions to your program, set file associations with your program, and have your program encrypt/decrypt each time you open and close a file.
    : :
    : : :)
    : :
    : : Well it works for me anyways.
    : :
    :
    : You ARE the clever one here :-)
    :

    In a realistic situation, I run Apache and an FTP server (ftpd) on my machine at home, and my brother kept on going on my machine and rebooting it back into windows. My solution was to use a BIOS password and a bootloader password. I password protected the BIOS and the system bootup, then I modified LILO, re-compiled and rebooted. Everything worked fine for me. What the hell is so hard?

    ;)


    - Chris

    Email: prgmrChris2k1@yahoo.com
    Website: http://prgmrChris2k1.cjb.net/


    | C/C++ | Visual Basic | Z80 ASM |



  • : : : Can I be the clever one here?
    : : :
    : : : I did this on a government computer I was using, and our Intel couldn't figure it out...
    : : :
    : : :
    : : : Have your program start up off a module with sub main, and in that module, load your form, put it on top and all that great stuff.
    : : :
    : : : Don't pass control to the form.
    : : :
    : : : What I did to ensure there was no way around my program AFTER it was started, so this did not protect against floppy boot. Since it was NT at the time I wasn't too worried, anyways, At any press of the Esc, Delete, Ctrl, Alt, or any of the F keys, Insert, Home, Pageup/down, whatever,... Use the ExitWindows API and set it to quit applications without saving. Make sure your loop in your module has a doevents so that it can still accept keystrokes for your password. I promise you that will take care of Ctrl-Esc. As for floppy boot, if you want to protect against that, use a bios password, and if you want to protect against a battery removal, Add a feature to your program to encrypt files on shutdown, and decrypt them after the password has been entered.
    : : :
    : : : That should just about take care of all your problems... Encryption will be slow however for large amounts of files, so you might even want to point all extentions to your program, set file associations with your program, and have your program encrypt/decrypt each time you open and close a file.
    : : :
    : : : :)
    : : :
    : : : Well it works for me anyways.
    : : :
    : :
    : : You ARE the clever one here :-)
    : :
    :
    : In a realistic situation, I run Apache and an FTP server (ftpd) on my machine at home, and my brother kept on going on my machine and rebooting it back into windows. My solution was to use a BIOS password and a bootloader password. I password protected the BIOS and the system bootup, then I modified LILO, re-compiled and rebooted. Everything worked fine for me. What the hell is so hard?
    :
    : ;)
    :
    :
    : - Chris
    :
    : Email: prgmrChris2k1@yahoo.com
    : Website: http://prgmrChris2k1.cjb.net/
    :
    :
    : | C/C++ | Visual Basic | Z80 ASM |
    :
    :
    :
    :
    My question is one of simple curiosity...
    Wot happens if someone resets the BIOS (either by removing the battery or using the handy little dip-switches the MB manufacturers supply) does this kill the BIOS password or is it stored on EPROM? In which case do you need to "CLEAR" the BIOS? (Usually another handy dip-switch [These guys truely think of everything!])

    Does any of that remove the BIOS password?

    If not then cool for security and a big DOH to anyone who has trouble remembering passwords!
    If so, then a password prog (such as described by own vewry own Field-Marshall Punisher) would need to be in place as well...

    Spanner

    P.S. A field commission for Punisher for being the Clever-One ;o)

  • : If so, then a password prog (such as described by own vewry own Field-Marshall Punisher) would need to be in place as well...
    :

    Well I can't take credit for the password idea, it was what the original post was about. I've made one before, but it wasn't an original idea. ;)

    : Spanner
    :
    : P.S. A field commission for Punisher for being the Clever-One ;o)
    :
    :

    Stop - My head is growing :P

  • Number 1)I was talking about win 95/98/98se and i stilll say IT IS IMPOSSIBLE and for our friend with the goverment program:
    well u were running windows NT and when u remove the bios battery u can set the bios to boot from the floppy, then u can remove the program from either the startup folder or the registry, registry is editable from DOS
    any more questions?

    P.S I challange ANYONE in proofing its impossible to secure win9x

    The Ghost
    ghost@crazygrandpa.com

  • : Dear Melissa,
    : when I say "NEVER" be sure there is no other way because i dont usualy use that word!
    : in this case it may go as far as pulling out the BIOS battery but still its imposible
    :
    :

    There is always a way. and this is the way big companies would make a Win98 box secure...

    Its called a "Server Room"

    In our case,

    1. Put a lock on the door to the room with the Win98 box.
    2. Lock the lock.
    3. Take the key out of the lock and keep it with you.

    Now its not fancy programming, and it doesnt do clever things with the BIOS. But i challenge you to reset the BIOS from outside the locked room

    Spanner

    Sometimes the best solutions are by far the simplest...

  • Gosh this guy has a mission ;)
    --- Temper Temper Ghost...

    Anyways, just try what I said and you will find it does a pretty good job. If you need help with encryption, I have some pretty good algorythms that I can pass along, and I'm working on some others, if you want to help me with that even ;)



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories