Make find_user_id easier to use for non-technical users#3
Merged
Conversation
- rename USERNAME/CNT_ID/PHPSESSID to EMAIL/CUSTOMER_REF/php_session_id - expose SEARCH_START/SEARCH_END instead of hardcoded 490000..500000 - add background progress reporter (checked/hits/errors/rate/ETA) - stop the whole scan via os._exit as soon as a valid user id is found - add user-facing setup comments at the top of the file
Owner
|
Thanks a lot for the improvment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
why
The original
find_user_id.pyscript worked, but it was rough around the edgesfor anyone who isn't a developer.
fixes
requests against the server.
changes
USERNAMEtoEMAILandCNT_IDtoCUSTOMER_REFand where to find it (invoice, customer portal, etc.).
range(490000, 500000)with
SEARCH_START/SEARCH_ENDconstants, with comments showing how tosplit a large scan into several smaller runs.
checked / rate / elapsed / ETAevery 5 seconds, so users can see thescan is actually working and estimate how long it will take.
thread count, re-login interval) before starting, so misconfigurations are
obvious right away.
the result + final stats and terminates the whole process via
os._exit(0),instead of continuing to scan the rest of the range.
not changed
endpoint are untouched.
optional
added a French-localized version of the script
(
find_user_id_fr.py) for users who are more comfortable reading the setupinstructions in French. Behavior is identical.