Joke Collection Website - Public benefit messages - How to brush SMS verification code to prevent theft?

How to brush SMS verification code to prevent theft?

1, time limit

For example, it takes 30 seconds to send it again. After clicking the send SMS verification code, the client starts to count down for 30 seconds, which restricts the user from sending SMS verification code requests many times during this time. Although this method is common, you can bypass this restriction and send SMS verification code directly in a specific way.

2, mobile phone number restrictions

When registering the same mobile phone number or sending other SMS verification codes, the system can restrict the mobile phone number. For example, only five SMS verification codes can be sent within the specified time. If so, please try again later.

3. Access the graphic verification code

Before sending the SMS verification code, the client accesses the graphic verification code for the user to verify. Submit the token parameters to the server, and the server will verify the token parameters. After the verification is passed, a short message will be sent to the user's mobile phone to the interface requesting to send a short message.

The code is as follows:

& ltscript src="captcha.js? appid = xxx " & gt& lt/script & gt;

& lt script & gt

kg.captcha({

//Bind the flyout button

Button: "#captchaButton",

//Verify that the transaction is successful.

Success: Function (e)

//After verification, submit the form directly.

//form 1 . submit();

kg。 $("#kgCaptchaToken ")。 value = e[" token "];

console . log(e);

},

//Transactions that failed validation

Fault: Function (e)

console . log(e);

},

//Triggered when the refresh button is clicked

Refresh: Function (e) {

console . log(e);

}

});

& lt/script & gt;

& lta id="captchaButton "> click to pop up the verification window.

& ltinput type = " hidden " name = " kgCaptchaToken " value = " "/& gt;