Merge pull request #207 from unresolvedsymbol/master

Use RiiConnect24 geckocodes archive
This commit is contained in:
Fledge68 2020-10-08 17:38:52 -05:00 committed by GitHub
commit 879c9ade08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 7 deletions

View File

@ -4,8 +4,7 @@
#include "lockMutex.hpp"
#include "network/https.h"
//#define GECKOURL "http://geckocodes.org/codes/%c/%s.txt"
#define GECKOURL "https://www.geckocodes.org/txt.php?txt=%s"
#define GECKOURL "https://codes.rc24.xyz/txt.php?txt=%s"
#define CHEATSPERPAGE 4
u8 m_cheatSettingsPage = 0;

View File

@ -471,19 +471,15 @@ void downloadfile(const char *url, struct download *buffer)
}
// Send our request
char request[2300];
char isgecko[36] = "Cookie: challenge=BitMitigate.com\r\n";
int ret, len;
if (strncmp(host, "www.geckocodes.org", 18) != 0)
memset(isgecko, 0, sizeof(isgecko)); // Not geckocodes, so don't set a cookie
len = snprintf(request, sizeof(request),
"GET %s HTTP/1.1\r\n"
"Host: %s\r\n"
"User-Agent: WiiFlow-Lite\r\n"
"Connection: close\r\n"
"%s"
"Pragma: no-cache\r\n"
"Cache-Control: no-cache\r\n\r\n",
path, host, isgecko);
path, host);
if ((ret = https_write(&httpinfo, request, len, false)) != len)
{
#ifdef DEBUG_NETWORK