Commit Graph

370 Commits

Author SHA1 Message Date
hrj 1a41724fdc popping characters captcha: don't show prev char for the first char
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-24 22:36:25 +05:30
hrj e3241ff7ac fix bug in randomNumber(min, max)
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-24 22:35:50 +05:30
hrj 6196a34aae
Merge pull request #90 from rr83019/BT-captcha
Background Thread - Random Captcha Generation
2021-04-24 21:52:25 +05:30
Rahul Rudragoudar 1708347504
Remove seed member var
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2021-04-24 20:53:28 +05:30
Rahul Rudragoudar 04755c0a07
Add method to set seed
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2021-04-24 20:44:20 +05:30
Rahul Rudragoudar 30bb26473e
Update random generator reference
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2021-04-24 19:37:44 +05:30
Rahul Rudragoudar 0d33f51f9e
Move random number generator to HelperFunctions
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2021-04-24 19:36:48 +05:30
Rahul Rudragoudar d62951fa51
Minor fix
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2021-04-21 14:56:58 +05:30
Rahul Rudragoudar aa5e7da0bc
Merge branch 'BT-captcha' of github.com:rr83019/lc-core into BT-captcha 2021-04-21 14:45:42 +05:30
Rahul Rudragoudar e38c3b680a
Reformat:Scalafmt
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2021-04-21 14:43:00 +05:30
Rahul Rudragoudar 98c304ccd4
Pick a random captcha provider instead of params
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2021-04-21 14:39:20 +05:30
Rahul Rudragoudar d3d5296ccd
Disable JavaFmt on compile
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2021-04-21 14:27:19 +05:30
Rahul Rudragoudar 241be1631c
Minor fix
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2021-04-21 13:53:35 +05:30
Rahul Rudragoudar 8f0f29c579
Minor fix
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2021-04-20 13:53:08 +05:30
Rahul Rudragoudar 8ea0652331
Java formatter
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2021-04-20 03:07:35 +05:30
Rahul Rudragoudar 3682b2cb7d
Randomize captcha generation
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2021-04-20 03:06:47 +05:30
Rahul Rudragoudar ef31ee8a57
Move random number generator to config
Signed-off-by: Rahul Rudragoudar <rr83019@gmail.com>
2021-04-20 03:05:13 +05:30
hrj 9e7efc1cf3 readme: removed reference to unimplemented provider
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-19 23:35:27 +05:30
hrj f5a262cf50 downgrade docker compose version
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-19 19:26:05 +05:30
hrj ed3afbc47e ensure data directory is present in the repo
to ease running the app on checkout and in CI
2021-04-19 18:51:20 +05:30
hrj 9b978212dc show errors in demo
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-19 18:05:59 +05:30
hrj 8595b2cc79 added popping characters sample
Signed-off-by: hrj <harshad.rj@gmail.com>
2021-04-19 18:05:43 +05:30
hrj c362ed5cb0 renamed GifCaptcha to PoppingCharactersCaptcha 2021-04-19 17:26:09 +05:30
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