Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. TCP/UDP Packets (2 easy questions)

TCP/UDP Packets (2 easy questions)

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminhelpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dan Madden
    wrote on last edited by
    #1

    Hi All, Q1: Any one have (simple) sample code on establishing a TCP Connection??? Q2: I need to capture some TCP/UDP Packet data (to see what a client sends to a virus server when a virus if found). I have a sniffer and the data is coming out unreadable (portions of it)?? Project Explination: I need to find out what data is being sent to a virus server which reports the virus. Once I have that, create a program that will test the reporting on all of the Virus Servers (50+). Basically send TCP/UDP message to each Server...who ever doesn't report the virus is having reporting problems. Help is much appreciated Thanks in advance, Dan

    T 1 Reply Last reply
    0
    • D Dan Madden

      Hi All, Q1: Any one have (simple) sample code on establishing a TCP Connection??? Q2: I need to capture some TCP/UDP Packet data (to see what a client sends to a virus server when a virus if found). I have a sniffer and the data is coming out unreadable (portions of it)?? Project Explination: I need to find out what data is being sent to a virus server which reports the virus. Once I have that, create a program that will test the reporting on all of the Virus Servers (50+). Basically send TCP/UDP message to each Server...who ever doesn't report the virus is having reporting problems. Help is much appreciated Thanks in advance, Dan

      T Offline
      T Offline
      Tim Deveaux
      wrote on last edited by
      #2

      Ok - so basically your prog is a kind of 'yes I'm here' type thing that you can run periodically to see that all hands are reporting. The real killer would be if the packets are encrypted by the reporting program - then your only hope is binary dup and pray you fool the server. But the first problem is getting the data. You will probably be looking for UDP packets arriving from the clients on the server. (Just a guess). Next, there will probably be a port number you can identify (the servers listen or 'recievefrom' sockets local port). Once you have that info, you can filter the packets accordingly and see whats being sent. Just a suggestion though - except for the fact that you'll see the virus server respond, all your testing is that the wire's not cut. You could probably write simple clients on both ends to test that. (yes even a one socket client can do some 'listening' if you don't overload it). Hmmm... surely this has been done before... hmmm... need coffee... hmmm... where's the 'sleepy' emoticon...

      D 1 Reply Last reply
      0
      • T Tim Deveaux

        Ok - so basically your prog is a kind of 'yes I'm here' type thing that you can run periodically to see that all hands are reporting. The real killer would be if the packets are encrypted by the reporting program - then your only hope is binary dup and pray you fool the server. But the first problem is getting the data. You will probably be looking for UDP packets arriving from the clients on the server. (Just a guess). Next, there will probably be a port number you can identify (the servers listen or 'recievefrom' sockets local port). Once you have that info, you can filter the packets accordingly and see whats being sent. Just a suggestion though - except for the fact that you'll see the virus server respond, all your testing is that the wire's not cut. You could probably write simple clients on both ends to test that. (yes even a one socket client can do some 'listening' if you don't overload it). Hmmm... surely this has been done before... hmmm... need coffee... hmmm... where's the 'sleepy' emoticon...

        D Offline
        D Offline
        Dan Madden
        wrote on last edited by
        #3

        Thanks for the info Tim. I have created a server component that will monitor a port (139 - TCP) used by the reporting Server. After I perform some tests, I'll let you know hao it turns out. Seeing that this is not anything that my firm will not have a problem with me posting the code for others to use that need to perform simular tests. Thanks in advance, Dan

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups