javascript - Captcha always show the same number in my first login -


i using below javascript load captcha in site. working fine.but in first login defaultly show number "5abd". how can change it.

http://wiki.asp.net/page.aspx/1369/simple-captcha-code-in-javascript/

i user above link javascrtipt. can't able post script here..

you dont provide many details, related random number being generated every time same seed. if rolled own captcha how generating string. commonly 1 passes system tick count random number seed.

otherwise, don't provide enough information give helpful answer.

edit:

1) after seeing code, first want captcha extremely flawed. whole point bot cant determine code , automatically enter it. why images generated on server. difficult extract value image.

2) showing same value every time because have not coded otherwise. literally starting same -hard coded- value , modifying that. math.random() function generating random number initial value instead of hard coding that. but, referencing point #1, scrap whole javascript thing altogether because captcha it's useless because bot grab value of control , fill out form it.

3) steps implementing captcha like: generate random string on server, save string session, generate image string (with noise/font funkiness prevent image processor being able read text), display image on page. actual string value never leaves server. when form submitted, compare user value value stored in session. rather go through of (unless whole point learning exercise), might think using of pre-made captcha controls such recaptcha, etc. either way, random number function, because long starting same hard coded values same result.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -