Results 1 to 11 of 11

Thread: Disconnect

  1. #1

    Thread Starter
    Hyperactive Member Iron Skull's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    325

    Disconnect

    Hi, I'm asked to make a program for a lan-party (http://www.vbforums.com/showthread.php?t=443896)
    So I came up with an idea.
    The main server closes all IP's that are NOT on some kind of list every x seconds.

    So without the IP change thing.

    So lets say I request the source code (or how to) to disconnect from a specific IP..
    Is this possible in one of the languages I know? (VB,C#,C,C++)

    506C65617365205261746520506F7374732E2E2E

  2. #2
    Lively Member
    Join Date
    Oct 2006
    Posts
    81

    Re: Disconnect

    do you want to disconnect a client if its IP address is not in the list?

  3. #3

    Thread Starter
    Hyperactive Member Iron Skull's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    325

    Re: Disconnect

    Exacly

    506C65617365205261746520506F7374732E2E2E

  4. #4
    Lively Member
    Join Date
    Oct 2006
    Posts
    81

    Re: Disconnect

    well in chat programs and so on you basically make a class for the client.. then when client connects you set the right values in the calss like winsock indexm IP address, NICK and everything else that is needed, and put the class in collection.. then you can simply loop via the collection, and check each clients ip address, if it matches then disconnect the client..

  5. #5

    Thread Starter
    Hyperactive Member Iron Skull's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    325

    Re: Disconnect

    yea I thought of that...
    I did already make the design and stuff...
    But how can I make a disconnect function..
    Since its not only disconnect from the chat program..

    Ok, let me explain what I want exactly..

    You have this setup:

    [Client] -------- [Switch]---------[Server]
    ...........................|
    ...........................|
    .......................[Client]

    The Clients what to play UT07 for example
    The Left Client sends a Signal to the Switch.
    And the Switch sends it to the other Client..
    In the meantime the Server is running some kind of sniffer on each port.
    And the server will get such information:
    <Sending PC><Target PC><Port><Packet>
    so It will look like:
    192.168.2.1 192.168.2.2 6642 F2F8
    Very easy example..
    Now I want that the server checks.
    The Senders IP and the Getting IP that they stand in a list..
    If they are not in the list I want to server to interact with the Connection.
    Lets say the right one didn't pay and the one on the down side does.
    I want you'll get something like this:
    [Client] ---X---- [Switch]---------[Server]
    ...........................|
    ...........................|
    .......................[Client]
    The x means Disconnected..
    I guess the Idea is VERY clear now :P
    This isn't going to be a Easy Program. ^^

    hope I can get some help..
    I don't need help with the sniffing and stuff.
    I only need ot know how to disconnect it from the Switch/Hub/Router..
    Is there a way to do such a thing.
    Or is is nessercary that all connections go through the Server?

    (This isn't only programming, this needs Network knowledge..)

    506C65617365205261746520506F7374732E2E2E

  6. #6
    Lively Member
    Join Date
    Oct 2006
    Posts
    81

    Re: Disconnect

    i dont really understand (maybe im stup1d ) - why to disconnect them from switcher? instead just block its access to the chat program, wouldnt that be easyer and almost the same result - not allow the specific ip to access the chat?

  7. #7

    Thread Starter
    Hyperactive Member Iron Skull's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    325

    Re: Disconnect

    The reason is very easy..
    When they are disconnected from the switch they can't play a game with Player 2
    When they are only blocked from a chat program. They aren't able to speak with each other.
    They they download Skype, Yahoo, MSN, IRC or an other chat client to do so..

    506C65617365205261746520506F7374732E2E2E

  8. #8
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Disconnect

    You're talking about Computer A disconnecting Client B from "Switch" C? Only if the software in C is written to accept a "disconnect" comnmand from A. You can't run software that will disconnect someone from some server over which you have no control.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  9. #9

    Thread Starter
    Hyperactive Member Iron Skull's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    325

    Re: Disconnect

    I made up a good way.
    We're going to use Linksys Switches.
    You can run your own software on them ^^

    506C65617365205261746520506F7374732E2E2E

  10. #10
    Junior Member Aeric's Avatar
    Join Date
    Nov 2006
    Posts
    28

    Re: Disconnect

    What is the point? How if later you want to connect the disconnected client back to the switch? then you 'll unable to do that.

  11. #11

    Thread Starter
    Hyperactive Member Iron Skull's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    325

    Re: Disconnect

    Nah, I did solve the problem by making the Router Check every 5 Minutes for all clients in the list.
    When a unknown MAC is connected he will disconnect the link.
    You can add your MAC to the list to visit the RouterPage and there you enter your ID you got at the Entrance.
    The only thing is.. MAC address Spoofing is easy.. -.-' but ah thats his prob. :P

    506C65617365205261746520506F7374732E2E2E

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width