1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
HTTPParamètre(httpParamètreMode,1)
HTTPParamètre(httpParamètreDésactiveCookie,0)
HTTPParamètre(httpParamètreDésactiveCache,0)
sPass est une chaîne ANSI="PasswordDuUser1918700002"
sPassMd5 est une chaîne=""
bufTest est un Buffer
bufTest=HashChaîne(HA_MD5_128,sPass)
i est un entier
sPassMd5=""
POUR i=1 _A_ Taille(bufTest)
sPassMd5+=NumériqueVersChaîne(Asc(bufTest[[i]]), "02x")
FIN
HTTPCréeFormulaire("form_contents")
HTTPAjouteParamètre("form_contents","login","true")
HTTPAjouteParamètre("form_contents","portablename","CommonPortable")
HTTPAjouteParamètre("form_contents","password_expired","0")
HTTPAjouteParamètre("form_contents","auth_key","1918700002")
HTTPAjouteParamètre("form_contents","md5_old_pass","")
HTTPAjouteParamètre("form_contents","username","cisco")
HTTPAjouteParamètre("form_contents","password",sPassMd5)
HTTPEnvoieFormulaire("form_contents","http://192.168.1.1/cgi-bin/userLogin.cgi",httpPost)
SI ErreurDétectée ALORS
Erreur(ErreurInfo(errComplet))
SINON
HTTPRequête("http://192.168.1.1/dhcp_setup.htm")
Info(HTTPDonneRésultat())
FIN |
Partager