#!/usr/bin/perl -w $user = ""; $password = ""; $ip = `sudo ifconfig | grep 10.1. | sed "s/ *inet addr://;s/ Bcast.*//"`; $tmp = `curl -d "cm=ws32vklm&userip=$ip&session=&pm=&index=2&pageid=-1&compact=false&username=$user&password=$password&provider=UAH%20LDAP2" -e "https://uah-casib01sa.uah.edu/auth/perfigo_weblogin.jsp" "https://uah-casib01sa.uah.edu/auth/perfigo_cm_validate.jsp"`; $tmp =~ /.*userkey=(.*?)&/; `curl -d "noreport=true&userkey=$1&userip=$ip&webclient=\"\"&dhcpenable=false&index=2" -e "https://uah-casib01sa.uah.edu/auth/perfigo_cm_agree.jsp" "https://uah-casib01sa.uah.edu/auth/perfigo_cm_policy.jsp"`; $tmp = `curl -d "cm=ws32vklm&userip=$ip&session=&pm=&index=2&pageid=-1&compact=false&username=$user&password=$password&provider=UAH%20LDAP_" -e "https://uah-casib01sa.uah.edu/auth/perfigo_weblogin.jsp" "https://uah-casib01sa.uah.edu/auth/perfigo_cm_validate.jsp"`; $tmp =~ /.*userkey=(.*?)&/; `curl -d "noreport=true&userkey=$1&userip=$ip&webclient=\"\"&dhcpenable=false&index=2" -e "https://uah-casib01sa.uah.edu/auth/perfigo_cm_agree.jsp" "https://uah-casib01sa.uah.edu/auth/perfigo_cm_policy.jsp"`;