added 130 packages in 8s npm notice npm notice New major version of npm available! 9.1.2 -> 10.5.0 npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.5.0 npm notice Run npm install -g npm@10.5.0 to update! npm notice
启动
1 2 3 4 5 6 7 8 9 10 11
w2 start
[i] whistle@2.9.66 started [i] 1. use your device to visit the following URL list, gets the IP of the URL you can access: http://127.0.0.1:8899/ http://192.168.8.188:8899/ Note: If all the above URLs are unable to access, check the firewall settings For help see https://github.com/avwo/whistle [i] 2. set the HTTP proxy on your device with the above IP & PORT(8899) [i] 3. use Chrome to visit http://local.whistlejs.com/ to get started
err := u.data.db.Raw("select id, username, email from user where username = '" + s + "'").Scan(&user).Error if err != nil { u.log.Error(fmt.Sprintf("find user by id username fail, error: %v", err)) return nil, err }
{ "Code": 500, "Msg": "find user by username fail", "Data": { "Number": 1064, "SQLState": [ 52, 50, 48, 48, 48 ], "Message": "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''''' at line 1" } }
@Slf4j @Controller @RequestMapping("/kaptcha") public class KaptchaController {
@Autowired private Producer captchaProducer;
@RequestMapping("/getCode") public ModelAndView getKaptchaImage(HttpServletRequest request, HttpServletResponse response) throws Exception { response.setDateHeader("Expires", 0); // Set standard HTTP/1.1 no-cache headers. response.setHeader("Cache-Control", "no-store, no-cache, must-revalidate"); // Set IE extended HTTP/1.1 no-cache headers (use addHeader). response.addHeader("Cache-Control", "post-check=0, pre-check=0"); // Set standard HTTP/1.0 no-cache header. response.setHeader("Pragma", "no-cache"); response.setContentType("image/jpeg"); // create the text for the image String capText = captchaProducer.createText(); log.info("******************验证码是: " + capText + "******************"); // store the text in the session request.getSession().setAttribute(Constants.KAPTCHA_SESSION_KEY, capText); // create the image with the text BufferedImage bi = captchaProducer.createImage(capText); ServletOutputStream out = response.getOutputStream(); // write the data out ImageIO.write(bi, "jpg", out); try { out.flush(); } finally { out.close(); } return null; } }
kaptcha.border | Border around kaptcha. Legal values are yes or no. | yes kaptcha.border.color | Color of the border. Legal values are r,g,b (and optional alpha) or white,black,blue. | black kaptcha.border.thickness | Thickness of the border around kaptcha. Legal values are > 0. | 1 kaptcha.image.width | Width in pixels of the kaptcha image. | 200 kaptcha.image.height | Height in pixels of the kaptcha image. | 50 kaptcha.producer.impl | The image producer. | com.google.code.kaptcha.impl.DefaultKaptcha kaptcha.textproducer.impl | The text producer. | com.google.code.kaptcha.text.impl.DefaultTextCreator kaptcha.textproducer.char.string | The characters that will create the kaptcha. | abcde2345678gfynmnpwx kaptcha.textproducer.char.length | The number of characters to display. | 5 kaptcha.textproducer.font.names | A list of comma separated font names. | Arial, Courier kaptcha.textproducer.font.size | The size of the font to use. | 40px. kaptcha.textproducer.font.color | The color to use for the font. Legal values are r,g,b. | black kaptcha.textproducer.char.space | The space between the characters | 2 kaptcha.noise.impl | The noise producer. | com.google.code.kaptcha.impl.DefaultNoise kaptcha.noise.color | The noise color. Legal values are r,g,b. | black kaptcha.obscurificator.impl | The obscurificator implementation. | com.google.code.kaptcha.impl.WaterRipple kaptcha.background.impl | The background implementation. | com.google.code.kaptcha.impl.DefaultBackground kaptcha.background.clear.from | Starting background color. Legal values are r,g,b. | light grey kaptcha.background.clear.to | Ending background color. Legal values are r,g,b. | white kaptcha.word.impl | The word renderer implementation. | com.google.code.kaptcha.text.impl.DefaultWordRenderer kaptcha.session.key | The value for the kaptcha is generated and is put into the HttpSession. | KAPTCHA_SESSION_KEY This is the key value for that item in the session. kaptcha.session.date | The date the kaptcha is generated is put into the HttpSession. | KAPTCHA_SESSION_DATE This is the key value for that item in the session.