Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Help: how to do Banner Grabbing in telnet/ftp?

    Please help me with coding "Banner Grabbing" in C. (for telnet/ftp/any other)
    what kind of request packets do I need to send?
    what shud be the values of packet fields?

    pls include code for packet construction, checksumming...or whatever.
    i've tried various ways, but they failed in one way or the other.(some systems sent RST, sometimes cheksum errors,..etc)

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    St. Petersburg, FL
    Why do you need to do this in C?
    Couldn't you just have a short bash script that runs telnet/ftp/whatever on the host, and parses the output for anything interesting?

  3. #3
    I am working on a tool similar to nmap. So i need to find out the services/version running on each port of the host being scanned.
    if i do a system("telnet hostname") to capture the banner, its asking me for login credentials, stalling the program.


    for (each port)
    connect(...); // make a connection to that port
    recv(...); // recv the response/banner

    The abov prgm works for ftp, ssh,smtp. but not for telnet.
    so i want to send request packets to telnet just enough for me to get the banner as response. i do not want the host asking me for login.

  4. $spacer_open

Posting Permissions

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