1

Firstly asked at: (Bash) $user@aol.com email availability checker (with a well thought out beginning. Thanks again!)

I'm looking to expand on this a bit:

I'm trying to use either Curl, or a simple POST command (neither have proven working yet) to try to validate a list of usernames that I have to the following page:

https://new.aol.com/productsweb/

Essentially, this will be an availability checker for @aol.com email addresses.

It doesn't have to neat, clean, or pretty, as long as it works.

Does anyone have any idea where I can go from here?

Community
  • 1
  • 1
user1742682
  • 73
  • 1
  • 1
  • 3

1 Answers1

1

The following bash script using cURL command can check the availability of an email :

testemail=foobar # @aol.com
out=$(
    curl \
        -A "Mozilla/5.0" \
        -L \
        -b /tmp/c \
        -c /tmp/c \
        -s \
        -e 'https://new.aol.com/productsweb/' \
        -d "d=aol.com&f=test&l=test2&m=&s=$testemail" \
        'https://new.aol.com/productsweb/subflows/ScreenNameFlow/AjaxSNAction.do'
)

if [[ $out == *toggleSNField* ]]; then
    echo "email $testemail@aol.com is available"
elif [[ $out == *Error* ]]; then
    echo >&2 "an error occured while processing $testemail@aol.com"
else
    echo >&2 "$testemail@aol.com is unavailable"
fi

EXPLANATIONS

  • to understand what's going on, I use firefox & firebug addon, see XHR tab in this screenshot ²
  • I search in the POST what firefox sends to the AOL server
  • then, I use cURL to do the same

See man curl for further details.

² this is an AJAX request

Gilles Quénot
  • 173,512
  • 41
  • 224
  • 223
  • You have by far been the most help of all, Sputnick. I really appreciate it! Do you think there might be a way to make it read a .txt file and process them in a loop? I'm new to using curl. – user1742682 Oct 16 '12 at 21:46
  • Yes, see http://sputnick-area.net/pasteme/352 and adapt the last lines to your own file. – Gilles Quénot Oct 16 '12 at 22:02
  • Your structure is awesome, though I'm not sure that it's working. I threw in a random test email (haxedulollmaoomg) to see if it was generating active results. It stated that it was unavailable, but upon signup, it was. Think there might be something missing here? I really appreciate your help so far. – user1742682 Oct 16 '12 at 22:45
  • The script was modified to display an error & the site seems changed or it's a temporary failure. – Gilles Quénot Oct 17 '12 at 17:14