c# - How to get bytes from web page jpeg image without creating another session -


here's full disclosure: have full authorization access 1 of our company's third-party servicer's websites, download daily reports , perform repetitive tasks. know how automate ie perform of these duties me, logging in website requires entry of captcha phrase, , frankly i'm tired of entering captcha phrases.

when refresh page captcha phrase doesn't change. isolated url captcha picture, thinking (in c#) use jpegbitmapdecoder grab picture of captcha phrase, crack (i wrote code crack it), navigate log in page in ie , put result in. however, server considers jpegbitmapdecoder , ie page different sessions, throws different captcha.

my goal find way grab captcha image (it's jpeg image) appears right off ie page. want in such way ie instance doesn't have visible (so preferrably no "screencapture" methods). i've tried sorts of ways using html dom , whatnot can never raw bytes of image. i'd prefer not have read , decode packets either, if that's possible. how else can done? bytes representing jpeg image stored locally somewhere.

thanks,

you need send session cookie headers jpegbitmapdecoder request.

generally works this:

you enter site. if don't have session cookie set in browser (ssid=xxxxxxxxxxxxx), server sets new session sending set-cookie headers in response. browser knows ssid should use, , remembers it. every new request send domain contains ssid cookie value matches value given server first time. got take ssid , tell jpegbitmapdecoder send request ssid set.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -