Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App crash when i try to start it #5

Open
mathisbdkr opened this issue Aug 13, 2024 · 18 comments
Open

App crash when i try to start it #5

mathisbdkr opened this issue Aug 13, 2024 · 18 comments

Comments

@mathisbdkr
Copy link

Hey,

I try to run the app to synchronise my epitech events in my google agenda.

But when I try to run the app this append:

Screenshot_20240813_125724

I think i correctly fill the config.json so i don't know why this append
Someone can help me ?

@skyf0l
Copy link
Owner

skyf0l commented Aug 16, 2024

Hello, looks like same as #4

It looks like the first character of the request fetching the login fails because the first character is <, this is probably due to a cookie problem, did you copy the right cookie? What does it look like? (Hides the majority of the cookie if you copy it here).

@mathisbdkr
Copy link
Author

mathisbdkr commented Aug 16, 2024

Hey, this i my config file

image

this looks normal to me and i don't see any bad character in the file and i copy the right cookie

@skyf0l
Copy link
Owner

skyf0l commented Aug 17, 2024

It looks good, I'll try to dig it before the end of the month.

(And add more information when it crashes, yes the API result is not a valid JSON but why ???????????? gimme more info plz)

@mathisbdkr
Copy link
Author

what more information do you need ?

@skyf0l
Copy link
Owner

skyf0l commented Aug 30, 2024

Like the raw api response before parsing it as JSON, because it fails as it can't be parsed as JSON

@mathisbdkr
Copy link
Author

the raw response before the parsing is "<Response [503]>"
image

and i get the same response from the function get_all_epitech_events in epitech_calendar.py

@skyf0l
Copy link
Owner

skyf0l commented Sep 6, 2024

503 Service Unavailable, I don't understand how this is possible

@mathisbdkr
Copy link
Author

maybe it's due to the anti ddos ​​which is on the intranet

@mathisbdkr
Copy link
Author

I tried to run the app on epitech wifi and it works. so i think the problem come from the anti ddos ​​on the Epitech intranet

with my own wifi :
image

with the epitech wifi :
image

@skyf0l
Copy link
Owner

skyf0l commented Sep 11, 2024

Well done, may we can try to bypass it using a random user agent or by adding more headers?

@mathisbdkr
Copy link
Author

I tried to change the user agent and added more headers but it didn't work

image

@skyf0l
Copy link
Owner

skyf0l commented Sep 14, 2024

Thanks for trying this, it's possible that the API/or some intranet routes are behind a strong anti ddos, so there is nothing we can do to bypass it ...

@mathisbdkr
Copy link
Author

mathisbdkr commented Sep 17, 2024

I think i managed to bypass the anti ddos ​​using selenium, i made a fork if you want to check what i did

@skyf0l
Copy link
Owner

skyf0l commented Sep 21, 2024

I just saw that:

# initialize the connection with Epitech intra and wait for the end of the anti-ddos check
def bypass_anti_ddos():
    url = 'https://intra.epitech.eu/'
    driver.get(url)
    sleep(10)

Can we just do this with request (without using selenium) and reinject generated cookies by the https://intra.epitech.eu page in following requests? I would like to avoid integrating selenium to keep this little app simple and light.

Also, I confess that since I'm no longer at epitech, I don't have access to the intra anymore, so I'm less interested in maintaining it. But I'm still open to improvements.

@mathisbdkr
Copy link
Author

I used selenium because it open a real google window, and the anti ddos check takes a few seconds before allowing access to the intra. Requests cannot wait for the anti ddos check to finish. So, i don't see how to proceed without Selenium.

@skyf0l
Copy link
Owner

skyf0l commented Sep 23, 2024

Oh nooooo, I just saw the new anti-ddos check....
OK, I agree, selenium will be a potential solution, I will approve that

@skyf0l
Copy link
Owner

skyf0l commented Sep 23, 2024

HAHAHA I'm thinking the anti-ddos check is easy to bypass, I'll dig that soon 👀
It looks like they are using https://github.com/C0nw0nk/Nginx-Lua-Anti-DDoS

@mathisbdkr
Copy link
Author

Ok, i'm gonna look that too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants