309 Commits

Author SHA1 Message Date
024b556f5e bruh 2023-04-13 09:11:12 +02:00
b4c9204bf2 oh gosh 2023-04-12 18:25:12 +02:00
f810f0ee3c test 2023-04-12 14:40:32 +02:00
afac7e9539 bump 2023-04-12 13:29:40 +02:00
ae12c18270 not stable either, but something need to change 2023-04-12 13:29:06 +02:00
dfd51bc040 uéuéué faster, more reliable, ... 2023-04-12 00:01:24 +02:00
12a6968ee0 well, SadPanda is still here ;( 2023-04-09 23:41:31 +02:00
8726785dc8 random test 2023-04-08 12:08:26 +02:00
e9f629dee4 sadpanda + typo 2023-04-08 11:51:27 +02:00
c9a838d368 faster overall + better discord error + better login 2023-04-07 23:28:48 +02:00
808916ddd3 testing is everything 2023-04-07 10:04:59 +02:00
c51c463338 the passage to 5.3 wasn't justified ( at least not enough) so i added a new feature 2023-04-07 10:01:47 +02:00
a22d1e6ddb you can manually add points to database 2023-04-07 09:53:11 +02:00
93bb634f7c some fixes here and there 2023-04-06 23:41:11 +02:00
31426a1dfd well, it should be really more robust as it doesn't rely on XPATH everywhere anymore 2023-04-06 23:04:57 +02:00
f862af8699 version control 2023-04-04 21:27:02 +02:00
78e7342acf last update of the night ? 2023-04-04 21:26:40 +02:00
4d8157ba1e better stronger faster 2023-04-04 21:18:09 +02:00
661566aade no clue if that's better 2023-04-04 21:07:12 +02:00
eb2b9dc2d3 you should now start using main : it can finally pass args 2023-04-04 20:59:45 +02:00
3385540350 better way if manually updated 2023-04-04 20:50:56 +02:00
0588180dda should be good for now 2023-04-04 20:46:10 +02:00
9995bc8e25 Auto Updates ? 2023-04-04 20:37:48 +02:00
98ff0a183a always more stable (no) 2023-04-04 12:55:00 +02:00
d579a2c160 once again, should be fairly stable 2023-04-02 12:32:21 +02:00
ccf284f6e2 typo + better logic + WTF everything has failed today 2023-04-02 11:02:37 +02:00
f30832d8cd OMG finally stable ? 2023-04-01 09:51:53 +02:00
799d3d67d5 may even be stable wtf 2023-03-31 10:00:45 +02:00
f10cd8d226 still testing, but on a good way 2023-03-30 09:05:45 +02:00
e41d28c142 normalement c'est insane. Il faut juste gérer le problème de login sur le mobile. 2023-03-30 08:03:49 +02:00
b0c6a93951 bizarre l'id 2023-03-29 23:24:14 +02:00
012e923ab5 better stronger (no) 2023-03-29 23:19:57 +02:00
0cb0521da6 Don't update yet 2023-03-29 23:09:16 +02:00
c5beafe036 test 2023-03-29 14:08:44 +02:00
098b934e96 told ya 2023-03-27 22:47:29 +02:00
339775bdf4 cf previous commit 2023-03-27 22:25:35 +02:00
a2b07b9fcd well don't update till tomorrow I guess 2023-03-27 22:20:54 +02:00
d5bacd99a1 2023-03-27 16:11:17 +02:00
43035e115d sorry for the pings, 2023-03-26 23:24:59 +02:00
c1bbb26c26 no clue why this need to be addressed 2023-03-26 22:56:57 +02:00
95156bacd8 wtf was that 2023-03-26 19:47:13 +02:00
f7c6d3f65e just for me 2023-03-26 10:10:08 +02:00
4ab2530f98 Update Dockerfile 2023-03-25 18:40:17 +01:00
3ca16d1f37 Update README.md 2023-03-25 18:39:42 +01:00
db4ab3bf90 OMG I tested before commiting. (btw cookies login is now implemented) 2023-03-25 18:14:41 +01:00
6fefaca00a Create .gitignore 2023-03-25 16:34:49 +01:00
a2328c2ca7 Delete temp 2023-03-25 16:33:12 +01:00
37f002049a how to only create an empty folder ? 2023-03-25 16:32:48 +01:00
8f655a04fb well, as usual, .. 2023-03-24 20:45:13 +01:00
860c7b536a -f 2023-03-24 18:02:47 +01:00
e93d4f0baf remove some thing 2023-03-19 18:50:29 +01:00
a72c74ec05 Update README.md
ptdr not on a raspberrypi anymore
2023-03-19 12:23:42 +01:00
5282b4b434 apparently, no 2023-03-19 12:21:57 +01:00
0263f2e4c1 j'arriverais jamais a faire un truc sans 14 commits ou quoi ? 2023-03-19 10:44:00 +01:00
3324fa478d oui 2023-03-19 10:17:28 +01:00
d14e0efad9 fix ? 2023-03-18 19:43:54 +01:00
16ddd7aae9 see previous commit for explaination 2023-03-18 19:26:00 +01:00
66de4dbbd2 oh, f*ck, what have I done 2023-03-18 19:12:27 +01:00
27237354b2 didn't even worked 2023-03-18 14:21:27 +01:00
484a9692cf told you 2023-03-18 14:11:51 +01:00
ebb1847a51 maybe better, as usual, probaly don't work, wait tomorrow 2023-03-17 22:37:35 +01:00
80f6cbc919 ofc I broke something 2023-03-15 10:34:59 +01:00
dff47887bc cleaned up under the hood (better error logic) 2023-03-14 19:54:12 +01:00
d0c78d7db1 don't know 2023-03-14 16:52:46 +01:00
ebd22102ef auto remove email part 2023-03-14 16:33:44 +01:00
6ce85286dd V5 2023-03-13 13:42:40 +01:00
db557c2e3c V4 now work again. You should still switch to v5 2023-03-13 07:29:34 +01:00
2888f1d761 TODO update 2023-03-12 15:33:35 +01:00
84898cee76 fixed PlayQuizz8 (most likely ?) 2023-03-12 11:22:49 +01:00
cef0204868 removed Auto Claim feature because of ban 2023-03-12 10:59:36 +01:00
93600dd78a Merge pull request #13 from augustin64/patch-1 2023-03-09 14:30:55 +01:00
7e64604e9f Update Dockerfile
Fix dependencies
2023-03-09 14:30:29 +01:00
c28c2c573d was once again broken 2023-02-27 18:31:31 +01:00
1a4cd03ae1 some error fix 2023-02-27 13:41:54 +01:00
87195de1e5 oui 2023-02-27 13:19:46 +01:00
4631a6608c oui 2023-02-27 13:19:12 +01:00
904ad83f36 test 2023-02-27 13:16:55 +01:00
cd5ce0f6c1 Update requirements.txt 2023-02-27 13:09:01 +01:00
e28660ea7d Update requirements.txt 2023-02-27 13:08:14 +01:00
bad8be5d1f bon bah je sais pas me servir de finally 2023-02-26 12:50:23 +01:00
87b47e97fd oui 2023-02-25 19:05:47 +01:00
442dbb08d9 Merge pull request #12 from augustin64/patch-3 2023-02-13 21:03:55 +01:00
05b88945ed Update db.py
Just making sure points is not `None` (when it is not possible to get the number of points for example)
2023-02-13 19:29:54 +01:00
3770fa6451 oui:/ 2023-02-12 13:44:57 +01:00
cfbe5d7af8 Update README.md 2023-02-11 22:55:23 +01:00
510c7f7251 idk 2023-02-08 15:14:13 +01:00
5b95893bf0 oops 2023-01-30 07:32:29 +01:00
5e3282f873 euh oui 2023-01-29 00:51:30 +01:00
deb77cd3d3 now it work 2023-01-14 18:04:55 +01:00
dda61eaef9 RP support 2023-01-14 17:53:58 +01:00
8943c0e15d claim multiple things ? 2023-01-14 17:36:28 +01:00
90bcd29d36 works now 2023-01-14 17:19:52 +01:00
bb5dbb3cbd --claim amazon 2023-01-14 16:56:33 +01:00
ab8ac50fb2 finally working 2023-01-14 15:40:07 +01:00
994302d28d Update main.py 2022-12-30 16:02:48 +01:00
4723049615 Update main.py 2022-12-30 16:02:03 +01:00
dd7b62dc92 maybe better ? 2022-12-29 18:25:06 +01:00
992465c562 ok. 2022-12-29 17:56:42 +01:00
fbc8dac0e9 ya ? 2022-12-29 17:54:37 +01:00
ecfda92584 no ? 2022-12-29 17:53:45 +01:00
e4f6677da8 Please 2022-12-29 17:31:45 +01:00
9f3ccafee8 typo 2022-12-29 16:56:29 +01:00
5d64ebdb29 more logical amazon claim logic 2022-12-20 12:42:00 +01:00
45cd381c3a some things 2022-12-17 18:04:49 +01:00
ed47bae6b6 fix today's disaster 2022-12-17 17:39:48 +01:00
e7f375650d pui 2022-12-15 19:16:25 +01:00
ad513bfe9c fix languagee popup error 2022-12-11 17:15:57 +01:00
fe772048de fiexed invisible error 2022-12-11 17:04:40 +01:00
08c069ca1e je suis un pro des regexp mdrr 2022-12-03 06:33:27 +01:00
141e896cab WHY MS 2022-12-01 13:46:12 +01:00
05013cea75 fixing issues in fidelité 2022-11-26 15:07:32 +01:00
26c83c38c6 Update README.md 2022-11-26 13:18:22 +01:00
347ba86a87 pixel 2022-11-23 22:43:29 +01:00
24b2af9d10 euh uéuéué 2022-11-20 16:21:45 +01:00
dd38060253 fiexed 2022-11-19 18:11:23 +01:00
b0cdc9b779 what isn't it working 2022-11-19 18:06:19 +01:00
31ec4a1200 Update requirements.txt 2022-11-19 17:16:25 +01:00
48b4128632 Update Dockerfile 2022-11-19 17:02:28 +01:00
b9adb9c59c error handeling 2022-11-18 17:20:57 +01:00
ca0ae8917a Merge pull request #11 from augustin64/patch-2 2022-11-16 18:15:27 +01:00
80286b6a05 Update db.py 2022-11-16 18:13:36 +01:00
ebb1a8e48f Update config.py 2022-11-16 18:12:43 +01:00
f4ebb39fdf Update V4.py 2022-11-16 18:11:18 +01:00
da5e60f8b7 Please enter the commit message for your changes. Lines starting 2022-11-16 13:42:20 +01:00
0552338c22 Merge pull request #10 from augustin64/patch-1
Reset Progress
2022-11-14 22:44:34 +01:00
0aa7fd3ec0 Reset Progress
- Reset progress when "starting" an already completed task
- Reset START_TIME if override option was used
2022-11-14 22:36:56 +01:00
1be75f1987 easier to copy on discord 2022-11-14 22:21:35 +01:00
5d4dd859bd only start countdown after login (1 min later) 2022-11-12 23:48:54 +01:00
4f21ef22d4 remove some errors 2022-11-12 23:46:12 +01:00
a19e40b7e5 fixed 2022-11-12 23:31:58 +01:00
81dc0f7310 ok it's fixed 2022-11-12 23:07:51 +01:00
437afdcce4 ff override is broken don't update 2022-11-12 23:04:38 +01:00
decd289994 a tester encore un peu, mais devrais marcher 2022-11-12 23:00:45 +01:00
3c5fb6e702 SPACES 2022-11-12 21:09:07 +01:00
2f6b7f2ab9 useless 2022-11-12 17:40:03 +01:00
741a136b12 . 2022-11-11 11:29:32 +01:00
24849a9418 finally fixed 2022-11-09 22:59:12 +01:00
eae66cb163 great idee Augustin64 2022-11-09 22:54:55 +01:00
c3fc698e55 FAST DUDE 2022-11-09 19:36:22 +01:00
35db54edfc better unban 2022-11-07 22:45:26 +01:00
2fdfdb7410 Update README.md 2022-11-06 18:11:50 +01:00
368523135a Update Dockerfile 2022-11-06 18:10:44 +01:00
3189359b81 Update Dockerfile
test (wasn't really working )
2022-11-06 18:09:15 +01:00
bf675f8c96 Update Dockerfile
not useful
2022-11-06 17:57:02 +01:00
e7584702a7 test 2022-11-06 17:47:02 +01:00
c651950e7c wasn't working 2022-11-06 17:47:01 +01:00
7ad71a1cf9 Update README.md 2022-11-06 17:36:25 +01:00
8d15a555e8 should be useful 2022-11-06 13:37:12 +01:00
afec68a23e ptit truc par ci par la 2022-11-06 13:29:55 +01:00
545eea48cc better handeling of mobile login 2022-11-06 13:09:02 +01:00
f668c49e09 better 2022-11-05 15:32:13 +01:00
11eaa5189a Update README.md 2022-11-04 23:11:05 +01:00
d84ae8dd57 k 2022-11-01 10:09:12 +00:00
c9aa75e61c custom error + better code + some things 2022-10-31 14:32:39 +00:00
945497c1d4 didn't push mb 2022-10-30 11:12:00 +00:00
7882e1dbb3 finally it work again 2022-10-25 17:47:05 +00:00
92aa56aae0 some tests 2022-10-25 17:44:33 +00:00
4a434533a7 ptet que c'est utile je sais pas 2022-10-25 17:27:54 +00:00
c665144b28 I need a better solution 2022-10-25 08:03:24 +00:00
0af267e628 i was right nothing was,working as intended 2022-10-25 07:48:34 +00:00
2709d7058a OOPS 2022-10-24 19:44:32 +00:00
b28119baec kinda work, when we ignore mobile search 2022-10-24 19:35:31 +00:00
3155b545dc oh boy i probably just broke everything 2022-10-24 18:08:33 +00:00
f8e9daaedd well, not working at all is faster than working right ? 2022-10-24 08:38:11 +00:00
c71aad15df login should be two time faster 2022-10-23 17:25:04 +00:00
a7d32b6064 for me and for you (no just kidding only for me) 2022-10-22 16:15:04 +00:00
941656100c not much change, look at the code 2022-10-20 20:15:08 +00:00
170627f5a7 well user_data is made for tha 2022-10-18 14:30:27 +00:00
6796e71c5b wtf is this error 2022-10-18 10:51:55 +00:00
1505e7b756 don't send my log 2022-10-17 14:10:59 +00:00
7c4de0ff5d ouio# Please enter the commit message for your changes. Lines starting 2022-10-16 17:39:38 +00:00
8ab6c41200 Update README.md 2022-10-16 15:57:02 +02:00
ecd695f45c Update README.md 2022-10-16 15:47:58 +02:00
ac737cd048 changed name 2022-10-16 13:25:19 +00:00
48a1ca4617 forget to delete that 2022-10-16 13:21:26 +00:00
b882d0deba oui 2022-10-16 13:20:57 +00:00
ae3a89802b Merge remote-tracking branch 'refs/remotes/origin/master' 2022-10-16 13:15:29 +00:00
7137448f65 allow multiple config 2022-10-16 13:15:00 +00:00
cd94f65045 Update requirements.txt 2022-10-16 15:04:24 +02:00
a8dacf85d1 why 2022-10-16 12:57:38 +00:00
d157423bf7 Create config.default 2022-10-16 14:56:20 +02:00
fd69c86a86 test 2022-10-16 12:55:31 +00:00
e2a917925e some test as usual 2022-10-16 12:54:59 +00:00
f1b6232841 Rename config.cfg to config.default 2022-10-16 14:49:10 +02:00
6526d83e27 Rename config.cfg to user_data/config.cfg 2022-10-16 14:20:19 +02:00
14d15c4dea new structure 2022-10-16 12:19:18 +00:00
677b80f521 rename 2022-10-16 12:11:06 +00:00
65f2705726 Rename config to config.cfg
so gitignore work
2022-10-16 14:10:18 +02:00
09fd450c59 test 2022-10-16 12:08:30 +00:00
fdcc34c054 some space 2022-10-16 12:00:35 +00:00
db5973cf87 small fix, i really should make some tests 2022-10-16 11:49:06 +00:00
cec5505f3c test ? 2022-10-15 16:17:21 +02:00
ada8b95259 too fast dude 2022-10-13 07:18:08 +02:00
62f9410373 it wasn't working ? 2022-10-12 14:50:38 +02:00
23a7131792 yup 2022-10-11 21:45:47 +02:00
49cf33c780 a lot easier to edit after. 2022-10-11 21:40:41 +02:00
9f5e722a9c some space 2022-10-11 21:30:17 +02:00
6290fde32e didn't I already changed that ? 2022-10-11 21:14:53 +02:00
3d90fa64bb sometime it's in english for whatever reason 2022-10-11 13:00:44 +02:00
1e54e8af9a int_of_string points 2022-10-10 16:27:14 +02:00
43356e032a Merge branch 'master' of https://github.com/piair338/MsRewards 2022-10-10 13:37:44 +02:00
f357623a03 nice 2022-10-10 13:37:31 +02:00
4d907ba81b ofc nop 2022-10-09 13:42:45 +02:00
950f8835c3 ofc not 2022-10-09 13:36:08 +02:00
fd7feebca5 work first try ? POG 2022-10-09 13:33:13 +02:00
b8690dfd05 Check ipv6 at first start 2022-10-06 17:55:45 +02:00
7789c89d64 and functions can't be empty 2022-10-04 22:11:25 +02:00
dff9af6125 return stop function piair ... 2022-10-04 22:09:51 +02:00
6d73ba94e0 ok. 2022-09-30 16:13:36 +02:00
dac3977c71 uéuéué t'est content agustin64 2022-09-30 16:09:11 +02:00
42ad01e493 ofc 2022-09-30 15:17:29 +02:00
d4d3213db1 BON 2022-09-30 15:07:34 +02:00
a1933447f0 no 2022-09-30 15:05:58 +02:00
20f6eb6796 prevent double logpoints 2022-09-30 15:05:18 +02:00
43e970a1aa better ? 2022-09-30 14:59:54 +02:00
994af56880 i don't know what I am doing 2022-09-30 14:45:53 +02:00
712cc14368 added a risky mode, way faster 2022-09-30 14:34:50 +02:00
a1969a3e2e removed discord requirement 2022-09-30 14:26:34 +02:00
da33edb381 Merge branch 'master' of https://github.com/piair338/MsReward 2022-09-28 15:04:10 +02:00
dea767a392 some typo 2022-09-28 15:04:07 +02:00
da2471f304 Merge pull request #9 from augustin64/patch-1
Fix constant name
2022-09-25 15:37:57 +02:00
b6e30888bb Update V4.py
Fix constant name (introduced in [this commit](5b3b7c8aec))
2022-09-25 15:32:34 +02:00
d2cc6891ed Update README.md 2022-09-23 16:41:32 +02:00
556e89e2b4 finally a docker support 2022-09-23 16:34:01 +02:00
5b3b7c8aec better global constant name 2022-09-23 15:13:14 +02:00
088861e65d Update requirements.txt 2022-09-04 14:35:49 +02:00
8c1de642df Update requirements.txt 2022-09-04 14:12:37 +02:00
a4a1cb3b81 Update requirements.txt 2022-09-04 13:56:47 +02:00
2d1cc9e1c0 some tests 2022-08-30 12:00:30 +02:00
2dffe6851a date + more sleep 2022-08-30 11:28:02 +02:00
5c368ce0d0 test 2022-08-30 11:17:56 +02:00
64d70afdd5 yeah 2022-08-29 11:48:05 +02:00
c3d49cd093 fixed double login issue 2022-08-29 11:44:35 +02:00
593ddbf4fc idk anymore 2022-08-29 11:36:08 +02:00
1e33769c0d wtf 2022-08-29 11:22:45 +02:00
a3adff8130 updated to fix some things 2022-08-29 10:44:57 +02:00
2dffc31d90 accent terms 2022-08-22 11:03:20 +02:00
76c6d84105 Merge branch 'master' of https://github.com/piair338/MsReward 2022-06-28 12:27:24 +02:00
590ac8885e new user agent 2022-06-28 12:27:22 +02:00
b5e52591dd ah 2022-06-23 13:40:01 +02:00
ef5cdab883 p 2022-06-23 13:26:31 +02:00
38c24ce143 oui 2022-06-22 21:18:08 +02:00
cbdc6c9935 mistake 2022-06-22 20:22:52 +02:00
05c9d505eb test do allow docker run 2022-06-22 20:16:04 +02:00
eb3c510f82 better path handeling 2022-06-22 18:58:28 +02:00
f0f8fc324c k 2022-06-22 12:31:00 +02:00
212b92f937 yeah 2022-06-22 12:30:08 +02:00
b562930583 comming soon ® 2022-06-22 12:26:50 +02:00
776da465aa fix som issues in quiz8, where element is not found 2022-06-21 17:36:18 +02:00
a3dcf15f7d you can now cancel sleep 2022-06-21 17:22:44 +02:00
3376eaf8ac better fulllog logic 2022-06-20 18:24:29 +02:00
1eb606a62c cleander Logs 2022-06-20 18:16:15 +02:00
66d5354ac2 Check if ipv4 is used 2022-06-17 07:22:37 +02:00
ba70727b02 test smth 2022-06-17 07:10:32 +02:00
0f5c64f9d3 comments 2022-06-17 07:05:46 +02:00
fbed3ae854 not usefull messages 2022-06-16 08:21:09 +02:00
8f6f2ab5df oui. 2022-06-10 14:15:42 +02:00
a9bd8ecf9b well 2022-06-10 12:39:18 +02:00
bcb7511ecf Merge branch 'master' of https://github.com/piair338/MsReward 2022-06-10 07:07:50 +02:00
4fa9339632 reenable binmobilesearch for every computer 2022-06-10 07:07:46 +02:00
a57383b4c9 Update README.md 2022-06-09 16:35:00 +02:00
491891f4de type error 2022-06-09 16:28:30 +02:00
4f29e876b1 update point 2022-06-09 16:23:13 +02:00
b7f3bd053a fallback fidelité 2022-06-09 14:36:51 +02:00
5614a06f38 unused import + fallback logpoint 2022-06-09 14:34:02 +02:00
69e8916a05 updated login to have a fallback 2022-06-09 14:19:34 +02:00
fd22c9e176 small changes 2022-06-06 12:32:37 +02:00
fe8c1addaa oui 2022-06-02 12:39:30 +02:00
d4fcc7f769 re disabled mobile search for proxy 2022-06-02 12:29:17 +02:00
b459129d66 renabled mobile search with proxy 2022-05-31 21:33:25 +02:00
c0d2ea29c7 ... 2022-05-31 21:25:17 +02:00
c7da397f28 ? 2022-05-31 21:22:37 +02:00
e1a166ed6e some test about the proxy 2022-05-29 21:42:11 +02:00
9684a98fb3 oui 2022-05-28 11:50:45 +02:00
f5d332c26e added more delay during logging 2022-05-28 08:18:21 +02:00
bc665819e8 workarroud for now on bingMobileSearch not working with a proxy 2022-05-27 15:36:59 +02:00
e93dd60da0 still test 2022-05-27 15:28:41 +02:00
f9c5e30856 test 2022-05-27 15:26:16 +02:00
36a7fec15c oui 2022-05-27 14:54:21 +02:00
25da67077b push 2022-05-27 14:52:29 +02:00
dd0b280b28 oui 2022-05-27 14:49:25 +02:00
4dacc7b61c test 2022-05-27 14:46:23 +02:00
a85ff49f25 updated mobile login 2022-05-27 14:42:28 +02:00
e9c2ee6f95 revert modif made to mobile search 2022-05-27 14:10:29 +02:00
2bba6d8235 erreur dans la partie fidélité si le lien étais pas bon 2022-05-27 14:07:52 +02:00
cfb26f6732 test 2022-05-27 10:07:19 +02:00
e4ad601317 mobile search wtf 2022-05-27 09:50:21 +02:00
9032f56d99 test 2022-05-27 09:40:54 +02:00
b26f0c1130 test 2022-05-27 09:37:34 +02:00
365df0abcd update mobile login 2022-05-27 09:28:31 +02:00
13ab9b1acf Update README.md 2022-05-26 08:55:24 +02:00
9155fbead0 Create LICENSE 2022-05-26 08:40:03 +02:00
078bf45e67 Update issue templates 2022-05-26 08:30:50 +02:00
ac34baf215 Update README.md 2022-05-26 08:27:07 +02:00
06e65222db Updated from downloaded world list to default one 2022-05-26 08:24:36 +02:00
e5cce67a76 Merge branch 'master' of https://github.com/piair338/MsReward 2022-05-26 08:20:05 +02:00
4e4461f7f8 enable default linux worldlist support 2022-05-26 08:20:02 +02:00
54aa973d46 Defaulted to Linux default world list
You can get then with the command apt-get install wfrench
2022-05-26 07:57:53 +02:00
df0ea09662 remove trailing spaces + added some comments + dealed with error with some popus + some little things 2022-05-26 07:47:29 +02:00
5f554cc9b2 Merge pull request #8 from augustin64/patch-3
Update V4.py
2022-05-25 07:16:05 +02:00
5406b5538b may be ok 2022-05-24 22:53:02 +02:00
7e2e5cf0c2 Merge branch 'master' of https://github.com/piair338/MsReward 2022-05-24 22:43:02 +02:00
20efc9f3f6 s 2022-05-24 22:43:01 +02:00
d2ed535bf2 Update .gitignore 2022-05-24 22:42:05 +02:00
d959594e71 Create requirements.txt 2022-05-24 22:41:44 +02:00
66c979c624 STILL 2022-05-24 22:39:18 +02:00
3bebee9c13 AS WELL 2022-05-24 22:38:23 +02:00
fa8d27db0f STILL BUGGED 2022-05-24 22:38:13 +02:00
d0f76720f6 WARNING this has not beeing tested yet 2022-05-24 22:32:38 +02:00
24 changed files with 2479 additions and 1070 deletions

View File

@ -1,8 +1,32 @@
if you have a rare bug, i'll not fix it. If you have a reccurent bug, send :
| python version |
| --- |
| page.html |
screenshot of error
---
and i may try to fix it.
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem, and the html file if there is an error.
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
**Additional context**
Add any other context about the problem here.

View File

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

10
.gitignore vendored
View File

@ -1,9 +1,15 @@
/old
geckodriver.log
config
.vscode/settings.json
.vscode/
update.sh
/Git
page.html
screenshot.png
login.csv
data
**/__pycache__
/user_data
install.sh
nohup.out
test.py
points.csv

36
Dockerfile Normal file
View File

@ -0,0 +1,36 @@
FROM python:3.10
ENV DEBIAN_FRONTEND noninteractive
ENV GECKODRIVER_VER v0.31.0
ENV FIREFOX_VER 87.0
WORKDIR /app
RUN set -x \
&& apt update \
&& apt upgrade -y \
&& apt install -y \
wfrench \
git \
libx11-xcb1 \
libdbus-glib-1-2 \
libasound2 \
libgtk-3-0 \
xvfb \
nano \
tigervnc-standalone-server \
&& git clone https://github.com/piair338/MsRewards \
&& pip install -r MsRewards/requirements.txt \
&& curl -sSLO https://download-installer.cdn.mozilla.net/pub/firefox/releases/91.9.1esr/linux-x86_64/en-US/firefox-91.9.1esr.tar.bz2 \
&& tar -jxf firefox-* \
&& mv firefox /opt/ \
&& chmod 755 /opt/firefox \
&& chmod 755 /opt/firefox/firefox \
&& ln -s /opt/firefox/firefox /usr/bin/firefox \
&& curl -sSLO https://github.com/mozilla/geckodriver/releases/download/${GECKODRIVER_VER}/geckodriver-${GECKODRIVER_VER}-linux64.tar.gz \
&& tar zxf geckodriver-*.tar.gz \
&& mv geckodriver /usr/bin/
WORKDIR /app/MsRewards
CMD python main.py

674
LICENSE Normal file
View File

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@ -1,18 +1,50 @@
# MsReward
A Microsoft reward automator, designed to work headless on a raspberry pi. Tested with a pi 3b+ and a pi 4 2Gb .
Using a discord webhook to log everything.
Using Selenium and geckodriver.
You have to fill the config file.
A Microsoft reward automator, designed to work headless on any server.
Using a discord webhook or SQL to log points everyday.
Using Selenium and Geckodriver.
you have to put your credentials in the same folder as the script, in a `.csv` file. You have to put login and password this way :
## If you're using docker (way easier)
to use docker, run
```
email1,password1
email2,password2
sudo docker build .
#copy the build id
sudo docker run -ti --name MsRewards [build id]
```
Then, fill the config and start the program everyday with
```
sudo docker start MsRewards
```
You have to put a list with a dictionnary in the same folder as the script, in a `.txt` file. It should have a lot of words, used to make random search on bing, as shown in the example file.
Tou can add a link to a website where content is only the link of the monthly fidelity card
You should limit to 6 account per IP.
## Other configuration
To use the database, I recommend MySql, Create a database with the name you want and create a table `daily`, like the one from the image :
![B96F2F6D-7257-4F12-BFA7-0BEC3FB72993](https://user-images.githubusercontent.com/74496300/172872979-05396b6b-b682-471a-b71b-41602d816504.jpeg)
You have to use the default world list (`sudo apt install wfrench`). The language is french by default, but you can change it if you want.
You can add a link to a website where content is only the link of the monthly fidelity card.
You should limit to 6 account per IP, and DON'T USE outlook account, they are banned.
![image](https://user-images.githubusercontent.com/74496300/155960737-061229ca-db8c-4e66-9aef-542d9e709bb2.png)
## If you're **not** using docker
installation recommandation :
```
sudo apt-get install xdg-utils libdbus-glib-1-2 bzip2 wfrench tigervnc-standalone-server -y
curl -sSLO https://download-installer.cdn.mozilla.net/pub/firefox/releases/91.9.1esr/linux-x86_64/en-US/firefox-91.9.1esr.tar.bz2
tar -xjf firefox-91.9.1esr.tar.bz2
sudo mv firefox /opt/
sudo ln -s /opt/firefox/firefox /usr/bin/firefox
curl -sSLO https://github.com/mozilla/geckodriver/releases/download/v0.31.0/geckodriver-v0.31.0-linux64.tar.gz
tar zxf geckodriver-v0.31.0-linux64.tar.gz
sudo mv geckodriver /usr/bin/
rm geckodriver-v0.31.0-linux64.tar.gz
rm firefox-91.9.1esr.tar.bz2
```

1021
V4.py

File diff suppressed because it is too large Load Diff

844
V5.py Executable file
View File

@ -0,0 +1,844 @@
#!/usr/bin/python3.10
from modules.imports import *
from modules.db import add_to_database
from modules.config import *
from modules.tools import *
from modules.error import *
from modules.driver_tools import *
import modules.globals as g
driver = g.driver
display = g.display
# TODO
# handle "panda"'s error: error while logging in preventing some task to be done SadPanda.svg:
# create a webdriver
def firefox_driver(mobile=False, headless=False):
PC_USER_AGENT = (
"Mozilla/5.0 (Windows NT 10.0; Win64; x64)"
"AppleWebKit/537.36 (KHTML, like Gecko)"
"Chrome/112.0.0.0 Safari/537.36 Edg/110.0.1587.56")
MOBILE_USER_AGENT = (
"Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X)"
"AppleWebKit/606.0.2 (KHTML, like Gecko)"
"CriOS/107.0.5060.64 Mobile/15E148 Safari/604.1"
)
options = Options()
options.set_preference('intl.accept_languages', 'fr-FR, fr')
if proxy_enabled :
setup_proxy(proxy_address,proxy_port, options)
options.set_preference("browser.link.open_newwindow", 3)
options.set_preference("dom.confirm_repost.testing.always_accept", True)
if FAST :
options.set_preference("permissions.default.image", 2) #disable image loading. You shouldn't use it except if really nessecary
if headless:
options.add_argument("-headless")
if mobile :
options.set_preference("general.useragent.override", MOBILE_USER_AGENT)
driver = webdriver.Firefox(options=options)
driver.set_window_size(1070 + hash(g._mail)%20 , 1900 + hash(g._password + "salt")%10) # mobile resolution are crazy high now, right ?
else :
options.set_preference("general.useragent.override", PC_USER_AGENT)
driver = webdriver.Firefox(options=options)
driver.set_window_size(1900 + hash(g._mail)%20 , 1070 + hash(g._password + "salt")%10)
return(driver)
def log_error(error, ldriver=driver, log=FULL_LOG):
global driver
if ldriver is None:
ldriver = driver
if type(error) != str :
error = format_error(error)
printf(f"\n\n\033[93m Erreur : {str(error)} \033[0m\n\n")
if DISCORD_ENABLED_ERROR:
with open("page.html", "w") as f:
try :
f.write(ldriver.page_source)
except :
f.write("the driver has closed or crashed. Can't access page content")
try :
img = display.waitgrab()
img.save("screenshot.png")
except :
ldriver.save_screenshot("screenshot.png")
if not log:
embed = Embed(
title="An Error has occured",
description=str(error),
colour=Colour.red(),
)
else:
embed = Embed(
title="Full log is enabled",
description=str(error),
colour=Colour.blue(),
)
file = File("screenshot.png")
embed.set_image(url="attachment://screenshot.png")
embed.set_footer(text=g._mail)
webhookFailure.send(embed=embed, username="error", file=file, avatar_url = AVATAR_URL)
webhookFailure.send(username="error", file=File("page.html"), avatar_url = AVATAR_URL)
# close the tab currently on and go back to the one first, or the one specified
def close_tab(tab, SwitchTo=0) -> None:
driver.switch_to.window(tab)
driver.close()
driver.switch_to.window(driver.window_handles[SwitchTo])
# play_quiz[N]([int : override]) make the quiz with N choice each time. They usually have between 4 and 10 questions.
# override is the number of question, by default, it's the number of question in this specific quiz. Can be useful in some case, where the program crashes before finishing the quiz
def play_quiz2(override=10) -> None:
printf("starting play_quiz2")
for j in range(override):
try:
# rgpd_popup(driver)
custom_sleep(uniform(3, 5))
page_html = driver.page_source
secret_answer = search('IG:"([^"]+)"', page_html)[1] # variable used to calculate offset
answers_values = search('data-option="([^"]+)"', page_html)[1]
offset = int(secret_answer[-2:], 16) # the last two character converted to int are the offset
correct_answer_value = search('correctAnswer":"([0-9]+)', page_html)[1]
somme = 0
for answer in answers_values:
somme += ord(answer)
if somme + offset == int(correct_answer_value):
answer_elem = driver.find_element(By.ID, "rqAnswerOption0")
answer_elem.click()
progressBar(j, 10, name="quiz 2")
else:
answer_elem = driver.find_element(By.ID, "rqAnswerOption1")
answer_elem.click()
progressBar(j, 10, name="quiz 2")
except exceptions.ElementNotInteractableException as e:
driver.execute_script("arguments[0].click();", answer_elem)
except Exception as e:
log_error(e)
break
printf("play_quiz2 done")
def play_quiz8():
override = len(findall("<span id=\"rqQuestionState.\" class=\"emptyCircle\"></span>", driver.page_source))+1
printf(f"play_quiz8 : start, override : {override}")
try:
counter = 0
# rgpd_popup(driver)
for _ in range(override):
sleep(uniform(3, 5))
correct_answers = []
for i in range(1,9):
try :
element = driver.find_element(By.ID, f"rqAnswerOption{i-1}")
if 'iscorrectoption="True"' in element.get_attribute("outerHTML"):
correct_answers.append(f'rqAnswerOption{i-1}')
except Exception as e :
printf(f"can't find rqAnswerOption{i-1}. Probably already clicked" + str(e))
shuffle(correct_answers)
for answer_id in correct_answers:
wait_until_visible(By.ID, answer_id, timeout = 20, browser=driver)
counter += 1
progressBar(counter, 16, name="Quiz 8")
try:
answer_elem = driver.find_element(By.ID, answer_id)
answer_elem.click()
sleep(1)
except exceptions.NoSuchElementException :
driver.refresh()
sleep(10)
answer_elem = driver.find_element(By.ID, answer_id)
answer_elem.click()
except ElementClickInterceptedException :
rgpd_popup(driver)
correct_answers.append(answer_id)
except Exception as e:
log_error(f"{format_error(e)} \n Good answers : {' '.join(correct_answers)}")
printf("play_quiz8 : fin ")
def play_quiz4(override=None):
printf("play_quiz4 : start")
if not override:
try: # fidelity quiz are much longer than usual ones
override = int(findall('rqQuestionState([\d]{1,2})"', driver.page_source)[-1])
printf(f"Override : {override}")
except:
override = 3
try:
for i in range(override):
custom_sleep(uniform(3, 5))
txt = driver.page_source
# rgpd_popup(driver)
answer_option = search('correctAnswer":"([^"]+)', txt)[1]
answer_option = answer_option.replace("\\u0027", "'") # replace Unicode weird symbols
try:
answer_element = driver.find_element(By.CSS_SELECTOR, f'[data-option="{answer_option}"]')
answer_element.click()
except exceptions.ElementNotInteractableException:
driver.execute_script("arguments[0].click();", answer_element)
except Exception as e:
log_error(e)
raise ValueError(e)
printf("play_quiz4 : end")
# do_poll() answer a random thing to poll, on of daily activities
def do_poll():
printf("do_poll : start")
try:
try:
answer_elem = driver.find_element(By.ID, f"btoption{choice([0,1])}")
answer_elem.click()
except exceptions.ElementNotInteractableException:
driver.execute_script("arguments[0].click();", answer_elem)
custom_sleep(uniform(2, 2.5))
except Exception as error:
log_error(error)
raise ValueError(error)
printf("do_poll : end")
# finds all task to do, and launch them
def all_cards(): # return to the main page and closes all other tabs
def reset(part2=False):
if len(driver.window_handles) == 1:
driver.get("https://www.bing.com/rewardsapp/flyout")
if part2:
row_element = driver.find_elements(By.CSS_SELECTOR, f'[class="i-h rw-sh fp_row"]')[1]
expanded = row_element.get_attribute("aria-expanded")
if expanded != "true":
row_element.click()
else:
driver.switch_to.window(driver.window_handles[1])
printf(f"fermeture : {driver.current_url}")
driver.close()
driver.switch_to.window(driver.window_handles[0])
if driver.current_url != "https://www.bing.com/rewardsapp/flyout":
driver.get("https://www.bing.com/rewardsapp/flyout")
reset(part2)
def daily_cards(): # cartes de la premiere partie (renouvelée chaque jour).
try:
# make sure that the daily area is expanded
row_element = driver.find_elements(By.CSS_SELECTOR, f'[class="i-h rw-sh fp_row"]')[0]
expanded = row_element.get_attribute("aria-expanded")
if expanded != "true":
row_element.click()
for i in range(3):
custom_sleep(uniform(3, 5))
try:
titre = "Placeholder"
elm = driver.find_elements(By.CLASS_NAME, 'promo_cont')
elm[i].click()
sleep(1)
titre = driver.title
try_play(titre)
sleep(1)
reset()
printf(f"DailyCard {titre} ok")
except Exception as e:
log_error(f"all_cards card `{titre}` error ({format_error(e)})")
break
try : # devrait renvoyer vrai si la carte i est faite ou pas, a l'aide su symbole en haut a droite de la carte
elm = driver.find_elements(By.CLASS_NAME, 'promo_cont')[i]
if not ("correctCircle" in elm.get_attribute("innerHTML")):
printf(f"missed card {i}")
elm.click()
try_play("recovery")
sleep(3)
reset()
else :
printf(f'carte OK')
except Exception as e :
printf(format_error(e) + " probablement ok - check card")
# if it fail, it's probably okay -> when all three card are done, the pannel fold
except Exception as e:
log_error(e)
def weekly_cards():
# make sure that the weekly area is expanded
row_element = driver.find_elements(By.CSS_SELECTOR, f'[class="i-h rw-sh fp_row"]')[1]
expanded = row_element.get_attribute("aria-expanded")
if expanded != "true":
row_element.click()
for i in range(20): # Should raise an error whene there is no card left
elm = driver.find_elements(By.CLASS_NAME, 'promo_cont')
try :
elm[0].click()
printf(f"Carte {i+1} cliquée.")
except Exception as e :
printf(f"Plus aucune carte.")
break
driver.switch_to.window(driver.window_handles[len(driver.window_handles) - 1])
sleep(1)
titre = driver.title.split(" - Recherche")[0]
printf(f"Carte `{titre}` en cours.")
try_play(titre)
reset(True)
sleep(1)
def top_cards():
for _ in range(2):
try :
driver.find_elements(By.CSS_SELECTOR, '[class="banner_cont single wpoints"]')[0].click()
reset()
except Exception as e:
printf(format_error(e))
break
try :
top_cards()
except Exception as e:
log_error(e)
try:
daily_cards()
except Exception as e:
log_error(e)
try :
weekly_cards()
except Exception as e:
log_error(e)
# Find out which type of action to do
def try_play(nom="inconnu"):
# rgpd_popup(driver)
def play(number):
if number == 8 or number == 9:
try:
printf(f"\033[96mQuiz 8 detected on `{nom}` \033[0m")
play_quiz8()
printf(f"\033[92mQuiz 8 succeeded on `{nom}` \033[0m")
custom_sleep(uniform(3, 5))
except Exception as e:
printf(f"fail of PlayQuiz 8. Aborted {e} \033[0m")
elif number == 5 or number == 4:
try:
printf(f"\033[96mQuiz 4 detected on `{nom}` \033[0m")
play_quiz4()
printf(f"\033[92mQuiz 4 succeeded on `{nom}` \033[0m")
custom_sleep(uniform(3, 5))
except Exception as e:
printf(f"Fail of PlayQuiz 4. Aborted {e} \033[0m")
elif number == 3 or number == 2:
try:
printf(f"\033[96mQuiz 2 detected on `{nom}`\033[0m")
play_quiz2()
printf(f"\033[92mQuiz 2 succeeded on `{nom}`\033[0m")
except Exception as e:
printf(f"fail of PlayQuiz 2. Aborted {e}")
else:
log_error("There is an error. rqAnswerOption present in page but no action to do. skipping.")
try:
driver.find_element(By.ID, "rqStartQuiz").click() # start the quiz
answer_number = driver.page_source.count("rqAnswerOption")
play(answer_number)
except Exception as e: # if there is no start button, an error is thrown
if "bt_PollRadio" in driver.page_source:
try:
printf("Poll detected")
do_poll()
printf("Poll succeeded")
except Exception as e:
printf(f"try_play - 1 - Poll aborted {e}")
elif "rqQuestionState" in driver.page_source:
try:
number = driver.page_source.count("rqAnswerOption")
printf(f"recovery détecté. quiz : {number}")
play(number-1)
except Exception as e:
printf(f"try_play - 2 - {e}")
elif search("([0-9]) de ([0-9]) finalisée", driver.page_source):
printf("fidélité")
fidelity()
else:
printf(f"rien à faire sur la page {nom}")
custom_sleep(uniform(3, 5))
# Login with password or with cookies.
# The driver should be in the same state on both case
def pwd_login(ldriver):
printf("pwd_login : start")
ldriver.get("https://login.live.com")
wait_until_visible(By.ID, "i0116", browser = ldriver)
mail_elem = ldriver.find_element(By.ID, "i0116")
send_keys_wait(mail_elem, g._mail)
mail_elem.send_keys(Keys.ENTER)
wait_until_visible(By.ID, "i0118", browser = ldriver)
pwd_elem = ldriver.find_element(By.ID, "i0118")
send_keys_wait(pwd_elem, g._password)
pwd_elem.send_keys(Keys.ENTER)
custom_sleep(2)
# 2FA
if "Entrez le code de sécurité" in ldriver.page_source :
try :
a2f_elem = ldriver.find_element(By.ID, "idTxtBx_SAOTCC_OTC")
a2f_elem.send_keys(g._otp.now())
a2f_elem.send_keys(Keys.ENTER)
except Exception as e :
log_error(e)
def cookie_login(ldriver):
printf("cookies_login : start")
ldriver.get("https://login.live.com")
try :
load_cookies(ldriver)
except FileNotFoundError :
printf("No cookies file Found.")
return(False)
ldriver.refresh()
return(True)
# Accept all cookies question, and check if the account is locked
def login_part_2(ldriver, cookies = False):
custom_sleep(5)
if ('Abuse' in ldriver.current_url) :
raise Banned()
if cookies:
save_cookies(ldriver)
for id in ["KmsiCheckboxField", "id__0", "iLooksGood", "idSIButton9", "iCancel"]:
if get_domain(ldriver) == "account.microsoft.com":
break
try:
ldriver.find_element(By.ID, id).click()
restart = True
except Exception as e:
pass
wait_until_visible(By.CSS_SELECTOR, '[data-bi-id="sh-sharedshell-home"]', 20, ldriver)
ldriver.get("https://www.bing.com")
rgpd_popup(ldriver)
ldriver.refresh()
rgpd_popup(ldriver)
ldriver.get("https://account.microsoft.com/")
if wait_until_visible(By.CSS_SELECTOR, '[data-bi-id="sh-sharedshell-home"]', 30, ldriver) :
return(True) #the account logging was successful
else :
log_error("Error during login. Trying to refresh")
ldriver.refresh()
return(wait_until_visible(By.CSS_SELECTOR, '[data-bi-id="sh-sharedshell-home"]', 30, ldriver))
#going to MsRewards
def go_to_msrewards(ldriver):
for i in ["[h='ID=RewardsFlyout,2.1']", f'[title="Rejoindre maintenant"]', f'[title="Rejoindre"]', f'[title="Join now"]'] :
ldriver.get("https://www.bing.com/rewardsapp/flyout")
if ('>Tableau de bord' in ldriver.page_source) :
printf('On MsRewards flyout')
return(True)
try:
ldriver.find_element(By.CSS_SELECTOR, i).click() # depend of the language of the page
except:
printf(f"element {i} not found")
# login() tries to login to your Microsoft account.
# it uses global variable g._mail and g._password to login
def login(ldriver):
try :
success_cookies = cookie_login(ldriver)
if not success_cookies:
pwd_login(ldriver)
login_part_2(ldriver, not success_cookies)
go_to_msrewards(ldriver)
except Banned:
raise Banned()
except Exception as e:
log_error(e)
ldriver.quit()
return(False)
# Makes 30 search as PC Edge
def bing_pc_search(override=randint(35, 40)):
mot = choice(Liste_de_mot).replace(" ","+")
driver.get(f"https://www.bing.com/search?q={mot}") # {choice(Liste_de_mot)}')
custom_sleep(uniform(1, 2))
rgpd_popup(driver)
send_keys_wait(
driver.find_element(By.ID, "sb_form_q"),
Keys.BACKSPACE + Keys.BACKSPACE + Keys.BACKSPACE + Keys.BACKSPACE + Keys.BACKSPACE + Keys.BACKSPACE
)
for _ in range(override):
word = choice(Liste_de_mot)
try:
send_keys_wait(driver.find_element(By.ID, "sb_form_q"), word)
driver.find_element(By.ID, "sb_form_q").send_keys(Keys.ENTER)
except Exception as e :
printf(e)
sleep(10)
driver.get(f'https://www.bing.com/search?q={word}')
sleep(3)
send_keys_wait(driver.find_element(By.ID, "sb_form_q"), word)
driver.find_element(By.ID, "sb_form_q").send_keys(Keys.ENTER)
custom_sleep(uniform(3, 7))
try:
driver.find_element(By.ID, "sb_form_q").clear()
except Exception as e:
printf(e)
try:
driver.get('https://www.bing.com/search?q=plans')
driver.find_element(By.ID, "sb_form_q").clear()
except Exception as e:
log_error(f"clear la barre de recherche - {format_error(e)}")
# Unban an account, called with -u parameter. You will need a phone number
def unban() -> None:
driver.find_element(By.ID, "StartAction").click()
custom_sleep(2)
txt = driver.page_source
uuid0 = findall('wlspispHIPCountrySelect([a-z0-9]+)', txt)[0]
uuid1 = findall('wlspispHIPPhoneInput([a-z0-9]+)', txt)[0]
uuid2 = findall('wlspispHipSendCode([a-z0-9]+)', txt)[0]
uuid3 = findall('wlspispSolutionElement([a-z0-9]+)', txt)[0]
country_code_select = Select(driver.find_element(By.ID, "wlspispHIPCountrySelect" + uuid0))
country_code_input = input("enter Country code (FR, ...) ")
country_code_select.select_by_value(country_code_input)
wait_until_visible(By.ID, "wlspispHIPPhoneInput" + uuid1, browser=driver)
phone_input = input("phone number : +33")
phone_elem = driver.find_element(By.ID, "wlspispHIPPhoneInput" + uuid1)
phone_elem.send_keys(phone_input)
wait_until_visible(By.ID, "wlspispHipSendCode" + uuid2, browser=driver)
send_sms_elem = driver.find_element(By.ID, "wlspispHipSendCode" + uuid2)
send_sms_elem.click()
wait_until_visible(By.ID, "wlspispSolutionElement" + uuid3, browser=driver)
sms_code_elem = driver.find_element(By.ID, "wlspispSolutionElement" + uuid3)
sms_code_input = input("entrez le contenu du msg : ")
sms_code_elem.send_keys(sms_code_input)
send_box = driver.find_element(By.ID, "ProofAction")
send_box.click()
wait_until_visible(By.ID, "FinishAction", browser=driver)
end_elem = driver.find_element(By.ID, "FinishAction")
end_elem.click()
# Sends points to database, discord and whatever service you want
def log_points(account="unknown"):
def get_points():
driver.get("https://rewards.bing.com")
custom_sleep(1)
if "/proofs/" in driver.current_url:
for id in ["KmsiCheckboxField","iLooksGood", "idSIButton9", "iCancel"]:
try:
driver.find_element(By.ID, id).click()
restart = True
except Exception as e:
pass
wait_until_visible(By.CSS_SELECTOR, 'span[mee-element-ready="$ctrl.loadCounterAnimation()"]', browser=driver)
try :
point = search('availablePoints\":([\d]+)', driver.page_source)[1]
except Exception as e:
sleep(5)
log_error(f"Dev error, checking why it doesn't work (waited a bit, is this still white ?) {format_error(e)}", driver, True)
driver.refresh()
sleep(5)
point = search('availablePoints\":([\d]+)', driver.page_source)[1]
return(point)
for _ in range (3):
try :
points = get_points()
break
except Exception as e:
custom_sleep(300)
log_error(e)
points = None
if not points :
log_error(f"impossible d'avoir les points")
custom_sleep(uniform(3, 20))
account_name = account.split("@")[0]
if DISCORD_ENABLED_SUCCESS:
if DISCORD_EMBED:
embed = Embed(
title=f"{account_name} actuellement à {str(points)} points", colour=Colour.green()
)
embed.set_footer(text=account_name)
webhookSuccess.send(embed=embed)
else:
webhookSuccess.send(f"{account_name} actuellement à {str(points)} points")
if sql_enabled :
add_to_database(account_name, points, sql_host, sql_usr, sql_pwd, sql_database)
def fidelity():
try:
while 1: #close all tabs
try:
close_tab(1)
except:
break
try :
fidelity_link_page = get(FidelityLink) #get the url of fidelity page
except Exception as e :
printf(e)
fidelity_link_page = False
if fidelity_link_page :
fidelity_link = fidelity_link_page.content.decode("UTF-8")
if (fidelity_link.split(":")[0] == "https") or (fidelity_link.split(":")[0] == "http") :
driver.get(fidelity_link)
wait_until_visible(By.CSS_SELECTOR, 'div[class="pull-left spacer-48-bottom punchcard-row"]', browser=driver)
try :
choix = driver.find_element(By.CSS_SELECTOR, 'div[class="pull-left spacer-48-bottom punchcard-row"]') # pull-left spacer-48-bottom punchcard-row? USELESS ?
except : # tentative de fix
driver.execute_script("location.reload(true);")
wait_until_visible(By.CSS_SELECTOR, 'div[class="pull-left spacer-48-bottom punchcard-row"]', browser=driver)
choix = driver.find_element(By.CSS_SELECTOR, 'div[class="pull-left spacer-48-bottom punchcard-row"]')
answer_number = search("([0-9]) of ([0-9]) completed", driver.page_source)
if answer_number is None:
answer_number = search("([0-9]) de ([0-9]) finalisé", driver.page_source)
if answer_number is None :
answer_number = search("([0-9]) licence\(s\) sur ([0-9]) disponible\(s\)", driver.page_source)
if answer_number is None :
answer_number = search("([0-9])&nbsp;défi\(s\) terminé\(s\) sur ([0-9])", driver.page_source)
if answer_number is None :
answer_number = [0,0,0]
for _ in range(int(answer_number[2]) - int(answer_number[1])):
driver.refresh()
custom_sleep(2)
card_elem = driver.find_element(By.CLASS_NAME, "spacer-48-bottom")
try :
button_text = search('<span class="pull-left margin-right-15">([^<^>]+)</span>',card_elem.get_attribute("innerHTML"))[1]
bouton_card = driver.find_element(By.XPATH, f'//span[text()="{button_text}"]')
bouton_card.click()
except Exception as e1 :
try :
recover_elem = driver.find_element(By.XPATH,'/html/body/div[1]/div[2]/main/div[2]/div[2]/div[7]/div[3]/div[1]/a')
recover_elem.click()
except Exception as e2 :
log_error(f"fidélité - double erreur - e1 : {format_error(e1)} - e2 {format_error(e2)}")
break
custom_sleep(uniform(3, 5))
driver.switch_to.window(driver.window_handles[1])
try_play(driver.title)
driver.get(fidelity_link) # USELESS ?
custom_sleep(uniform(3, 5))
try:
close_tab(driver.window_handles[1])
except Exception as e:
printf(e)
printf("fidelity - done")
else :
printf("invalid fidelity link.")
except Exception as e:
log_error(e)
def mobile_alert_popup():
try:
alert = mobile_driver.switch_to.alert
alert.dismiss()
except exceptions.NoAlertPresentException as e:
pass
except Exception as e:
log_error(e, mobile_driver)
def bing_mobile_search(override=randint(22, 25)):
global mobile_driver
mobile_driver = firefox_driver(mobile=True)
try:
login(mobile_driver)
mot = choice(Liste_de_mot).replace(" ","+")
mobile_driver.get(f"https://www.bing.com/search?q={mot}")
custom_sleep(uniform(1, 2))
rgpd_popup(mobile_driver)
custom_sleep(uniform(1, 1.5))
for i in range(override): # 20
try :
mot = choice(Liste_de_mot)
send_keys_wait(mobile_driver.find_element(By.ID, "sb_form_q"), mot)
mobile_driver.find_element(By.ID, "sb_form_q").send_keys(Keys.ENTER)
custom_sleep(uniform(3, 7))
mobile_alert_popup() # check for alert (asking for position or for allowing notifications)
mobile_driver.find_element(By.ID, "sb_form_q").clear()
except Exception as e:
printf(e)
mobile_driver.refresh()
custom_sleep(30)
i -= 1
mobile_driver.quit()
except Exception as e:
log_error(e, mobile_driver)
mobile_driver.quit()
def daily_routine(custom = False):
try :
if not custom: # custom already login
login(driver)
except Banned :
log_error("THIS ACCOUNT IS BANNED. FIX THIS ISSUE WITH -U")
return()
try:
all_cards()
except Exception as e:
log_error(e)
try:
fidelity()
except Exception as e:
log_error(e)
try:
bing_pc_search()
except Exception as e:
log_error(e)
try:
bing_mobile_search()
except Exception as e:
log_error(e)
try:
log_points(g._mail)
except Exception as e:
log_error(e)
def dev():
input("paused")
def CustomStart(Credentials):
global START_TIME
if not LINUX_HOST :
raise NameError('You need to be on linux to do that, due to the utilisation of a module named enquieries, sorry.')
global driver, p
system("clear") # clear from previous command to allow a clean choice
actions = ["tout", "daily", "pc", "mobile", "log_points","fidelity", "dev"]
Actions = enquiries.choose("quels Actions ?", actions, multi=True)
liste = select_accounts()
START_TIME = time() # Reset timer to the start of the actions
for cred in liste:
g._mail = cred[0]
g._password = cred[1]
if len(cred) == 3:
g._otp = TOTP(cred[2])
driver = firefox_driver()
driver.implicitly_wait(3)
if login(driver) != "STOP":
if "tout" in Actions:
daily_routine(True)
if "daily" in Actions:
try:
all_cards()
except Exception as e:
log_error(e)
if "pc" in Actions:
try:
bing_pc_search()
except Exception as e:
log_error(e)
if "mobile" in Actions:
try:
bing_mobile_search()
except Exception as e:
log_error(e)
if "fidelity" in Actions:
try :
fidelity()
except Exception as e :
log_error(e)
if "dev" in Actions:
try:
dev()
except Exception as e:
printf(e)
break
if not "tout" in Actions:
try:
log_points(g._mail)
except Exception as e:
printf(f"CustomStart {e}")
driver.close()
if VNC_ENABLED :
display = SmartDisplay(backend="xvnc", size=(2160, 2160), rfbport=VNC_PORT, color_depth=24)
else :
display = SmartDisplay(size=(2160, 2160))
display.start()
if CUSTOM_START:
CustomStart(Credentials)
elif UNBAN:
g._mail, g._password = select_accounts(False)[0]
driver = firefox_driver()
try :
login(driver)
except Banned:
unban()
driver.quit()
elif POINTS_FILE != "":
save_points_from_file(POINTS_FILE)
else:
if UPDATE_VERSION != "None":
if DISCORD_ENABLED_ERROR:
webhookFailure.send(f"Updated to {UPDATE_VERSION}", username="UPDATE", avatar_url="https://cdn-icons-png.flaticon.com/512/1688/1688988.png")
for cred in Credentials:
g._mail = cred[0]
g._password = cred[1]
if len(cred) == 3:
g._otp = TOTP(cred[2])
custom_sleep(1)
printf("Début du driver.")
driver = firefox_driver()
printf("Driver demarré.")
driver.implicitly_wait(3)
try:
daily_routine()
driver.quit()
attente = uniform(1200, 3600)
printf(f"finis. attente de {round(attente/60)}min")
custom_sleep(attente)
except KeyboardInterrupt:
printf("Canceled. Closing driver and display.")
driver.quit()
display.stop()
except Exception as e:
printf(f"Error not catched. Skipping this account. {e}")
driver.quit()
display.stop()

29
config
View File

@ -1,29 +0,0 @@
[PATH]
motpath = /your/path/to/words_list.txt
logpath = /your/path/to/loginandpass.csv
[SETTINGS]
FidelityLink = Null
embeds = False
Headless = True
[DISCORD]
successlink = https://discord.com/api/webhooks/[put your webhook here]
errorlink =https://discord.com/api/webhooks/[put your webhook here]
[PROXY]
enabled = False
url = Null
port = 0
[DATABASE]
enabled = False
host = Null
database = MsRewards
usr = root
pwd = password

92
database.py Normal file
View File

@ -0,0 +1,92 @@
import mysql.connector
import configparser
from os import path
import argparse
parser = argparse.ArgumentParser()
parser.add_argument(
"-f",
"--file",
help="Choose a file",
type=argparse.FileType('r')
)
parser.add_argument(
"-m",
"--manual",
help="add point manually do database",
dest="manual",
action="store_true"
)
args = parser.parse_args()
MANUAL = args.manual
config_path = "./user_data/config.cfg"
config = configparser.ConfigParser()
config.read(config_path)
sql_usr = config["SQL"]["usr"]
sql_pwd = config["SQL"]["pwd"]
sql_host = config["SQL"]["host"]
sql_database = config["SQL"]["database"]
mydb = mysql.connector.connect(
host=sql_host,
user=sql_usr,
password=sql_pwd,
database = sql_database
)
mycursor = mydb.cursor()
def add_account(name: str, endroit: str, proprio: str):
command = f'INSERT INTO comptes (compte, proprio, endroit, last_pts) VALUES ("{name}", "{proprio}", "{endroit}",0);'
mycursor.execute(command)
def ban_account(name: str, pts = 0):
command1 = f"INSERT INTO banned (nom, total) VALUES ('{name}', {pts});"
command2 = f'DELETE FROM comptes WHERE compte = "{name}";'
mycursor.execute(command1)
mycursor.execute(command2)
def update_pts(name: str, pts = 0):
pass
if not MANUAL :
print("ajouter un compte : 1\nban un compte : 2")
i = input()
if i == "1":
if args.file :
l =[x.split(",")[0].split("@")[0] for x in args.file.readlines()]
endroit = input("ou est le bot ? ")
proprio = input("qui est le proprio ? ")
for name in l :
add_account(name, endroit, proprio)
else :
name = input("quel est le nom ? ").split("@")[0]
endroit = input("ou est le bot ? ")
proprio = input("qui est le proprio ? ")
add_account(name, endroit, proprio)
elif i == '2':
name = input("quel est le compte qui a été ban ? ")
pts = input("il avait combien de points ? ")
ban_account(name, pts)
mydb.commit()
mycursor.close()
mydb.close()
else :
import modules.db as datab
config_path = f"{path.abspath(path.dirname(path.dirname( __file__ )))}/MsRewards/user_data/config.cfg"
print(config_path)
config = configparser.ConfigParser()
config.read(config_path)
sql_usr = config["SQL"]["usr"]
sql_pwd = config["SQL"]["pwd"]
sql_host = config["SQL"]["host"]
sql_database = config["SQL"]["database"]
account_name = input("compte ? ")
points = int(input("points ? "))
datab.add_to_database(account_name, points, sql_host, sql_usr, sql_pwd, sql_database)

View File

@ -1 +0,0 @@
you,have,to,add,a,lots,of,words,like,this,separated,with,a,coma

185
main.py Normal file
View File

@ -0,0 +1,185 @@
#/usr/bin/python3.10
from packaging.version import parse as parse_version
import configparser
import os
import shutil
import requests
import sys
config = configparser.ConfigParser()
try :
config_path = f"{os.path.abspath( os.path.dirname( __file__ ) )}/user_data/config.cfg"
if config.read(config_path)==[] :
raise NameError("le fichier n'existe pas")
except :
default_config = f"{os.path.abspath( os.path.dirname( __file__ ) )}/user_data/config.default"
shutil.copyfile(default_config, config_path)
config.read(config_path)
def confirm(texte, default = False):
if default :
txt = '[Y/n]'
else :
txt = '[y/N]'
yes = ['y', 'yes', 'o', 'oui']
no = ['n', 'non', 'no']
a = input(f"{texte} {txt}").lower()
if a in yes :
return True
elif a in no :
return False
return default
lang = "fr"
text = {"fr" : {
"compte" : "entrer l'adresse mail du compte ",
"mdp" : "entrez le mot de passe du compte ",
"next" : "voulez vous ajouter un compte ? ",
"finc" : "comptes en cours d'ajout ",
"ajout" : "comptes ajouté ",
"fidelity" : "avez vous un lien sur lequel le lien vers la page fidélité du mois est le seul contenu de la page ? ",
"lien" : "entrez le lien ",
"discorde" : "voulez vous envoyer les erreurs sur discord ? ",
"w1" : "entrez le lien du WebHook pour envoyer les points ",
"w2" : "entrez le lien du WebHook pour envoyer les erreurs ",
"msqle" : "voulez vous utiliser une base de donnée ",
"msqll" : "entrez le lien de la base de donnée ",
"msqlu" : "entrez l'utilisateur de la base de donnée ",
"msqlp" : "entrez le mot de passe de la base de donnée ",
"msqlt" : "entrez le nom de la table de la base de donnée ",
"proxye" : "voulez vous utiliser un proxy ",
"proxyl" : "entrez le lien du proxy ",
"proxyp" : "entrez le port du proxy "
}
}
t = text[lang]
def setup():
setup_comptes()
setup_settings()
def setup_comptes():
lc = []
compte = input(t["compte"])
mdp = input(t["mdp"])
lc.append(f"{compte},{mdp}")
for i in range(5):
if confirm(t["next"], default = True):
compte = input(t["compte"])
mdp = input(t["mdp"])
lc.append(f"{compte},{mdp}")
else:
print(t["finc"])
break
f = open('./user_data/login.csv', "w")
for i in lc :
f.write(i)
f.write("\n")
f.close()
print(t["ajout"])
edit_config_txt("logpath",f'{os.getcwd()}/user_data/login.csv')
def edit_config_txt(ligne, contenu):
f = open(config_path, "r")
txt = f.readlines()
f.close()
if txt.count(txt) >1:
raise NameError("il y a plus d'une occurence, echec de la modification")
for i in range(len(txt)) :
name = txt[i].split(" = ")[0]
if name == ligne:
txt[i] = name + " = " + str(contenu) + "\n"
f = open(config_path, "w")
for i in txt :
f.write(i)
f.close()
def setup_settings():
general()
discord()
proxy()
sql()
def general():
if confirm(t["fidelity"]):
lien = input(t["lien"])
edit_config_txt('FidelityLink',lien)
def discord():
enabled = confirm(t["discorde"], default = True)
if enabled :
edit_config_txt("DiscordErrorEnabled", True)
edit_config_txt('DiscordSuccessEnabled', confirm("send success ?", default = True))
w1 = input(t["w1"])
edit_config_txt("successlink",w1)
w2 = input(t["w2"])
edit_config_txt("errorlink",w2)
def sql() :
enabled = confirm(t["msqle"], default = False)
if enabled :
edit_config_txt("sql_enabled", True)
lien = input(t["msqll"])
edit_config_txt("host",lien)
table = input(t["msqlt"])
edit_config_txt("database",table)
user = input(t["msqlu"])
edit_config_txt("usr",user)
pwd = input(t["msqlp"])
edit_config_txt("pwd",pwd)
def proxy() :
enabled = confirm(t["proxye"], default = False)
if enabled :
edit_config_txt("proxy_enabled", True)
lien = input(t["proxyl"])
edit_config_txt("url",lien)
port = input(t["proxyp"])
edit_config_txt("port",port)
def check_update(args):
try :
latest = requests.get("https://api.github.com/repos/piair338/MsRewards/releases").json()[0]["tag_name"]
latest = parse_version(latest)
except Exception as e :
print(e)
return (args)
f = open("./version", 'r')
txt = f.readlines()[0].replace("\n","")
f.close()
cur = parse_version(txt)
if not (cur < latest) :
print("Already up to date.")
return(args)
else :
print(f"updating to {latest}")
os.system("git reset --hard")
os.system("git pull")
os.system("python3 -m pip install -r requirements.txt > update.result")
print(f"updated to {latest}")
return(args + f" --version {latest}")
LogPath = config["PATH"]["logpath"]
if LogPath == "/your/path/to/loginandpass.csv" :
setup()
else :
args = " ".join(sys.argv[1::])
args = check_update(args)
os.system("python3 V5.py " + args)

69
manual_claim.py Normal file
View File

@ -0,0 +1,69 @@
from easyprocess import EasyProcess
from pyvirtualdisplay import Display
from modules.config import *
from selenium import webdriver
from selenium.common import exceptions
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import Select
def setup_proxy(ip, port, options, socks=False) :
PROXY = f"{ip}:{port}"
if socks :
options.set_preference('network.proxy.type', 1)
options.set_preference('network.proxy.socks', ip)
options.set_preference('network.proxy.socks_port', int(port))
options.set_preference("browser.link.open_newwindow", 3)
else :
webdriver.DesiredCapabilities.FIREFOX['proxy'] = {
"httpProxy": PROXY,
"sslProxy": PROXY,
"proxyType": "MANUAL",
}
def firefox_driver(mobile=False, Headless=False):
PC_USER_AGENT = (
"Mozilla/5.0 (Windows NT 10.0; Win64; x64)"
"AppleWebKit/537.36 (KHTML, like Gecko)"
"Chrome/110.0.0.0 Safari/537.36 Edg/110.0.1587.56")
MOBILE_USER_AGENT = (
"Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X)"
"AppleWebKit/605.1.15 (KHTML, like Gecko)"
"CriOS/103.0.5060.63 Mobile/15E148 Safari/604.1"
)
options = Options()
options.set_preference('intl.accept_languages', 'fr-FR, fr')
if proxy_enabled :
setup_proxy(proxy_address,proxy_port, options)
options.set_preference("browser.link.open_newwindow", 3)
if FAST :
options.set_preference("permissions.default.image", 2) #disable image loading. May add this without the fast option soon
if Headless:
options.add_argument("-headless")
if mobile :
options.set_preference("general.useragent.override", MOBILE_USER_AGENT)
else :
options.set_preference("general.useragent.override", PC_USER_AGENT)
driver = webdriver.Firefox(options=options)
driver.set_window_size(1900 + hash(_mail)%20 , 1070 + hash(_password + "salt")%10)
return(driver)
def select_accounts(multiple = True):
system("clear") # clear from previous command to allow a clean choice
emails = [x[0] for x in Credentials] # list of all email adresses
emails_selected = enquiries.choose(f"quel{'s' if multiple else ''} compte{'s' if multiple else ''} ?", emails, multi=multiple)
return([x for x in Credentials if x[0] in emails_selected])
with Display(backend="xvnc", size=(2000, 1000), rfbport=5904) as disp:
_mail, _password = select_accounts(False)[0]
driver = firefox_driver()
print(f"connect via VNC to port 5904. \nID: {_mail}\npwd : {_password}")
i = input('stop ? ')
driver.close()

177
modules/config.py Normal file
View File

@ -0,0 +1,177 @@
#!/usr/bin/python3.10
import configparser
from csv import reader
from os import sys, system, path
from sys import platform
import argparse
from discord import ( # Importing discord.Webhook and discord.RequestsWebhookAdapter
RequestsWebhookAdapter,
Webhook,
Colour,
)
from time import time
from random import shuffle
"""
Setup for option, like --override or --fulllog
"""
parser = argparse.ArgumentParser()
parser.add_argument(
"-o",
"--override",
help="override",
dest="override",
action="store_true"
)
parser.add_argument(
"-u",
"--unban",
help="unban an account",
dest="unban",
action="store_true"
)
parser.add_argument(
"-l",
"--log",
dest="log",
help="enable logging in terminal",
action="store_true"
)
parser.add_argument(
"-fl",
"--fulllog",
dest="fulllog",
help="enable full logging in discord",
action="store_true",
)
parser.add_argument(
"-r",
"--risky",
help="make the program faster, probably better risk of ban",
dest="fast",
action="store_true"
)
parser.add_argument(
"-c",
"--config",
help="Choose a specific config file",
type=argparse.FileType('r')
)
parser.add_argument(
"-a",
"--add-points",
help="Add points to the database from a file and exit",
dest="points_file",
default=""
)
parser.add_argument(
"-v",
"--vnc",
help="enable VNC",
dest="vnc",
default="None"
)
parser.add_argument(
"--version",
help="display a message on discord to tell that the bot have been updated",
dest="update_version",
default="None"
)
args = parser.parse_args()
CUSTOM_START = args.override
UNBAN = args.unban
LOG = args.log
FULL_LOG = args.fulllog
FAST = args.fast
if CUSTOM_START :
LOG = True
VNC_ENABLED = args.vnc != "None"
VNC_PORT = args.vnc
POINTS_FILE = args.points_file
UPDATE_VERSION = args.update_version
# global variables used later in the code
LINUX_HOST = platform == "linux" # if the computer running this program is Linux, it allow more things
START_TIME = time()
if LINUX_HOST:
import enquiries
else:
system("") # enable colors in windows cmd
#reading configuration
config_path = f"{path.abspath(path.dirname(path.dirname( __file__ )))}/user_data/config.cfg"
if args.config :
config_path = path.abspath(args.config.name)
config = configparser.ConfigParser()
config.read(config_path)
# path configurations
MotPath = config["PATH"]["motpath"]
CREDENTIALS_PATH = config["PATH"]["logpath"]
# discord configuration
DISCORD_SUCCESS_LINK = config["DISCORD"]["successlink"]
DISCORD_ERROR_LINK = config["DISCORD"]["errorlink"]
DISCORD_ENABLED_ERROR = config["DISCORD"]["DiscordErrorEnabled"] == "True"
DISCORD_ENABLED_SUCCESS = config["DISCORD"]["DiscordSuccessEnabled"]== "True"
try :
AVATAR_URL = config["OTHER"]["avatar"]== "True"
except :
AVATAR_URL = "https://cdn.discordapp.com/icons/793934298977009674/d8055bccef6eca4855c349e808d0d788.webp"
if DISCORD_ENABLED_ERROR:
webhookFailure = Webhook.from_url(DISCORD_ERROR_LINK, adapter=RequestsWebhookAdapter())
if DISCORD_ENABLED_SUCCESS:
webhookSuccess = Webhook.from_url(DISCORD_SUCCESS_LINK, adapter=RequestsWebhookAdapter())
# base settings
FidelityLink = config["SETTINGS"]["FidelityLink"]
DISCORD_EMBED = config["SETTINGS"]["embeds"] == "True" #print new point value in an embed
Headless = config["SETTINGS"]["headless"] == "True"
# proxy settings
proxy_enabled = config["PROXY"]["proxy_enabled"] == "True"
proxy_address = config["PROXY"]["url"]
proxy_port = config["PROXY"]["port"]
# MySQL settings
sql_enabled = config["SQL"]["sql_enabled"] == "True"
sql_usr = config["SQL"]["usr"]
sql_pwd = config["SQL"]["pwd"]
sql_host = config["SQL"]["host"]
sql_database = config["SQL"]["database"]
# Other settings
IPV6_CHECKED = config["OTHER"]["ipv6"]
g = open(MotPath, "r", encoding="utf-8")
lines = g.readlines()
if len(lines) < 3 :
Liste_de_mot = list(lines[0].split(","))
else :
Liste_de_mot = [x.replace('\n', "") for x in lines]
g.close()
with open(CREDENTIALS_PATH) as f:
reader = reader(f)
Credentials = list(reader)
shuffle(Credentials)

70
modules/db.py Normal file
View File

@ -0,0 +1,70 @@
import mysql.connector
def add_row(compte, points, mycursor, mydb):
sql = "INSERT INTO daily (compte, points, date) VALUES (%s, %s, current_date())"
val = (compte, points)
mycursor.execute(sql, val)
mydb.commit()
#printf(mycursor.rowcount, "record created.")
def update_row(compte, points, mycursor, mydb):
sql = f"UPDATE daily SET points = {points} WHERE compte = '{compte}' AND date = current_date() ;"
mycursor.execute(sql)
mydb.commit()
#printf(mycursor.rowcount, "record(s) updated")
def update_last(compte, points, mycursor, mydb):
sql = f"UPDATE comptes SET last_pts = {points} WHERE compte = '{compte}';"
mycursor.execute(sql)
mydb.commit()
#printf(mycursor.rowcount, "record(s) updated")
def get_row(compte, points, mycursor, same_points = True): #return if there is a line with the same ammount of point or with the same name as well as the same day
if same_points :
mycursor.execute(f"SELECT * FROM daily WHERE points = {points} AND compte = '{compte}' AND date = current_date() ;")
else :
mycursor.execute(f"SELECT * FROM daily WHERE compte = '{compte}' AND date = current_date() ;")
myresult = mycursor.fetchall()
return(len(myresult) == 1)
def add_to_database(compte, points, sql_host,sql_usr,sql_pwd,sql_database, save_if_fail=True):
if points is None:
pass
else:
try:
mydb = mysql.connector.connect(
host=sql_host,
user=sql_usr,
password=sql_pwd,
database = sql_database
)
mycursor = mydb.cursor()
if get_row(compte, points,mycursor, True): #check if the row exist with the same ammount of points and do nothind if it does
#printf("les points sont deja bon")
#return(0)
pass
elif get_row(compte, points,mycursor, False) : #check if the row exist, but without the same ammount of points and update the point account then
update_row(compte, points,mycursor,mydb)
#printf("row updated")
#return(1)
else : # if the row don't exist, create it with the good ammount of points
add_row(compte, points,mycursor,mydb)
#return(2) #printf("row added")
if int(points) > 10 :
update_last(compte, points, mycursor, mydb)
mycursor.close()
mydb.close()
except BaseException as e:
if save_if_fail:
print("\nLes points n'ont pas pu être ajoutés, enregistrement dans le fichier 'points.csv'\n")
with open("points.csv", "a") as file:
file.write(f"{compte},{points}\n")
raise e

59
modules/driver_tools.py Normal file
View File

@ -0,0 +1,59 @@
from modules.imports import *
from modules.config import *
import modules.globals as g
def setup_proxy(ip, port, options, socks=False) :
PROXY = f"{ip}:{port}"
if socks :
options.set_preference('network.proxy.type', 1)
options.set_preference('network.proxy.socks', ip)
options.set_preference('network.proxy.socks_port', int(port))
options.set_preference("browser.link.open_newwindow", 3)
else :
webdriver.DesiredCapabilities.FIREFOX['proxy'] = {
"httpProxy": PROXY,
"sslProxy": PROXY,
"proxyType": "MANUAL",
}
#Deal with rgpd popup as well as some random popup like 'are you satisfied' one
def rgpd_popup(driver) -> None:
for i in ["bnp_btn_accept", "bnp_hfly_cta2", "bnp_hfly_close"] :
try:
driver.find_element(By.ID, i).click()
except:
pass
# save webdriver cookies
def save_cookies(driver):
pickle.dump(driver.get_cookies(), open(f"{'/'.join(__file__.split('/')[:-2])}/user_data/cookies/{g._mail}.pkl", "wb"))
# load cookies previously saved to the driver
def load_cookies(driver):
cookies = pickle.load(open(f"{'/'.join(__file__.split('/')[:-2])}/user_data/cookies/{g._mail}.pkl", "rb"))
for cookie in cookies:
driver.add_cookie(cookie)
"""
send_keys_wait([selenium element:element, str:keys]) send the different keys to the field element, with a random time between each press to simulate human action.
keys can be an string, but also selenium keys
"""
def send_keys_wait(element, keys):
for i in keys:
element.send_keys(i)
if FAST :
pass
else :
sleep(uniform(0.1, 0.3))
# Wait for the presence of the element identifier or [timeout]s
def wait_until_visible(search_by: str, identifier: str, timeout = 20, browser = None) -> None:
try :
WebDriverWait(browser, timeout).until(EC.visibility_of_element_located((search_by,identifier)), "element not found")
return(True)
except TimeoutException as e:
print(f"element not found after {timeout}s")
return(False)

5
modules/error.py Normal file
View File

@ -0,0 +1,5 @@
class Banned(Exception):
pass
class NotBanned(Exception):
pass

5
modules/globals.py Normal file
View File

@ -0,0 +1,5 @@
driver = None
_mail = '_mail temp'
_password = '_password temp'
_otp = '_otp temp'
display = None

24
modules/imports.py Normal file
View File

@ -0,0 +1,24 @@
import asyncio
import csv
from os import sys, system, path
from random import choice, randint, shuffle, uniform
from re import findall, search
from sys import platform
from time import sleep
from requests import get
from selenium import webdriver
from selenium.common import exceptions
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import WebDriverException, TimeoutException, NoSuchElementException, ElementClickInterceptedException
from pyotp import TOTP
from pyvirtualdisplay import Display
from pyvirtualdisplay.smartdisplay import SmartDisplay
import pickle
from datetime import timedelta, datetime
from discord import Embed, Colour, File

86
modules/tools.py Normal file
View File

@ -0,0 +1,86 @@
from modules.imports import *
from modules.config import *
import modules.globals as g
# add the time arround the text given in [text]&
def Timer(text: str) -> str:
return(f"[{g._mail.split('@')[0]} - {datetime.today().strftime('%d/%m')} - {timedelta(seconds = round(float(time() - START_TIME)))}] " + str(text))
# replace the function print, with more options
# [txt] : string, [driver] : selenium webdriver
def printf(txt):
print(Timer(txt))
# return current page domain
def get_domain(driver):
return(driver.current_url.split("/")[2])
# check if the user is using IPV4 using ipify.org
# [driver] : selenium webdriver
# never used here
# can be useful as Ms had issues with IPV6 at some point
def check_ipv4(driver):
driver.get("https://api64.ipify.org")
elm = driver.find_element(By.TAG_NAME, "body")
if len(elm.text.split('.')) == 4 :
return True
return False
def custom_sleep(temps):
try :
if FAST and temps > 50:
sleep(temps/10)
elif LOG: #only print sleep when user see it
points = ["", "", "", "", "", "", "", ""]
passe = 0
for i in range(int(temps)):
for i in range(8):
sleep(0.125)
passe += 0.125
print(f"{points[i]} - {round(float(temps) - passe, 3)}", end="\r")
print(" ", end="\r")
else:
sleep(temps)
except KeyboardInterrupt :
print("attente annulée")
def format_error(e) -> str:
tb = e.__traceback__
txt = ""
while tb != None :
txt = txt + f" -> {tb.tb_frame.f_code.co_name} ({tb.tb_lineno}) "
tb = tb.tb_next
return(txt + "\n" + str(e))
def progressBar(current, total=30, barLength=20, name="Progress"):
percent = float(current + 1) * 100 / total
arrow = "-" * int(percent / 100 * barLength - 1) + ">"
spaces = " " * (barLength - len(arrow))
print(name + ": [%s%s] %d %%" % (arrow, spaces, percent), end="\r")
def save_points_from_file(file):
with open(file) as f:
reader = csv.reader(f)
points_list = list(reader)
for item in points_list:
compte, points = item[0], item[1]
add_to_database(compte, points, sql_host,sql_usr,sql_pwd,sql_database, save_if_fail=False)
with open(file, "w") as f:
f.write("")
def select_accounts(multiple = True):
system("clear") # clear from previous command to allow a clean choice
emails = [x[0] for x in Credentials] # list of all email adresses
emails_selected = enquiries.choose(f"quel{'s' if multiple else ''} compte{'s' if multiple else ''} ?", emails, multi=multiple)
return([x for x in Credentials if x[0] in emails_selected])

12
requirements.txt Normal file
View File

@ -0,0 +1,12 @@
mysql-connector-python
argparse
discord.py==1.7.3
selenium
enquiries
rich
requests
pyvirtualdisplay
pillow
EasyProcess
pyotp
packaging

35
user_data/config.default Normal file
View File

@ -0,0 +1,35 @@
[PATH]
motpath = /usr/share/dict/french
logpath = /your/path/to/loginandpass.csv
[SETTINGS]
FidelityLink = Null
embeds = False
Headless = True
[DISCORD]
DiscordErrorEnabled = True
DiscordSuccessEnabled = True
successlink = https://discord.com/api/webhooks/[put your webhook here]
errorlink = https://discord.com/api/webhooks/[put your webhook here]
[PROXY]
proxy_enabled = False
url = Null
port = 0
[SQL]
sql_enabled = False
host = Null
database = MsRewards
usr = root
pwd = password
[OTHER]
avatar = https://cdn.discordapp.com/icons/793934298977009674/d8055bccef6eca4855c349e808d0d788.webp
ipv6 = False

4
user_data/cookies/.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

1
version Normal file
View File

@ -0,0 +1 @@
v5.7.1