Commit Graph

297 Commits

Author SHA1 Message Date
hrj d81cf17a08 tune GifCaptcha: decrease character spacing, add jitter, slower frame rate 2021-04-19 17:17:24 +05:30
hrj 7ad164e3c2 GifCaptcha: show letters at different offsets
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-19 16:59:14 +05:30
hrj d32d836475 Gif Captcha: Simplify code
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-19 15:26:03 +05:30
hrj d2ef8c5259 Use port number from config file (fixes regression)
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-19 15:13:52 +05:30
hrj 46012b2ce3 default config: randomize seed used by randomizer
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-19 13:29:41 +05:30
hrj 523805263a Default config: larger throttle setting
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-19 13:29:15 +05:30
hrj da1b7eee23 don't track data/config.json
Auto-generating it is better as random seed can be made unique upon
first run

Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-19 13:28:45 +05:30
hrj 6189ffce89 add a simple browser based demo
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-19 13:14:36 +05:30
hrj f38d6ee191
Merge pull request #88 from UprootStaging/rotateCaptchas
Ensure fresh Captchas are served by sorting on attempted count
2021-04-19 11:49:42 +05:30
hrj 2885decb56 ensure fresh captchas are served by sorting on attempted
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-19 09:26:49 +05:30
hrj 7684b68efd optimisation: faster update of attempted column
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-19 09:26:49 +05:30
hrj 4335740bfc remove O (Capital O) from set of safe alphabets
since it is easily confused with 0 (zero)

Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-19 09:26:49 +05:30
hrj a942cd2a93
Merge pull request #87 from UprootStaging/usePicoServer
Use pico server
2021-04-18 20:16:59 +05:30
hrj d02a3504b7 Restore backlog value
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-18 18:54:32 +05:30
hrj 32169dbe80 scala-fix changes
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-18 18:37:37 +05:30
hrj 55288d3346 use picoServe library
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-18 18:37:37 +05:30
Rahul Rudragoudar 43331f8dd7
Improve Error handling/messages (#82)
* Add image error fields

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>

* Update models

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>

* Improve error handling/messages

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>

* Minor reformat

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>

* Improve error handling

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>

* Add base trait

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>

* Decouple data access methods
Improve error handling

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>

* Minor reformat

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>

* Add pattern matching to handle error
Remove try except blocks

Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2021-04-16 23:22:21 +05:30
hrj 3a1b01688a
Merge pull request #85 from UprootStaging/simplifiedConstructor
Code simplifications and updated test script
2021-04-14 10:47:18 +05:30
hrj 660447798f Debug Captcha: Print mismatches
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-14 10:08:33 +05:30
hrj 8fd294f0cf simpleTest.py : use debug level of difficulty
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-14 10:08:33 +05:30
hrj 352424e8f5 simpleTest: use XDG_RUNTIME_DIR for storing temp files
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-14 10:08:33 +05:30
hrj 433621f046 Update simpleTest to latest API and solve before answering
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-14 10:08:33 +05:30
hrj d3a2c6fa35 Minor: use Map.of()
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-14 10:08:33 +05:30
hrj 321bc67897 update readme with more details and clarifications 2021-04-13 17:58:21 +05:30
hrj ab64bb217c
Merge pull request #83 from UprootStaging/debugCaptcha
Add Debug Captcha and functional tests
2021-04-13 17:44:49 +05:30
hrj caf3669bd9 functional tests: show failed answers
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-13 14:54:16 +05:30
hrj 1d746f7655 functional test: reduce failure criteria
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-13 14:54:16 +05:30
hrj 96b5808628 correctly parse parameter values from config
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-13 14:54:16 +05:30
hrj 1ff4a30da7 use tesseract instead of gocr
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-13 14:54:16 +05:30
hrj b765399f68 debug captcha: use safe alphabets only
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-13 14:54:16 +05:30
hrj 41bdbc7fbf debug captcha: use a larger font
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-13 14:54:16 +05:30
hrj 954399042c debug catpcha: only use alphabets
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-13 14:54:16 +05:30
hrj 332bb2113b minor, typos in comment
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-13 14:54:16 +05:30
hrj 328f046379 make locust output less verbose
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-13 14:54:16 +05:30
hrj 3845645f9a use debug config
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-13 14:54:16 +05:30
hrj c0ac570746 simplify locust file
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-13 14:54:16 +05:30
hrj 68dcfb1e49 CI: fix permission error
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-13 14:54:16 +05:30
hrj a51defd2c7 install gocr during CI
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-13 14:54:16 +05:30
hrj 3cfba7a08e run functional test
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-13 14:54:16 +05:30
hrj d9fefca841 minor, spacing
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-13 14:54:16 +05:30
hrj dd1129b484 added a debug captcha
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-13 14:54:16 +05:30
hrj 2d7f229d30 bump to latest sbt version 2021-04-12 19:55:27 +05:30
hrj f8de5a5932 minor: added comment about per thread connections 2021-04-12 17:01:24 +05:30
hrj 79428bc5e7 reduce number of users in locust stress test
by reducing wait time, we can generate same load with fewer users
2021-04-12 16:56:59 +05:30
hrj e8416ff70e internal change: make maxAttempts easier to specify 2021-04-12 16:37:09 +05:30
hrj 8840a13a8f minor: moved blob variable to inner scope 2021-04-12 09:25:33 +05:30
hrj 43e1a379ac use an unbounded thread pool
mimics the performance with JLHttpServer
2021-04-12 07:22:53 +05:30
hrj fb400a6aea remove debug print 2021-04-12 07:10:00 +05:30
hrj 6fd34c16ac optimise string operations 2021-04-12 07:06:44 +05:30
hrj 89eeb76c46 Use a fork join pool executor with parallelism = 4 2021-04-12 07:00:53 +05:30