Compare commits
7 Commits
4215f2678d
...
7c970031d0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7c970031d0 | ||
![]() |
2c2bd28a9f | ||
![]() |
dea8b0a362 | ||
![]() |
da1ea1d6e8 | ||
![]() |
2ca8fb0006 | ||
![]() |
362cf61508 | ||
![]() |
1828c63233 |
@ -9,34 +9,59 @@ Welcome! This guide assumes that you have a working 4get instance. This will hel
|
|||||||
4. The captcha font is located in `data/fonts/captcha.ttf`
|
4. The captcha font is located in `data/fonts/captcha.ttf`
|
||||||
|
|
||||||
# Cloudflare bypass (TLS check)
|
# Cloudflare bypass (TLS check)
|
||||||
**Note: this only allows you to bypass the browser integrity checks. Captchas & javascript challenges will not be bypassed.**
|
>These instructions have been updated to work with Debian 13 Trixie.
|
||||||
|
|
||||||
Configuring this lets you fetch images sitting behind Cloudflare and allows you to scrape the **Yep** & the **Mwmbl** search engines. Please be aware that APT will fight against you and will re-install the openSSL-version of curl constantly when updating.
|
**Note: this only allows you to bypass the browser integrity checks. Captchas & javascript challenges will not be bypassed by this program!**
|
||||||
|
|
||||||
First, follow these instructions. Only install the Firefox modules:
|
Configuring this lets you fetch images sitting behind Cloudflare and allows you to scrape the **Yep** search engine.
|
||||||
|
|
||||||
https://github.com/lwthiker/curl-impersonate/blob/main/INSTALL.md#native-build
|
To come up with this set of instructions, I used [this guide](https://github.com/lwthiker/curl-impersonate/blob/main/INSTALL.md#native-build) as a reference, but trust me you probably want to stick to what's written on this page.
|
||||||
|
|
||||||
Once you did this, you should be able to run the following inside your terminal:
|
|
||||||
|
|
||||||
|
First, compile curl-impersonate (the firefox flavor).
|
||||||
```sh
|
```sh
|
||||||
$ curl_ff117 --version
|
git clone https://github.com/lwthiker/curl-impersonate/
|
||||||
curl 8.1.1 (x86_64-pc-linux-gnu) libcurl/8.1.1 NSS/3.92 zlib/1.2.13 brotli/1.0.9 zstd/1.5.4 libidn2/2.3.3 nghttp2/1.56.0
|
cd curl-impersonate
|
||||||
Release-Date: 2023-05-23
|
sudo apt install build-essential pkg-config cmake ninja-build curl autoconf automake libtool python3-pip libnss3 libnss3-dev
|
||||||
Protocols: dict file ftp ftps gopher gophers http https imap imaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp ws wss
|
mkdir build
|
||||||
Features: alt-svc AsynchDNS brotli HSTS HTTP2 HTTPS-proxy IDN IPv6 Largefile libz NTLM NTLM_WB SSL threadsafe UnixSockets zstd
|
cd build
|
||||||
```
|
../configure
|
||||||
Now, after compiling, you should have a `libcurl-impersonate-ff.so` sitting somewhere. Mine (on my debian install) is located at `/usr/local/lib/libcurl-impersonate-ff.so`.
|
make firefox-build
|
||||||
|
sudo make firefox-install
|
||||||
Find the `libcurl.so.4` file used by your current installation of curl. For me, this file is located at `/usr/lib/x86_64-linux-gnu/libcurl.so.4`
|
sudo ldconfig
|
||||||
|
|
||||||
Now comes the sketchy part: replace `libcurl.so.4` with `libcurl-impersonate-ff.so`. You can do this in the following way:
|
|
||||||
```sh
|
|
||||||
sudo rm /usr/lib/x86_64-linux-gnu/libcurl.so.4
|
|
||||||
sudo cp /usr/local/lib/libcurl-impersonate-ff.so /usr/lib/x86_64-linux-gnu/libcurl.so.4
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Make sure to restart your webserver and/or PHP daemon, otherwise it will keep using the old library. You should now be able to bypass Cloudflare's shitty checks!!
|
Now, after compiling, you should have a `libcurl-impersonate-ff.so` sitting somewhere. Mine is located at `/usr/local/lib/libcurl-impersonate-ff.so`. Do some patch fuckery:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sudo su
|
||||||
|
LD_PRELOAD=/usr/local/lib/libcurl-impersonate-ff.so
|
||||||
|
CURL_IMPERSONATE=firefox117
|
||||||
|
patchelf --set-soname libcurl.so.4 /usr/local/lib/libcurl-impersonate-ff.so
|
||||||
|
ldconfig
|
||||||
|
```
|
||||||
|
|
||||||
|
From here, you will have a broken curl:
|
||||||
|
```sh
|
||||||
|
root@fuckedmachine:/# curl --version
|
||||||
|
curl: /usr/local/lib/libcurl.so.4: no version information available (required by curl)
|
||||||
|
curl: symbol lookup error: curl: undefined symbol: curl_global_trace, version CURL_OPENSSL_4
|
||||||
|
```
|
||||||
|
|
||||||
|
Or not... During testing, I've seen that sometimes curl still works for some reason. What really matters is the output of this command:
|
||||||
|
```
|
||||||
|
root@fuckedmachine:/# php -r 'print_r(curl_version());' | grep ssl_version
|
||||||
|
[ssl_version_number] => 0
|
||||||
|
[ssl_version] => NSS/3.92
|
||||||
|
```
|
||||||
|
|
||||||
|
It **MUST** say NSS, otherwise it didn't work. There's also the option of using the [forked project](https://github.com/lexiforest/curl-impersonate), but that garbage doesn't support NSS. I'm kind of against impersonating chrome cause you never know when Google is gonna add more fingerprinting bullshit.
|
||||||
|
|
||||||
|
Appendix: If you want a functioning `curl` command line utility again in case it doesn't work anymore, you can do the following hack:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt remove curl
|
||||||
|
sudo ln -s /usr/local/bin/curl-impersonate-ff /usr/bin/curl
|
||||||
|
```
|
||||||
|
|
||||||
# Robots.txt
|
# Robots.txt
|
||||||
Make sure you configure this right to optimize your search engine presence! Head over to `/robots.txt` and change the 4get.ca domain to your own domain.
|
Make sure you configure this right to optimize your search engine presence! Head over to `/robots.txt` and change the 4get.ca domain to your own domain.
|
||||||
|
@ -403,27 +403,28 @@ class frontend{
|
|||||||
$text =
|
$text =
|
||||||
trim(
|
trim(
|
||||||
preg_replace(
|
preg_replace(
|
||||||
'/<\/span>$/',
|
'/<code [^>]+>/',
|
||||||
"", // remove stray ending span because of the <?php stuff
|
"",
|
||||||
str_replace(
|
str_replace(
|
||||||
[
|
[
|
||||||
'<br />',
|
"<br />",
|
||||||
' '
|
" ",
|
||||||
|
"<pre>",
|
||||||
|
"</pre>",
|
||||||
|
"</code>"
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
"\n", // replace <br> with newlines
|
"\n",
|
||||||
" " // replace html entity to space
|
" ",
|
||||||
],
|
|
||||||
str_replace(
|
|
||||||
[
|
|
||||||
// leading <?php garbage
|
|
||||||
"<span style=\"color: c-default\">\n<?php ",
|
|
||||||
"<code>",
|
|
||||||
"</code>"
|
|
||||||
],
|
|
||||||
"",
|
"",
|
||||||
highlight_string("<?php " . $text, true)
|
"",
|
||||||
)
|
""
|
||||||
|
],
|
||||||
|
explode(
|
||||||
|
"<?php",
|
||||||
|
highlight_string("<?php " . $text, true),
|
||||||
|
2
|
||||||
|
)[1]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user