; Title:    Aimhol - A companion to AOL 'Find a Buddy Wizard'.
; Purpose:  Automatically retrieves AOL Instant Messenger screen names from the OSCAR/BOS servers!
; Author:   Vengy! (-_-)
; Date:     2003 and beyond ...
; Tested:   Win2K/XP ...
; Compiled: MASM32
; Bugs:     cyber_flash@hotmail.com


; Aimhol: - A companion to AOL 'Find a Buddy Wizard'. 
; =======
; This program will attempt to AUTOMATICALLY retrieve AOL Instant Messenger screen names
; and associated data (hobbies, nicknames,...) by querying the AOL OSCAR/BOS servers! :)
; It uses port 443 to connect. AIM default is 5190 but HTTPS (443) slips thru most firewalls.


; Files included:
; ---------------
; aimhol.asm                  Main source code and search tips.
; aimhol.exe                  Main program.
; surnames.inc                List of 2150 most common US surnames.
; rand.inc                    Generates a random number in the range [0-(MAX-1)]
; misc_stuff.inc              Useful procedures such as MD5, Winsock, etc., ...
; readme.txt                  You're reading it.


; AIM Login Process:
; ------------------
; OSCAR (Open System for Communication in Realtime) is a proprietary protocol
; developed by America On-Line (AOL). OSCAR defines a system of exchanging instant messages.
; The protocol is used by all versions of AOL's Instant Messenger (AIM) client and the latest 
; versions of ICQ (ICQ2000 and later). An OSCAR login is composed of a TCP packet that includes
; the login name (screen name), password, and client version string.
;
; Upon successful login, a cookie is issued that grants users access to the various BOS servers
; for the life of the session. The AIM network is comprised of two kinds of servers:
; Open System for Communications in Real-time (OSCAR), which handles user authorizations;
; and Basic OSCAR Service (BOS), which provides the search tools for users to find each other.


; How Aimhol works:
; -----------------
; It randomly picks a "Last Name" from a list of 2150 most common surnames (see surnames.inc)
; as compiled by 'http://www.census.gov/genealogy/names/dist.all.last' or builds a new random
; surname based upon the ODDS parameter (1 in 50), then sends it to the BOS server as a 'Find Buddy' request.
; All responses are logged in ***BUDDY.TXT*** using the TLV (Type)(Length)(Value) format as follows:
;
; (00,09)(00,NN)(Screen Name)
; (00,08)(00,NN)(City)
; (00,07)(00,NN)(State)
; (00,06)(00,NN)(Country)
; (00,02)(00,NN)(Last Name)
; (00,01)(00,NN)(First Name)
;
; Additional data such as, hobbies, nick names, etc.,... are logged too!
; Also, Screen Names are extracted from buddy.txt and saved in ***SN.TXT***.


; Derivation: 
; -----------
; Aimhol - not quite a Warhol. ;)


; Theory:
; -------
; Generating random surnames such as DFDGIOP, Q320EWQE, FD1F,... (using the 'rand' function) 
; Will create more chaotic search results which has the effect of covering a wider range of screen names.
; Other suggestions to: cyber_flash@hotmail.com


; Assemble:
; ---------
; Launch MASM32 and place these 3 files into the \MASM32\INCLUDE folder:
;
; surnames.inc
; misc_stuff.inc
; rand.inc
;
; Run the 'Console Assemble & Link' menu option.


; Examples:
; ---------
; Setting MAXRETRIES=1,MAXSUBMITS=5 means that 5 surnames will each be submitted once for
; a total of 5 search requests to the BOS Search server.
; In my testing, retries seems to retrieve new data each time, but after 10 attempts or so,
; you'll get diminishing returns since alot are duplicates of previous searches!
;
; This simple 1x5 example found 439 unique AIM screen names in approx. 20 seconds!
; Searching with 2x15 yielded 2922 screen names. And so on ... :)
;
;  _______   __              __              __
; |   _   | |__| .--------. |  |--. .-----. |  |
; |.  1   | |  | |        | |     | |  _  | |  |
; |.  _   | |__| |__|__|__| |__|__| |_____| |__|
; |:  |   |
; |::.|:. | AIM: Find A Random Buddy Wizard! ...
; '--- ---'
; ==============================================
;
; Username: yourusername
; Password: yourpassword
;
; Number of surnames to submit (1-65535): 5
; Number of resubmits per surname (1-10): 1
; Odds of submitting random names (1-50): 3
; 
; Connecting to Login OSCAR Server:  login.oscar.aol.com
; Connecting to Basic OSCAR Server:  64.12.26.186
; Connecting to Search OSCAR Server: 64.12.26.10
; 
; Count Surname
; ----- ----------------
; 4.... F2U91LDFNJ
; 3.... OF15VNX
; 2.... CORNETT
; 1.... U9G1
; 0.... SWANSON
; 
; Writing raw buddy data to BUDDY.TXT
; 
; Writing screen names to SN.TXT
; 
; Done! Press enter to quit . . .


; Thanks To:
; ----------
; > Home of the UnOfficial AIM/OSCAR Protocol Specification.
;   You will find the documents explaining the AIM/OSCAR protocol and related issues.
;   Please visit: http://aimdoc.sourceforge.net/OSCARdoc/
;
; > Ethereal is a free network protocol analyzer for Unix and Windows.
;   It allows you to examine data from a live network or from a capture file on disk.
;   Please visit: http://www.ethereal.com/
;
; > Makoto Matsumoto and Takuji Nishimura psuedo random number generating algorithm!
;   Copyright 1997, matumoto@math.keio.ac.jp
;   Please visit: http://www.math.keio.ac.jp/matumoto/emt.html
;
; > The MD5 algorithm (Message Digest 5) is a cryptographic message digest algorithm.
;   It takes as input a message of arbitrary length and produces as output a 128-bit "fingerprint". 
;   Please visit: http://win32assembly.online.fr/


; Have fun! (-_-)