

PLOOKUP

Plookup is a multithreaded NSlookup program for Windows 9x and
  Windows NT. The program is fast. It can do perhaps 10-30 DNS
  lookups per second, if accessing a DNS server through a
  30-45 kbaud dial-up connection.

The program is designed to be used with the Proxy Hunter program.

It can convert between: 1. hostnames, 2. IP numbers, and 3. Proxy Hunter
 format IP numbers (e.g. "11.22.33.44:80@HTTP").

Port numbers and comments (after "#"s) are transferred.

Example of use: Convert a file (inp.txt) to Proxy Hunter 2.8 format:

       teew.com plookup.exe -p -f inp.txt >out.txt


--------------------------------------------------------------
>plookup -h
PLOOKUP 2.5.0 (14-Aug-99).  Usage: plookup OPTIONS [HOSTNAME/IPNUM/PH_IP]
Converts between: hostnames, IP numbers, and Proxy Hunter IP numbers.
  -i, -ip         : convert to IP number(s)
  -n,             : convert to hostName(s)
  -n1             : print only the most website-ish un-proxy-ish hostname
  -p, -ph         : convert to Proxy Hunter IP number(s)
  -po LIST, -P    : a comma separated list of Ports to add
  -a              : print all original source name(s) or IP number(s)
  -aa             : like '-a', but print port etc. following hostname or IP#
  -f FILE         : name of File (if any) to read lines from
  -t THREADS      : number of Threads. (Default = 60)
  -h, --help, /h  : display this Help and exit
Report bugs to C. Carey at <research@clear.net.nz> Auckland
--------------------------------------------------------------
Debug: -dbg



Examples Of Use, And Comments:


Plookup can't write to an output file. Some programs are included
 to allow output from Plookup.exe to be both viewed in a DOS
 window, and also written to a file at the same time.

--------------------------------------------------------------
>.\SCRIPT.COM -f O.TXT
Script V1.1 session started Sun Jul 11 03:58:09 1999
>PLOOKUP -n1 203.109.252.3
>exit

>.\SCRIPT.COM -f O.TXT PLOOKUP -n1 203.109.252.3

>.\TEEW.COM PLOOKUP -n1 203.109.252.3 >o.txt

>plookup -n1 203.109.252.3 | .\TEE0.COM >o.txt
>plookup -n1 203.109.252.3 | .\TEE1.COM >o.txt
--------------------------------------------------------------

(Note: SCRIPT.COM truncates a long filename of output file to
  a short filename 8.3 format.)



Data is entered in the command line:

