JDownloader Community - Appwork GmbH
 

Reply
 
Thread Tools Display Modes
  #1  
Old 10.08.2022, 22:19
Cyberavater Cyberavater is offline
JD Legend
 
Join Date: Feb 2019
Posts: 695
Default How does actually login using cookies work? [Off -topic]

I'm currently trying to build a Facebook decrypter, but a login is required for some private links.

I'm interested in how JD is achieving this, I tried exporting the cookie and importing it on another browser session, and it's not logged in.
Reply With Quote
  #2  
Old 11.08.2022, 15:52
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 77,934
Default

@Cyberavater: no magic, we/JDownloader just set all the cookies, that's all. nothing more, nothing less.

please know that this approach might now work in browser, because JDownloader only does specific requests while browser has a full browser engine running all js that can result in different behaviour of the website.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #3  
Old 11.08.2022, 16:15
Cyberavater Cyberavater is offline
JD Legend
 
Join Date: Feb 2019
Posts: 695
Default

"a full browser engine", what's JDs js engine? Isn't it also a browser, i.e headless browser?

Edit: Oh, you've already said it.
"specific requests" So, basically you make specific requests you get from developer tools?

But, since you are an expert can you suggest to me some ideas about how to log in using cookies in a full browser?

Last edited by Cyberavater; 11.08.2022 at 16:28.
Reply With Quote
  #4  
Old 11.08.2022, 16:40
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 77,934
Default

Quote:
Originally Posted by Cyberavater View Post
"a full browser engine", what's JDs js engine? Isn't it also a browser, i.e headless browser?
No browser, nothing.
Quote:
because JDownloader only does specific requests
JDownloader only loads a http request and then parses information via Regex/Pattern and plugins know what to do next and how. no js/no css/no browser engine.
__________________
JD-Dev & Server-Admin
Reply With Quote
  #5  
Old 11.08.2022, 16:41
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 77,934
Default

Quote:
Originally Posted by Cyberavater View Post
But, since you are an expert can you suggest to me some ideas about how to log in using cookies in a full browser?
What exactly does fail? what error do you get? are you sure you set all cookies correct?
__________________
JD-Dev & Server-Admin
Reply With Quote
  #6  
Old 11.08.2022, 17:12
Cyberavater Cyberavater is offline
JD Legend
 
Join Date: Feb 2019
Posts: 695
Default

>What exactly does fail? what error do you get? are you sure you set all cookies correct?

Simple really, what I do is use "edit this cookie" to get the cookie, and import it on an unlogged-in browser session using the same extension "edit this cookie", but even after that, it's not logged in on the new browser session.

Currently, I'm trying it on the regular browser to see if it works, before trying to implement it on selenium.
Reply With Quote
  #7  
Old 11.08.2022, 17:33
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 63,166
Default

Hm technically it should also work with selenium.
Maybe Facebook has implemented a detection for Selenium although it would be strange because it accepts plain http requests and cookies are even valid for different User-Agents than e.g. the one a session has been created with afaIk.
__________________
JD Supporter, Plugin Dev. & Community Manager
JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #8  
Old 11.08.2022, 17:51
Cyberavater Cyberavater is offline
JD Legend
 
Join Date: Feb 2019
Posts: 695
Default

No, Actually I'ven't tried with using selenium yet, since I failed with "edit this cookie" on a regular browser.

As it seems, I'll have better luck on selenium as they have cookie support, "driver.manage().addCookie(cookie)"
Reply With Quote
  #9  
Old 11.08.2022, 17:55
Cyberavater Cyberavater is offline
JD Legend
 
Join Date: Feb 2019
Posts: 695
Default

I've just tried cookie transfer right now on this site and its working here.
Facebook seems special. Do I need something special for Facebook?
Reply With Quote
  #10  
Old 11.08.2022, 17:56
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 63,166
Default

Quote:
Originally Posted by Cyberavater View Post
Do I need something special for Facebook?
Sorry, again:
1. It's working fine in JD.

2. We are unable to provide any help for creating special/Selenium solutions here.
Please ask on stackoverflow.com or similar websites.
__________________
JD Supporter, Plugin Dev. & Community Manager
JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #11  
Old 11.08.2022, 18:02
Cyberavater Cyberavater is offline
JD Legend
 
Join Date: Feb 2019
Posts: 695
Default

Ofc! I've added "Off-topic" just for that.
BTW, I'm not talking about selenium, just how to get it done in a regular browser if it's not clear yet.

I'm just asking here since I got the idea from you guys and you have more experience. It's fine if it's not worth your time, I understand that.

I'll just wait for Jiaz if he has some suggestions.
Reply With Quote
  #12  
Old 11.08.2022, 18:03
pspzockerscene's Avatar
pspzockerscene pspzockerscene is offline
Community Manager
 
Join Date: Mar 2009
Location: Deutschland
Posts: 63,166
Default

Good luck
__________________
JD Supporter, Plugin Dev. & Community Manager
JDownloader 2 Setup Download
Spoiler:

A users' JD crashes and the first thing to ask is:
Quote:
Originally Posted by Jiaz View Post
Do you have Nero installed?
That's true James
Quote:
Originally Posted by James
Die Leute verstehen einfach nicht dass nur weil man mit einer Waffe auch auf Menschen schießen kann dass ein Schützenver​ein kein Ort für Amoklaufide​en ist
Reply With Quote
  #13  
Old 11.08.2022, 19:01
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 77,934
Default

@Cyberavater: Please keep in mind that besides cookies there is also local storage. That's why I meant here
Quote:
Originally Posted by Jiaz View Post
please know that this approach might now work in browser, because JDownloader only does specific requests while browser has a full browser engine running all js that can result in different behaviour of the website.
Maybe the js on the site also checks local storage, which is empty then, and then redirects to login screen/fails to work.
Facebook makes use of localstorage, so maybe check stackoverflow.com/questions/13335967/export-data-in-localstorage-for-later-re-import
__________________
JD-Dev & Server-Admin
Reply With Quote
  #14  
Old 11.08.2022, 20:40
Cyberavater Cyberavater is offline
JD Legend
 
Join Date: Feb 2019
Posts: 695
Default

Okay, thanks for the help. I'll look into it.
Reply With Quote
  #15  
Old 12.08.2022, 12:32
Jiaz's Avatar
Jiaz Jiaz is offline
JD Manager
 
Join Date: Mar 2009
Location: Germany
Posts: 77,934
Default

Quote:
Originally Posted by Cyberavater View Post
Okay, thanks for the help. I'll look into it.
You're welcome!
__________________
JD-Dev & Server-Admin
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT +2. The time now is 10:10.
Provided By AppWork GmbH | Privacy | Imprint
Parts of the Design are used from Kirsch designed by Andrew & Austin
Powered by vBulletin® Version 3.8.10 Beta 1
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.