aelius Posted April 19, 2014 Report Posted April 19, 2014 (edited) Mass validator pentru ID-uri de yahoo facut in bash #!/bin/shCURL="`which curl`"GREP="`which grep`"PARAMS="-s --head"YAHOO="http://img.msg.yahoo.com/v1/displayImage/yahoo"INVALID_STR="profile_96"for i in `cat ids.txt` ; doif [ -z "`$CURL $PARAMS $YAHOO/$i |$GREP $INVALID_STR`" ] then echo "$i - Valid user ID" else echo "$i - Invalid user ID"fidoneAm facut o lista de test numita 'ids.txt'flash_sebyamiradavisonelly_deea18anyta_mary93623test_teste3r412jojojaja35r2_r2anyta_mary94Test:macbook ~$ ./val flash_seby - Valid user IDamiradavison - Valid user IDelly_deea18 - Valid user IDanyta_mary93623 - Invalid user IDtest_teste3r412 - Invalid user IDjojojaja35r2_r2 - Invalid user IDanyta_mary94 - Valid user IDmacbook ~$** Nota: Functioneaza pe orice distributie de linux + FreeBSD si Mac OS X. Sunt necesare doar curl si grep. Edited April 19, 2014 by aelius 1 Quote
sudo Posted April 19, 2014 Report Posted April 19, 2014 No, bravo. Hai ca fac si eu un PHP repede, sa-l puna baietii pe webhosturi.Numai bine! Quote
Maximus Posted April 19, 2014 Report Posted April 19, 2014 Bravo. Dar unde gasesc "profile_96" ? Ca am facut un GET de test, dar nu apare nimic. Multumesc. Quote
aelius Posted April 19, 2014 Author Report Posted April 19, 2014 Bravo. Dar unde gasesc "profile_96" ? Ca am facut un GET de test, dar nu apare nimic. Multumesc.Profil existent:macbook ~$ curl --head http://img.msg.yahoo.com/v1/displayImage/yahoo/flash_sebyHTTP/1.1 200 OKDate: Sat, 19 Apr 2014 17:49:14 GMTP3P: policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"cache-control: public,must-revalidatex-yahoo-msgr-imageurl: http://msgr.zenfs.com/msgrDisImg/5Z5CK35BBKRIN7376POR4ZD2RIConnection: closeContent-Type: Profil inexistent:macbook ~$ curl --head http://img.msg.yahoo.com/v1/displayImage/yahoo/rherssgeaeshaw4wecsaHTTP/1.1 200 OKDate: Sat, 19 Apr 2014 17:49:17 GMTP3P: policyref="http://info.yahoo.com/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD IVAi IVDi CONi TELo OTPi OUR DELi SAMi OTRi UNRi PUBi IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC GOV"cache-control: public,must-revalidatex-yahoo-msgr-imageurl: http://l.yimg.com/a/i/identity/profile_96a.pngConnection: closeContent-Type: No, bravo. Hai ca fac si eu un PHP repede, sa-l puna baietii pe webhosturi.get_headers + preg_match (cateva linii in php) Quote
awnly3jhc2g Posted April 19, 2014 Report Posted April 19, 2014 Functioneaza si ymail, rocketmail Quote
Moderators Dragos Posted April 19, 2014 Moderators Report Posted April 19, 2014 No, bravo. Hai ca fac si eu un PHP repede, sa-l puna baietii pe webhosturi.Numai bine!Am discutat un pic despre asta aici. Quote
Nemessis Posted April 19, 2014 Report Posted April 19, 2014 Un script care verifica daca exista id-urile dintr-o lista e destul de inutil pentru cine nu le are cu php. Un script care verifica o lista de mailuri din care parseaza id-ul sa vada daca exista avatar si salveaza adresele valide complete ( @Yahoo.it etc) e util. I'm just sayin'. Quote
aelius Posted April 19, 2014 Author Report Posted April 19, 2014 (edited) Un script care verifica daca exista id-urile dintr-o lista e destul de inutil pentru cine nu le are cu php. Un script care verifica o lista de mailuri din care parseaza id-ul sa vada daca exista avatar e util. I'm just sayin'.In loc de linia:for i in `cat ids.txt` ; doVine:for i in `cat ids.txt |awk -F "@" '{print $1}'` ; doIn fisierul ids.txt sunt adrese de email direct. Asa functioneaza si cu lista de email-uriTestmacbook ~$ ./val Dicubogdan@yahoo.com - Valid email addressab.5685@yahoo.com - Valid email addressabramanca@yahoo.com - Invalid email addressadelacretucaragel@yahoo.com - Invalid email addressadinahandolescu@yahoo.com - Valid email addressadinastirbu04@yahoo.com - Valid email addressadinuta_dum@yahoo.com - Valid email addressaditatodea@yahoo.com - Valid email addressadrianagoia999@yahoo.com - Invalid email addressadrianapatrichi@yahoo.com - Invalid email addressalexandrescuoctavian@yahoo.com - Valid email addressalexandru_vajda@yahoo.com - Invalid email addressalexfoto29@yahoo.com - Valid email addressalice.stroe@yahoo.com - Valid email addressaliderviselfida@yahoo.com - Invalid email addressalina.busi@yahoo.com - Invalid email addressalina_cat28@yahoo.com - Valid email addressalina_muresan2004@yahoo.com - Invalid email addressalinaiacob02@yahoo.com - Valid email addressamaliavali@yahoo.com - Valid email addressana.umbrarescu@yahoo.com - Valid email addressanacovaciu2006@yahoo.com - Valid email addressanaravar93@yahoo.com - Invalid email addressanca_august24@yahoo.com - Valid email addressancapetrescu2003@yahoo.com - Valid email addressandichis@yahoo.com - Valid email addressandreivilius@yahoo.com - Invalid email addressandrore25@yahoo.com - Valid email addressaneleaimiri@yahoo.com - Valid email addressanetabot@yahoo.com - Valid email addressangileu31@yahoo.com - Valid email addressank_m12@yahoo.com - Valid email addressanusca_sss@yahoo.com - Valid email addressapetroaiec@yahoo.com - Invalid email addressaps28_74@yahoo.com - Invalid email addressaress2u@yahoo.com - Invalid email addressbarbujenica32@yahoo.com - Valid email addressbecherualina@yahoo.com - Valid email addressbeda_ioan@yahoo.com - Valid email addressbia_81tl@yahoo.com - Valid email addressbiancatanase@yahoo.com - Valid email addressbianka.bogdan@yahoo.com - Valid email addressbobutzu_81@yahoo.com - Valid email addressbogdan181984@yahoo.com - Valid email addressbubulinna_1980@yahoo.com - Valid email addresscamelia_clem@yahoo.com - Valid email addresscamelia_ursut@yahoo.com - Invalid email addresscami.fogorosi@yahoo.com - Invalid email addresscarllyka@yahoo.com - Valid email addresscarmen.armeanu@yahoo.com - Valid email addresscarmen_leo2003@yahoo.com - Valid email address Edited April 19, 2014 by aelius Quote
sudo Posted April 24, 2014 Report Posted April 24, 2014 Scuze ca nu am mai postat codul PHP, am dat search si am vazut ca postase si Dragos ceva asemanator, am uitat sa las reply aici. Quote