(1)

   C:\1>plookup -n1 127.0.0.1:99:A
   localhost:99:A

   C:\1>plookup -i -aa localhost:99:A
   127.0.0.1:99:A [ localhost:99:A

   C:\1>plookup -i -a localhost:99:A
   127.0.0.1:99:A [ localhost

   C:\1>plookup -p localhost:99:A
   127.0.0.1:99@HTTP :A

   C:\1>plookup -n1 127.0.0.1:99@HTTP :A
   localhost:99:A


(2)
   >plookup -p -po 3128,81,8080 localhost:81:X # cmnt
   127.0.0.1:81@HTTP #:X cmnt
   127.0.0.1:3128@HTTP #:X cmnt
   127.0.0.1:8080@HTTP #:X cmnt

(3)
   Converting a file of proxies URLs (or hostnames) with ports
     (e.g. "209.151.160.41:8080") into a file ready for Proxy Hunter:

   >script
   >plookup -p -po 8080,80,3128 -f a-p.txt
   >exit

   >script -f OUTPUTFI.TXT plookup -p -f -input.txt

   Note: SCRIPT.COM won't write to files having Windows 95 'long' file
    names.

(4)
   Producing output that typically has hostnames on the left hand side,
    and typically IP hostnames on the right hand side.
           The starting file is a list of IP numbers (with or without
            port numbers), or it can be output from the Proxy Hunter program.

   >script -f B-n1.txt plookup -n1 -a -f A-p.txt

(5)
   Producing output that has IP numbers on the left hand side and
    typically hostnames on the right hand side.


   >script -f a-n1.txt plookup -n1 -a -f a.txt
   >script -f a-n1i.txt plookup -i -a -f a-n1.txt

   All "{ <fail_message>" comments are transferred to the output whenever
    the '-a' option was used and no DNS lookup was required for the input
    line.

   An example:
      -------------------------------------------------------------
      H:\!ProxyHunter\3\31>cat a.txt
      209.151.160.41:8080
      fastcache.vermontlaw.edu:8080 [ 207.136.224.6
      proxy2.mcmail.com:1441@HTTP

      H:\!ProxyHunter\3\31>script -f a-n1.txt plookup -n1 -a -f a.txt
      Script V1.1 session started Tue Jun 22 03:26:50 1999
      # 3 lines read from H:\!ProxyHunter\3\31\a.txt ...
      209.151.160.41:8080 { Name->(IP1,IP2..): fastweb.clover.net
      fastcache.vermontlaw.edu:8080
      proxy2.mcmail.com:1441
      Script completed Tue Jun 22 03:26:52 1999
      Output file is a-n1.txt

      H:\!ProxyHunter\3\31>plookup -i -a -f a-n1.txt
      # 6 lines read from H:\!ProxyHunter\3\31\a-n1.txt ...
      Script { Host not found
       { No IP number
      209.151.160.41:8080 { Name->(IP1,IP2..): fastweb.clover.net
      207.136.224.6:8080 [ fastcache.vermontlaw.edu:8080
      195.44.0.160:1441 [ proxy2.mcmail.com:1441
      195.44.0.232:1441 [ proxy2.mcmail.com:1441
      195.44.0.224:1441 [ proxy2.mcmail.com:1441
      Script { Host not found
      -------------------------------------------------------------

(6)
  Note on entering very long lists of ports:
   If PLOOKUP is run inside of a Windows 95 MS-DOS window, then there
   is a limit on how many characters Plookup.exe can read from the
   command line.
   If Plookup.exe is executed inside of the bash.exe program that is
   part of Cygwin's GNU Unix tools collection, then command lines
   containing over 1000 characters are able to be read by Plookup.
   Other unix shell programs, and 4DOS, also allow Plookup to
   receive longer command lines than COMMAND.COM does.

(7)
   If Plookup won't run try the '-dbg' option ('-dbg' has no arguments).
   Plookup won't run with versions of the Microsoft Winsock that are too
   old. Plookup will hang if the number of threads is too high (e.g.
   greater than 800 or 300).




OTHER INFORMATION:

The program was compiled in GNAT 3.11p Ada 95.
It has not been tested in Windows NT.



E-mail bug reports, comments, and, suggestions, etc., to the author,
  Mr Craig Carey, research@clear.net.nz, Avondale, Auckland.


Plookup is intended to assist 'proxy hunters'. It may be the
 fastest DNS Lookup program available.



------------------------------------------------------------------

EXAMPLES OF USE:

C:\1>plookup -n1 -a 209.151.160.41:8080@HTTP
209.151.160.41:8080 { Name->(IP1,IP2..): fastweb.clover.net

C:\1>plookup -i -a "209.151.160.41:8080 { Name->(IP1,IP2..): fastweb.clover.net"

209.151.160.41:8080 { Name->(IP1,IP2..): fastweb.clover.net

Some other links:

The 'Proxy Hunter' program:
  http://www.netease.com/~windzh/software/proxyht/download.htm

Unix utilities (incl. textutils) for Windows 95:
  http://sourceware.cygnus.com/cygwin/

  Sample commands:
     cat a*b.txt >$.txt
     uniq -c
     egrep
     ls -1 *.txt | xargs --verbose -n 1 --replace=X echo a X c
     split -l 1700 FOR-PH.txt a-


  Example: marking all lines in one file if they are in another:
     File caching.txt:
        12.34.56.78:8080

     File A-p.txt:
        33.44.55.66:80 # did not proxy
        12.34.56.78:8080

      -------------------------------------------------------------------
      echo on
      echo Usage: File caching.txt & A-p.txt are required (both contains IP numbers)
      cut <caching.txt -d"@" -f 1 | perl -pwe "s/$/ :NotAnon/" | sort -k 2 >dc.txt
      perl <A-p.txt -pwe "s/ *(\@HTTP|\@SOCKS5)//" >d1.txt
      nl <d1.txt -v 20000 -s " " >d2.txt
      sort <d2.txt -k 2 >d3.txt
      join -1 2 -2 1 -a 1 -o 1.1 1.2 2.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 1.10 1.11 1.12 1.13 1.14 1.15 1.16 1.17 1.18 1.19 1.20 d3.txt dc.txt >d4.txt
      sort <d4.txt -k 1 >d5.txt
      cut <d5.txt -d" " -f 2- >d6.txt
      perl <d6.txt -pwe "s/ :NotAnon/:C/" | perl -pwe "s/ +/ /g" >d7.txt
      del a-p-C.txt
      script -f a-p-C.txt -a E:\ADA\plookup -t 16 -n1 -a -f d7.txt
      -------------------------------------------------------------------



URLs:

  http://home.clear.net.nz/pages/research/proxies.htm (A list
       of public proxies).

  Ada 95:
  http://www.cetus-links.org/oo_ada.html  (Cetus Links)
  http://home.clear.net.nz/pages/research/ada_95.html (mailing lists)


  http://home.clear.net.nz/pages/research/sorm.htm
       (Page on proxy software)

  http://member.netease.com/~windzh/software/proxyht/download.htm
       (home of Proxy Hunter)

  Cygwin GNU (unix) tools:
     usertools.exe, http://sourceware.cygnus.com/cygwin/

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

UPDATES AND BUG FIXES:

Note: about no bugs are reported

Version 2.51, 22-August-99: addr. of author became research@ijs.co.nz.
Version 2.50, 14-August-99:
  * A bug introduced in version 2.4.1 (2-Aug-99) was fixed. Plookup
     would hang without printing all or any results.
  * "2.50" is short for "2.5.0"

Version 2.4.2, 3-August-99:
  * Handles larger files, & may better transfer text after
     port numbers. E.g.: 127.0.0.1:81:X -> "localhost:81@HTTP :X"
     or -> "localhost:81:X"). Not fully tested release. Seems OK.

Version 2.3.0, 11-July-99:
  * Documentation on the use of the Tee programs was improved, and
     those that did not write to files having long file names were
     removed.

Version 2.3.0, 20-June-99, and 7-July-99
  * In version 2.3.0, the "-a" message did not cause failure messages
      from a previous run, to be transferred to the output. E.g.:

>plookup2 -i -a "209.151.160.41:8080 { Name->(IP1,IP2..): fastweb.clover.net"
209.151.160.41:8080

    From version 2.3.0, this occurs:

209.151.160.41:8080 { Name->(IP1,IP2..): fastweb.clover.net


Version 2.2.3, 31-May-99:
  * When the IP number  maps onto a null hostname, "" is printed.
  * The number of threads doing DNS lookups can now be more than
      58. The number of threads may be able to exceed 300 perhaps.
  * Some tee programs are added. One report said script.com did
      not log the console in Windows NT.


Version 2.2.0, 16-May-99:
  * Now prints the hostname if option '-i -a' and the hostname
     had no IP number.


Version 2.1.2, 15-May-99:
  * Plookup will now print on the left hand side an IP
    number when converting an IP number to a hostname, if the
    hostname found from the IP number maps onto more than one
    IP number.
    plookup -n 195.44.0.160:8080
    195.44.0.160:8080 { Name->(IP1,IP2..): proxy1.mcmail.com


Note2:
ptunnel.adb is a proxy program to dump whatever it proxies
 (headers appear as unreadable ascii). It won't proxy
 indefinitely as it has a bug.


