OpenDirectoryDownloader is a tool designed to index open directory listings across various platforms, supporting over 130 formats such as FTP(S), Google Drive, GoIndex, GitHub, and more. It allows users to extract directory structures and file lists from supported platforms, facilitating efficient data organization and management.
Key Features:
Supports indexing of multiple directory formats, including FTP(S), Google Drive, Bhadoo, Mediafire, GitHub, and others.
Cross-platform compatibility, built using C# with .NET (Core), ensuring availability on Windows, Linux, and macOS.
Command-line interface for advanced customization, enabling adjustments to threads, timeouts, and other parameters.
Experimental support for bypassing Cloudflare protections via an integrated Chromium browser.
Docker containerization for seamless deployment in containerized environments.
Audience & Benefit:
Ideal for developers, researchers, and professionals who need to analyze or manage open directory listings. The tool simplifies the process of extracting and organizing file information from various platforms, saving time and effort compared to manual extraction methods. It also supports integration with external tools like wget or aria2c for further processing of indexed data.
OpenDirectoryDownloader can be installed via winget, making it easily accessible for users on supported platforms.
README
Open Directory Downloader
Indexes open directories listings in 130+ supported formats, including FTP(S), Google Drive, AList, Directory Lister, HFS, Bhadoo, GoIndex, Go2Index (alternatives), Mediafire, GoFile, GitHub, pCloud, Dufs.
Written in C# with .NET (Core), which means it is cross platform!
Downloading is not (yet) implemented, but is already possible when you use the resulting file into another tool (for most of the formats).
If you want to learn more or contribute, see the following paragraphs!
Custom Headers
Headers need to be provided in the following format:
:
This syntax is compatible with e.g. cURL, so that you can copy the headers from a cURL command and re-use them with OpenDirectoryDownloader.
This means you can easily "fake" a browser request:
On the page/site you want to index, open your browsers dev tools (F12 or CTRL + SHIFT + i)
Go to the Network tab
Reload the page
Right-click on the first request/item in the network tab and select Copy > Copy as cURL (bash) (might be called differently, depending on your browser)
The copied command ends with lots of headers (-H '' -H ''). Copy only this part of the command and append it to your OpenDirectoryDownloader command, like so: OpenDirectoryDownloader --url "https://myopendirectory.com" -H 'header-name-1: header-value-1' -H 'header-name-2: header-value-2' ...
You can of course also use other options with this or omit the --url option to use the prompt instead.
Setting some options like --username or --user-agent might override some headers, as explicit options take precedence. Option order does not matter (this applies to OpenDirectoryDownloader in general).
Copying on Linux
When you want to copy (C key or -c flag) the stats at the end on Linux you need to have xclip installed.
If you received errors like this, please apply the registry file "Enable TLS 1.3.reg" from this site.
System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.
---> System.Security.Authentication.AuthenticationException: Authentication failed because the remote party sent a TLS alert: 'ProtocolVersion'.
---> System.ComponentModel.Win32Exception (0x80090326): The message received was unexpected or badly formatted.
Cloudflare
EXPERIMANTAL!! READ THIS FIRST!
IT WILL NOT ALWAYS WORK!
There is experimental support for Cloudflare. When it detects a Cloudflare issue it will download a Chromium browser, start it, in which the Cloudflare protection can be solved. Sometimes this is a captcha which the user (you) needs to solve. For each browser session you have 60 seconds to complete. After that the browser will be killed and you can retry on next request.
Cloudflare does somehow detect that it is not the normal Chromium/Chrome browser and therefore it sadly will not always work. A good tip is move your mouse as soon as possible in the browser.
Sometimes it fails and pops up a browser for every request, and also kills it almost immediately when Cloudflare sees that there is no problem with the session. If this happens, kill the indexer!
If anybody have more info how to get Cloudflare to work better, let me know!
GitHub
By default GitHub has a rate limit of 60 request per hour, which is enough for 20 repositories with less than 100.000 items. You can increase this limit to 5000 per hour by creating a (personal) token:
Fill in Project Name, like "opendirectorydownloader" or so, leave Location unchanged
Change Project ID (optional)
Click "CREATE"
Wait a couple of seconds until the project is created and open it (click "VIEW")
On the APIs pane, click "Go to APIs overview"
Click "ENABLE APIS AND SERVICES"
Enter "Drive", select "Google Drive API"
Click "ENABLE"
Go to "Credentials" menu in the left menu bar
Click "CONFIGURE CONSENT SCREEN"
Choose "External", click "CREATE"
Fill in something like "opendirectorydownloader" in the "Application name" box
At the bottom click "Save"
Go to "Credentials" menu in the left menu bar (again)
Click "CREATE CREDENTIALS"
Select "OAuth client ID"
Select "Desktop app" as "Application type"
Change the name (optional)
Click "Create"
Click "OK" in the "OAuth client created" dialog
In the "OAuth 2.0 Client IDs" section click on the just create Desktop app line
In the top bar, click "DOWNLOAD JSON"
You will get a file like "client_secret_xxxxxx.apps.googleusercontent.com.json", rename it to "OpenDirectoryDownloader.GoogleDrive.json" and replace the one in the release
"Desktop app" will already be selected on the "Configure your OAuth client" dialog
Click "Create"
Click "DOWNLOAD CLIENT CONFIGURATION"
You will get a file like "credentials.json", rename it to "OpenDirectoryDownloader.GoogleDrive.json" and replace the one in the release
On the first use, you will get a browser screen that you need to grant access for it, and because we haven't granted out OAuth consent screen (This app isn't verified), we get an extra warning. You can use the "Advanced" link, and use the "Go to yourappname (unsafe)" link.
Support
If you like OpenDirectoryDownloader, please consider supporting me!