-
-
Notifications
You must be signed in to change notification settings - Fork 115
fix(cookie-gen): Improve cookie generation / enter v-code with updated mouse simulation #453
Conversation
Problem mit Numpy und Scipy ist, dass es bspw noch nicht auf Mac M1 geht, gäbe es dafür Alternativen? |
Ich habe selbst kein Mac mit M1, aber laut meiner Recherche sollte Numpy und Scipy darauf laufen. Lösung 1: Lösung 2: |
So sollte es funktionieren. Im Prinzip müsste dann alles laufen wie bei einem Intel Mac. Erstinstallation von Vaccipy Mac M1
Erneute Ausführung Vaccipy Mac M1
|
Ich habe es eben mehrfach probiert, jedoch kam ich nie durch. Hast du in diesen 30 Sekunden auch noch wild geklickt oder nicht? |
Das was der PR hauptsächlich Löst ist, dass bei der Eingabe eines V-Codes nicht die Meldung "Ein unerwarteter Fehler ist aufgetreten" erscheint. So lange bei der Cookie-Generierung erscheint "Ungültiger Vermittlungscode" funktioniert es so wie es gedacht ist. -> Die Terminbuchung sollte dann problemlos funktionieren. Bei der Generierung der V-Codes habe ich ehr die Vermutung, dass die direkten REST Anfragen generell und unabhängig von den Cookies Blockiert werden, wenn zu viele Leute gleichzeitig einen Code generieren möchten. So wie es bei https://github.com/alfonsrv/impf-botpy/blob/main/impf/api.py beschrieben wurde, siehe Bild im Anhang. Edit: Zur Überprüfung ob es an den Cookies liegt, habe ich mit verschiedenen Browsern manuell cookies generiert und diese testweise für die vaccipy V-Code Generierung eingesetzt. -> Ebenfalls 429 |
Kleines Feedback: Ich habe mit dem Branch aus diesem Pullrequest gerade eben einen Termin gefunden und ohne Probleme automatisch buchen können. |
Habe jetzt eine Lösung ohne Numpy Implementiert. -- Random Kurve Neue Funktionen:
-> Maus startet bei 0,0 fährt zu einer zufälligen Position -> fährt zum Cookie Banner -> fährt zu Vermittlungscode bereits vorhanden -> Input Feld |
Richtig nice, dass du die schweren Module durch zwei einfache Funktion ersetzt hast. Und es funktioniert bei mir! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generell würde ich überlegen, move_mouse_to_coordinates
, move_mouse_by_offsets
und move_mouse_to_coordinates
in staticmethod
umzubauen und auszulagern. Damit würde der code wieder etwas übersichtlicher werden. Ansonsten ist das echt super.
Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com>
Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com>
Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com>
Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com>
Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com>
Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com>
Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com>
Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com>
Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com>
Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com>
Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com>
Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com>
Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com>
Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com>
Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com>
* feat(search): Wenn angebracht, pausiere Vermittlungscodes (#431) * fix(Kontaktdaten GUI): fix for pressing Cancel Btn in Kontaktdaten GUI raised error (#436) * Fix for pressing Cancel Btn in Kontaktdaten GUI raised error Hier wie man es replizieren kann: Kontaktdaten.json ist nicht vorhanden Termin suchen drücken Kontakdaten ausfüllen kommt "Abbrechen" Falsche/Unnötige Fehlermeldung da ja abgebrochen kommtHier wie man es replizieren kann: Kontaktdaten.json ist nicht vorhanden Termin suchen drücken Kontakdaten ausfüllen kommt "Abbrechen" Falsche/Unnötige Fehlermeldung da ja abgebrochen kommt @Floskinner passt das so? * Docstring added * syntax change * Revert "syntax change" This reverts commit a6d16c9. * syntax fix * Fix for reject() / accept() Buttons wurden nicht korrekt zurück gemeldet. @Floskinner * fix(gender): added Kind and Divers as gender options (#442) * Added Kind and Divers (#448) * feat(code gen GUI): Added 3 retries of SMS PIN (if attempt failed) (#432) * fix(log): Ensure tools/log paths are constructed portably (#454) On Linux, the backslash in "tools\log\" was not interpreted as path separator, so screenshots etc. ended up in the project's root directory, named "tools\log\<filename>". Now they are named "<filename>" and stored in the log-directory under tools. * Don't throw and show error if loading of data was cancelled by the user (#456) Co-authored-by: Juri <j.robl@osram.com> * feat(GUI): Sprachsupport, Usability (#455) * Update .gitignore Added venv * Documentation * added language support and minor improvements * documentation * Updated .gitignore * Update .gitignore Added venv Documentation added language support and minor improvements documentation Updated .gitignore * typos * Adapt postition zip-code hometown * fix(cookie-gen): Improve cookie generation / enter v-code with updated mouse simulation (#453) * Improve mouse simulation for cookies / enter code * Add requirements for mouse simulation * Remove unecessary import * Fix imports * Remove imports which doesnt work on M1 * Generate coordinates without numpy/scipy * Update move mouse by offsets func * Add func to move from source x,y to target x,y * Improve enter vermittlungscode * Add mouse movements to driver_enter_code() * Add second try if "Es ist ein unerwarteter Fehler aufgetreten" occurs * Update tools/its.py Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com> * Update tools/its.py Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com> * Update tools/its.py Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com> * Update tools/its.py Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com> * Update tools/its.py Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com> * Update tools/its.py Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com> * Update tools/its.py Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com> * Update tools/its.py Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com> * Update tools/its.py Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com> * Update tools/its.py Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com> * Update tools/its.py Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com> * Update tools/its.py Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com> * Update tools/its.py Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com> * Fix ugly if * Update tools/its.py Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com> * Update tools/its.py Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com> Co-authored-by: Jonas Mock <jonasmock97@gmail.com> Co-authored-by: Tim Reibe <38082956+iamnotturner@users.noreply.github.com> * Added a minimum of 30 seconds for retry-sec/check-delay (#452) * refactor(search): Rotiere durch PLZs, anstatt Zufallswahl (#444) * feat(notify): added notification configuration to GUI (#463) * added notifications to GUI * added tabstops * Update tools/gui/qtkontakt.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Workaround für Generierung von Vermittlungscodes (#459) * Update requirements * Replace code_anfordern() * Fix wait for server response before continue * Accept cookies * Add queue bypass * Add retry counter for fetching server response * Revert from HEAD to 7efe793. * Add selenium_code_anfordern() * Replace its.code_anfordern() * Add logging * Add specific error messages * Add mouse simulation * Enter char by char * Fix random v-code Co-authored-by: Jonas Mock <jonasmock97@gmail.com> * fix(bugs): small bugfixes, added selenium debugging port (#466) * fix(notifications GUI): Fix for KeyError "notifications" after click Kontaktdaten bearbeiten over GUI (#468) * Draft for Code gen over GUI first draft for running Code Gen over GUI * Update tools/gui/qtcodegen.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Update tools/gui/qtcodegen.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Update tools/gui/qtcodegen.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Update qtcodegen.py * Thread cancel optimization break while loops if stop called * update now checking missing kontakt data showing dialog to generate kontaktdaten if not present * remove help icon * added CodeGEn Checkbox to Kontaktdaten for now it just simply adds a XXXX dummy code to prevent code validation error (since it is not yet known ) * Update qtcodegen.py * Update qtcodegen.py * Revert "added CodeGEn Checkbox to Kontaktdaten" This reverts commit 3bf7b6f. * added QtCodeGen to SubProcess added QtCodeGen to SubProcess because Impfterminservice is blocking the Thread for termination * adapted to mainline beta and further improvements READY to TEST * Update main.py * Update utils.py * Update qtcodegen.py hard exit if cancelled * Revert "Update main.py" This reverts commit 8f082c5. * file permission fix git update-index --chmod=+x main.py under windows * File permissin change revert * Update gui.py small rearrangment * Update tools/gui/qtcodegen.py THX Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Update tools/gui/qtcodegen.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Update tools/gui/qtcodegen.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Update tools/gui/qtcodegen.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * keep all data kontaktdaten.json and just set a dummy code for code gen task Rework to keep all data in kontaktdaten.json and just set a dummy code for code gen task if not file is present. Also added checks if kontaktdaten edit fenster was cancelled to not run processes. Also do a full validation check on input also if mode CODE_GENERIEREN, to have a valid config file * Update gui.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Update tools/gui/qtcodegen.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Update gui.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Update qtkontakt.py changes from @Floskinner added * Revert "Merge branch 'beta' into ownBeta" This reverts commit cb67518, reversing changes made to 7e719ec. * Revert "Revert "Merge branch 'beta' into ownBeta"" This reverts commit fe4d9f5. * logger conflicts with redirect of qtgui * added fix from TIm Reibe * Added 3 Input Dlg retries if SMS PIN was wrong Change allows a wrong input of smspin and if code failed to accept the pin will be asked again * Fix for keyerror in GUI (Kontaktdaten bearbeiten) with old file tools\gui\qtkontakt.py", line 362, in __lade_alle_werte if kontaktdaten['notifications']: KeyError: 'notifications' Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * fix missing add-data in create spec for version.txt * selenium-wire hooks for pyinstaller * feat(notifications): Fire notification as soon as an appointment was found (#474) * Added title to telegram notification message * Fire notification as soon as an appointment was found * Added possibility to move the mouse negative values (#458) * Added possibility to move the mouse negative values * - Refactored, moved mouse movement and path generation to own file mousemover.py * - Reordered imports * - Fix calls to move_mouse_to_coordinates Co-authored-by: Juri <j.robl@osram.com> * feat(GUI): Verbesserte Oberfläche im Modus CODE_GENERIEREN (#471) * Update .gitignore Added venv * Improved Kontaktdateneingabe (CodeGen)) Verbesserung der UX. Felder wurden deaktiviert, Ladefunktion unterstüzt nun CodeGen * select correct tab * typo * added default arguments * Improve selenium vcode generation (#480) * Add second try if "Es ist ein unerwarteter Fehler aufgetreten" * Improve selenium_code_anfordern * Close browser if error occurs * Fixed unable to locate element * Fix unable to locate element #2 * Fix 'CLogger' object has no attribute 'warning' * Prevent unable locate sms_verifizierung_h1 after successful request * Cleaned up main Co-authored-by: Jonas Mock <jonasmock97@gmail.com> * fix(seleniumwire): added chrome_options to selenium-wire, added selenium-wire certificates (#485) * added chrome_options to seleniumwire, pep8 changes * added seleniumwire certificates * fix(PR #480 crahsed GUI): added selenium code generation to GUI (#486) * Draft for Code gen over GUI first draft for running Code Gen over GUI * Update tools/gui/qtcodegen.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Update tools/gui/qtcodegen.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Update tools/gui/qtcodegen.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Update qtcodegen.py * Thread cancel optimization break while loops if stop called * update now checking missing kontakt data showing dialog to generate kontaktdaten if not present * remove help icon * added CodeGEn Checkbox to Kontaktdaten for now it just simply adds a XXXX dummy code to prevent code validation error (since it is not yet known ) * Update qtcodegen.py * Update qtcodegen.py * Revert "added CodeGEn Checkbox to Kontaktdaten" This reverts commit 3bf7b6f. * added QtCodeGen to SubProcess added QtCodeGen to SubProcess because Impfterminservice is blocking the Thread for termination * adapted to mainline beta and further improvements READY to TEST * Update main.py * Update utils.py * Update qtcodegen.py hard exit if cancelled * Revert "Update main.py" This reverts commit 8f082c5. * file permission fix git update-index --chmod=+x main.py under windows * File permissin change revert * Update gui.py small rearrangment * Update tools/gui/qtcodegen.py THX Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Update tools/gui/qtcodegen.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Update tools/gui/qtcodegen.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Update tools/gui/qtcodegen.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * keep all data kontaktdaten.json and just set a dummy code for code gen task Rework to keep all data in kontaktdaten.json and just set a dummy code for code gen task if not file is present. Also added checks if kontaktdaten edit fenster was cancelled to not run processes. Also do a full validation check on input also if mode CODE_GENERIEREN, to have a valid config file * Update gui.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Update tools/gui/qtcodegen.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Update gui.py Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * Update qtkontakt.py changes from @Floskinner added * Revert "Merge branch 'beta' into ownBeta" This reverts commit cb67518, reversing changes made to 7e719ec. * Revert "Revert "Merge branch 'beta' into ownBeta"" This reverts commit fe4d9f5. * logger conflicts with redirect of qtgui * added fix from TIm Reibe * Added 3 Input Dlg retries if SMS PIN was wrong Change allows a wrong input of smspin and if code failed to accept the pin will be asked again * Fix for keyerror in GUI (Kontaktdaten bearbeiten) with old file tools\gui\qtkontakt.py", line 362, in __lade_alle_werte if kontaktdaten['notifications']: KeyError: 'notifications' * fix(PR #480 crahsed GUI) Merged changes to GUI from : #480 Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> * bugfix notifications not working in GUI (#487) * fix(master): merge master into beta (#490) * Update README.md * Update README.md * Create CONTRIBUTING.md * Update README.md * Update CONTRIBUTING.md * Added Kind and Divers (#437) Kind and Divers are now also selectable ,) * Revert "Added Kind and Divers (#437)" (#443) This reverts commit 996878c. * Update README.md Co-authored-by: Julius Jacobitz <47418007+JuliusJacobitz@users.noreply.github.com> Co-authored-by: IAmWebSA <webmaster@zutroll.de> Co-authored-by: haslersn <sebastian.hasler@gmx.net> Co-authored-by: IAmWebSA <webmaster@zutroll.de> Co-authored-by: Andreas Wachowski <andreas.wachowski@gmail.com> Co-authored-by: Genmutant <github@jurirobl.de> Co-authored-by: Juri <j.robl@osram.com> Co-authored-by: Alex <a.suhrkamp@gmx.de> Co-authored-by: Jonas Mock <info@jonasmock.de> Co-authored-by: Jonas Mock <jonasmock97@gmail.com> Co-authored-by: Timo <43381667+pancakeDevelopment@users.noreply.github.com> Co-authored-by: Marco Rombach <36333308+marcorombach@users.noreply.github.com> Co-authored-by: Florian Glaser <58706771+Floskinner@users.noreply.github.com> Co-authored-by: JuliusJacobitz <julius@jacobitz.de> Co-authored-by: Julius Jacobitz <47418007+JuliusJacobitz@users.noreply.github.com> Co-authored-by: Sebastian Nagel <nagels@informatik.uni-tuebingen.de>
Added function which generates a random curve and returns the corresponding x and y coordinates.Those coordinates are used to simulate the mouse movement.Added optional cookie entriesWith > 50 simulated mouse movements the bot protection was fooled most of the times. Works not in 100% of the cases but should improve the chances.Edit:
-> Maus startet bei 0,0 fährt zu einer zufälligen Position -> fährt zum Cookie Banner -> fährt zu Vermittlungscode bereits vorhanden -> Input Feld