How to annoy your friends and coworkers (code)

Discussion in 'OT Technology' started by Scoob_13, Sep 16, 2003.

  1. Scoob_13

    Scoob_13 Anything is possible, but the odds are astronomica

    Joined:
    Oct 5, 2001
    Messages:
    73,792
    Likes Received:
    38
    Location:
    Fort Worth. Hooray cowgirls.
    Well, I don't think that I've given back much lately, so I thought that I would give you a handy tool that's rather useful, either from the IT side of being able to lock someone's computer (so they have to CTRL-ALT-DEL to get back in, however you should have enough time to reset their password to keep them locked out if needbe), or from the humorous joke side of it (which, coincidently, also coincides with the IT sides of thing...)


    How to Remotely Lock a Machine, or rather How to Annoy the Crap out of the CIO

    Code:
    
    dim remoteprocess
    dim remotepc
    remotepc = inputbox ("Please enter the pc name")
    remoteprocess = "Rundll32.exe user32.dll,LockWorkStation"
    startprocess remoteprocess,remotepc
    sub startprocess (process,computername)
    	set proc = getobject("winmgmts://" & computername _
    	& "/root/cimv2").get("win32_process")
    	proc.create process
    end sub
    
    
    Copy and paste into notepad, save to somewhere handy, and rename to whatever.vbs

    Double-click on it and enter in their IP or computer name, and click enter. This will lock their machine. Not malicious, but can be hillarious when applied to the right group of programmers :bigthumb:



    *****DISCLAIMOR*****
    I cannot be blamed for you getting fired for modifying said code to go through an entire IP range and locking your entire building :o


    Oh, and a thanks to VBGod for liking a crappy language so much that I had to go and read about it :fawk:
     
  2. Leb_CRX

    Leb_CRX OT's resident terrorist

    Joined:
    Apr 22, 2001
    Messages:
    39,994
    Likes Received:
    0
    Location:
    Ottawa, Canada
    didnt work for me :(
     
  3. Scoob_13

    Scoob_13 Anything is possible, but the odds are astronomica

    Joined:
    Oct 5, 2001
    Messages:
    73,792
    Likes Received:
    38
    Location:
    Fort Worth. Hooray cowgirls.
    XP Firewall needs to be off :hs:
     
  4. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    I love VB, it's the easiest language to understand and debug. C and its ilk remind of the days when your source code size was a consideration
     
  5. crotchfruit

    crotchfruit Guest

    ohhhhh shhhiiiiiiiiitttttt it worked.

    this is the greatest thing i have ever seen :eek3:
     
  6. Duke Skywalker

    Duke Skywalker OT Supporter

    Joined:
    Aug 11, 2003
    Messages:
    874
    Likes Received:
    0
    Location:
    Central California
    Didn't work for me either.
     
  7. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    AD is required probably?
     
  8. Penguin Man

    Penguin Man Protect Your Digital Liberties

    Joined:
    Apr 27, 2002
    Messages:
    21,696
    Likes Received:
    0
    Location:
    Edmonton, AB
    Hahaha, I'm so trying this at school sometime.
     
  9. Scoob_13

    Scoob_13 Anything is possible, but the odds are astronomica

    Joined:
    Oct 5, 2001
    Messages:
    73,792
    Likes Received:
    38
    Location:
    Fort Worth. Hooray cowgirls.
    Nope, it should work on 2k and XP, I doubt it'll work on non-NT based OS's.

    Check your XP firewall, and you may also have your AV disabling all VBscripts.

    You can also try doing it to your machine, either by IP, or by using the localhost name.
     
  10. CyberBullets

    CyberBullets I reach to the sky, and call out your name. If I c

    Joined:
    Nov 13, 2001
    Messages:
    11,865
    Likes Received:
    0
    Location:
    BC, Canada/Stockholm, Sweden
    looks like it only works on LANs.
     
  11. Scoob_13

    Scoob_13 Anything is possible, but the odds are astronomica

    Joined:
    Oct 5, 2001
    Messages:
    73,792
    Likes Received:
    38
    Location:
    Fort Worth. Hooray cowgirls.
    More than likely. If I had my home IP I would test this out :o
     
  12. kingtoad

    kingtoad OT Supporter

    Joined:
    Sep 2, 2003
    Messages:
    55,923
    Likes Received:
    11
    Location:
    Los Angeles
    Comedy!
     
  13. Logik

    Logik Livin la vida broka

    Joined:
    Jun 30, 2000
    Messages:
    20,667
    Likes Received:
    1
    Location:
    The Steel City
  14. ooooh tomorrow is gonna be fun :big grin:
     
  15. Jacknasty

    Jacknasty New Member

    Joined:
    Aug 1, 2002
    Messages:
    3,436
    Likes Received:
    0
    Location:
    Destin, Florida
    The remote server machine does not exist or is unavailable: 'getobject'

    What am I doing wrong? It works on my machine, but not others :dunno:
     
  16. Jacknasty

    Jacknasty New Member

    Joined:
    Aug 1, 2002
    Messages:
    3,436
    Likes Received:
    0
    Location:
    Destin, Florida
    That's what I am using right now. I don't understand why it works on my machine, but won't lock others. I tried to lock my friend's machine and it wouldn't work, but I can lock mine easily. Sucks for me - no fun
     
  17. Leb_CRX

    Leb_CRX OT's resident terrorist

    Joined:
    Apr 22, 2001
    Messages:
    39,994
    Likes Received:
    0
    Location:
    Ottawa, Canada
    same
     
  18. Zen

    Zen Guest

    Ughhh, you must be joking. VB looks like spew to me. :hs:
     
  19. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    English not your first language?
     
  20. Zen

    Zen Guest

    English is my first language. VB simply looks like utter shit compared to C++.
     
  21. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    I don't know how you can say that honestly. There's lots of things you can't like about VB, but its readability is not up for debate.
     
  22. Zen

    Zen Guest

    Ok, for example from the code in this thread:

    "dim" instead of "#define"
    how the heck is someone supposed to know what "dim" means? (I still don't)


    startprocess remoteprocess,remotepc
    sub startprocess (process,computername)

    Defining a subroutine after calling it? That's not logical.
     

Share This Page