Last visit was: It is currently Thu Mar 28, 2024 8:31 am


All times are UTC-05:00




Post new topic Reply to topic  [9 posts ] 
    Author Message
     Post subject:DOS help, please!
    PostPosted:Wed Feb 13, 2008 1:26 pm 
     

    Joined:Sun Dec 18, 2005 2:10 pm
    Posts:56
    I'm working on a program right now to try and prevent the use of SSH tunneling to get around a web-blocker (trying to work in DOS a little just to see if I can). Basically what it does right now is delete Putty if it's found on the desktop of the student account:
    Code:
    :CHECK IF EXIST "C:\Documents and Settings\student\Desktop\putty.exe" del "C:\Documents and Settings\student\Desktop\putty.exe" GOTO CHECK
    This program runs in the background invisibly with help of hstart (http://www.ntwind.com/software/utilities/hstart.html).

    What I'd like it to do is to check in more places, and also be not dependent on the file name. (e.g. use findstr to make a list of files with a certain string in them, then delete all files in the list) Also if possible, I'd like to have the program kill the process itself.

    Also, how should I set permissions in Windows so that the program can run under any user, but not be killed by regular users?

    For those who are wondering about SSH tunneling using Putty, check out darkpsycho.com for the method.

    Thanks for any help!


    Top
    Offline  
     Post subject:Re: DOS help, please!
    PostPosted:Wed Feb 13, 2008 3:20 pm 
    User avatar
     

    Joined:Sun Feb 12, 2006 8:56 pm
    Posts:1019
    Website:http://eddieringle.com
    Location:Detroit, MI
    Why not just block the process from even running? Are you planning on doing this only for putty or is this just an example?

    _________________
    -- Eddie Ringle

    Check out Elysian Shadows and consider backing us on Kickstarter!

    ====================================

    Image


    Top
    Offline  
     Post subject:Re: DOS help, please!
    PostPosted:Wed Feb 13, 2008 6:14 pm 
    Organ Donor
    User avatar
     

    Joined:Mon Aug 13, 2007 1:47 pm
    Posts:529
    Location:Jawjuh
    So basically you're asking we help you restrict the free flow of information?
    On the board of a group of people making a mod for a game that glorifies the hacker lifestyle?

    Am I getting this right? :P

    _________________
    Creative people must be stopped! (Latest Entry 7/31/11: "Fishsticks (18+))

    Pleasantville by Night, a humorous horror web RPG


    Top
    Offline  
     Post subject:Re: DOS help, please!
    PostPosted:Wed Feb 13, 2008 8:24 pm 
     

    Joined:Sun Dec 18, 2005 2:10 pm
    Posts:56
    Okay, I guess I didn't provide enough detail in my original post.

    Basically, I'm not doing this for any real purpose; it's just for me to learn a little more about making batch files.

    The test computer just happens to be the same one I use to tunnel, so I figure Putty's a good thing to try and test it out on. =]


    Top
    Offline  
     Post subject:Re: DOS help, please!
    PostPosted:Wed Feb 13, 2008 11:02 pm 
    Literally Nine
    User avatar
     

    Joined:Sat Apr 02, 2005 3:31 pm
    Posts:1171
    Location:The vicinity of an area adjacent to a location.
    Or better, use a network filter and block the SSH port (TCP 22). Then PuTTY, OpenSSH, etc will be blocked.

    This is why I host my OpenSSH on alternate ports occasionally.

    _________________
    - Tycho

    Image


    Top
    Offline  
     Post subject:Re: DOS help, please!
    PostPosted:Thu Feb 14, 2008 9:22 am 
     

    Joined:Sun Dec 18, 2005 2:10 pm
    Posts:56
    Tycho, it'd probably be easier that way, but I don't know the first thing about networks, and, like I said, I'm doing this to learn more about DOS :D


    Top
    Offline  
     Post subject:Re: DOS help, please!
    PostPosted:Fri Feb 15, 2008 6:11 am 
    Literally Nine
    User avatar
     

    Joined:Sat Apr 02, 2005 3:31 pm
    Posts:1171
    Location:The vicinity of an area adjacent to a location.
    Well, don't do a tight loop like the one you're doing there. That thing checks as fast as it can whether the file exists. It's probably better to have it sleep a while and then check again (so you don't stress the processor for no reason). This sort of task is easily done on Unix-based systems using a cron and a Bash script (they're so thoughtful to have implemented a sleep command!).

    And since DOS is generally going the way of the dinosaur, I suggest you try taking up a more useful scripting language.

    _________________
    - Tycho

    Image


    Top
    Offline  
     Post subject:Re: DOS help, please!
    PostPosted:Fri Feb 15, 2008 3:40 pm 
    User avatar
     

    Joined:Sun Feb 12, 2006 8:56 pm
    Posts:1019
    Website:http://eddieringle.com
    Location:Detroit, MI
    Speaking of linux/unix, does anyone know the function/command that makes the pc speaker beep?

    In Windows the function is, Beep(), is it the same for linux too?

    _________________
    -- Eddie Ringle

    Check out Elysian Shadows and consider backing us on Kickstarter!

    ====================================

    Image


    Top
    Offline  
     Post subject:Re: DOS help, please!
    PostPosted:Mon Feb 18, 2008 10:55 am 
     

    Joined:Sun Dec 18, 2005 2:10 pm
    Posts:56
    Well, thanks for the help. Not sure whether I can get the script done from the knowledge I have, but hopefully I can cobble something together =]

    Really, I think the main problem is figuring out how to use findstr to generate a list, then delete all files in the list--if anyone has some specific hints on that part of this problem, I'd appreciate help. Thanks =]

    Tycho, if I could use shell I would, but I'm stuck on Windows for this project ATM. :(


    Top
    Offline  
    Display posts from previous: Sort by 
    Post new topic Reply to topic

      All times are UTC-05:00


      Who is online

      Users browsing this forum: No registered users and 11 guests


      You cannot post new topics in this forum
      You cannot reply to topics in this forum
      You cannot edit your posts in this forum
      You cannot delete your posts in this forum
      You cannot post attachments in this forum

      Search for:
      Jump to:  
      Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
      Theme created by Miah with assistance from hyprnova