× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Try this java program running on your AS/400.  It was written by Jeff
Markham for an article by Vince Leveque in the October 2000 issue of MC.

If it doesn't do "everything" you want it to, you can probably tweak it to
make it perfect.  Good place to start, anyway.


//***************************************************************
//
//
// To Compile:
//
// From a PC with a java compiler:
//
//    javac PortScanner.java
//
//
//  From the AS/400:
//
//   CRTJVAPGM CLSF('/YourDir/PortScanner.java')
//
//
//***************************************************************
//
//
// This application will scan all TCP ports on the host system
// specified as a parameter to this class. It will print a list
// of the "listening" ports on the standard output line.
//
//
//  To Use:  java PortScanner YourSystemHostName(or IP address)
//
//****************************************************************
import java.io.*;
import java.net.*;

public class PortScanner
{
  private static Socket sock = null;

  public static void main(String[] args)
  {
    if(args.length == 0)
    {
      System.out.println("Usage:  java PortScanner [hostname|ip address]");
      System.exit(0);
    }

    int count = 0;
    for(int port = 1; port <= 1024; port ++)
    {
      if(isListening(args[0], port))
      {
        System.out.println("Found a listener on host " +
sock.getInetAddress().getHostName() +
        " at " + sock.getInetAddress().getHostAddress() + ", port " + port);
        count ++;
      }
    }
    System.out.println("Found " + count + " ports listening at " + args[0]);
    System.exit(0);
  }

  private static boolean isListening(String hostorIP, int port)
  {
    boolean b = false;
    try
    {
      sock = new Socket(hostorIP, port);
      sock.close();
      b = true;
    }

    catch(UnknownHostException uhe)
    {
      System.out.println("Cannot connect to " + hostorIP);
      System.exit(0);
    }
    catch(Exception e)
    {
      //do nothing
    }
    return b;
  }
}



----- Original Message -----
From: "Rick DuVall" <R_C_DuVall@daaokc.com>
To: <midrange-l@midrange.com>
Sent: Thursday, November 01, 2001 1:41 PM
Subject: RE: IP Address Sniffer


> Hi Scott,
>
> I have found Languard Network Scanner to be useful.  It runs on WinDoze
and
> can be found at http://www.gfisoftware.com/languard/.
>
> Regards
> Rick
>
> -----Original Message-----
> From: midrange-l-admin@midrange.com
> [mailto:midrange-l-admin@midrange.com]On Behalf Of Scott Arntsen
> Sent: Thursday, November 01, 2001 12:36 PM
> To: MIDRANGE-L@midrange.com
> Subject: IP Address Sniffer
>
>
> Does anybody know of a utility to list out all IP devices attached to your
> system?  I used NETSTAT and WRKIPDEV (TAATOOL), but I'm trying to get more
> detailed information.
>
> Thanks
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> or email: MIDRANGE-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>
>
>
> _______________________________________________
> This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
> To post a message email: MIDRANGE-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l
> or email: MIDRANGE-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/midrange-l.
>
>





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.