Project New Public Pegascape DNS - Replacement for the Public EOL DNS by noahc3

einhuman197

Well-Known Member
OP
Member
Joined
Aug 17, 2015
Messages
991
Trophies
0
Location
Inside your bootloader (´◉◞౪◟◉)
XP
823
Country
Germany
With the Shutdown of noahc3's Public Pegascape DNS a few weeks ago, there's no public way for people including me that rely on Pegascape to easily launch caffeine on ipatched Switches running Firmware 4.x or other Software-Based Exploits on lower Firmwares, effectively locking them out of CFW. While you can self-host your own instance, that still requires some setup and still doesn't make it accessible outside of your home network. And while modchips exist, you really don't have to use them if software-based exploits worked fine for you. To fix this dilemma, I decided to host a public instance of PegaScape on a VPS dedicated to just this one task.

Just replace the IPs for primary and secondary DNS from the current IPs with

141.148.246.60

Then launching Pegascape normally via Fake News should be the same experience as it was before!

The VPS is hosted on an Oracle Cloud Server hosted in Amsterdam/Netherlands, which keeps latency low and stability high for EU Users and latency hopefully as low as possible for the rest of the world. Please keep in mind that I cannot guarantee 24/7 availability, although I really want to deliver it. If it seems to not be working after multiple tries, contact me here on GBATemp or Discord. Then I'll have a look.

I want to keep this service up for as long as possible, since I also need it for me. I don't plan to shut it down at any point, however if it'll change, I'll update this post.

Please give me feedback if it runs flawlessly for you. From my and @Technicmaster0's limited testing, it seems as reliable as the original one.





For the fellas wanting to host another instance, here's a quick info on how I did it. YOU DON'T HAVE TO DO THIS IF YOU JUST WANT TO USE MY INSTANCE!

Self-Hosted Pegascape seems unhappy when exposed to the internet. The node server crashes when receiving unexpected traffic (bot traffic for example, or incomplete requests), which results in the Service randomly dying after a varying amount of time (few hours to a few days). To combat this, I built a quick health check to check the instance health every 2 seconds, restarting the service if it died, keeping the Uptime very high, hopefully.
I followed this guide to initalize the repo on the server:
https://gbatemp.net/threads/building-pagascape-from-source-to-running-self-hosted-mode.650712/
I set up everything in the default ubuntu user, but copied the PegaScape Project to /root too, since the System Services by default run on root. Since the node versions are a bit old. I guess you really shouldn't do this on a machine you use for anything else due to possible security vulns. Also, while it's active you won't be able to correctly resolve Domains, since the DNS Port 53 is used for your own DNS Server that is needed for PegaScape to work.

Then you have to expose the following ports to the Internet:
80 - For HTTP
53 - For DNS
8100 - Websocket - PegaScape uses websockets to transfer some Payloads. This is undocumented in the original github readme. Keeping them closed will result in an endless spinning circle, and the exploits won't load on your switch.
443 - HTTPS Traffic - I didn't test without 443 closed, however in the Wireshark Traffic in the Locally Hosted Instance there were a few packets transmitted using HTTPS, so I guess you need it as well.

I then set up two System Services, one for Pegascape itself, one for the Health Check. I guess you could do this cleaner, however it works fine for me.

The PegaScape Part is made of a Bash Script and a System Service:
Create a pegascape.sh in /usr/bin (Tested on Ubuntu 22.04 LTS) and fill in the following code

Code:
#!/bin/bash

cd /root/PegaScape/
screen -d -m /home/ubuntu/.nvm/versions/node/v9.11.2/bin/node start.js --webapplet --ip YOUR.IP
sleep infinity
Replace the IP with the IP of your Server. Don't forget to make the script executable (chmod +x pegascape.sh)

Then, create a file "pegascape.service" in /etc/systemd/system with the following content for the System Service

Code:
[Unit]
Description=PegaScape Startup
After=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/pegascape.sh

[Install]
# Autostart after reboot
WantedBy=multi-user.target

Start the pegascape service and enable it to launch with the System Startup.
Code:
sudo systemctl start pegascape.service
sudo systemctl enable pegascape.service
You can now check the Status with
Code:
sudo systemctl status pegascape.service
It should read active. You can check the node Server that runs in a screen with
Code:
sudo screen -x
The Webserver of Pegascape should also be avaliable on your Server IP on the default HTTP Port 80. Check it with a browser.


Now you need to implement a Health Check that restarts the service in case it crashes. Like mentioned before, the Service was unstable for me, crashing when exposed to the Internet, apparently because it's not written clean enough to have robust error handling. It throws errors such as ECONNRESET, killing the service in the process. Therefore, I wrote a health-check that checks if the website can still be reached every 2 seconds and if not, restarts the main PegaScape Service.
This Part is again made of a System Service and a Bash Script
Create a pegascapehealthcheck.sh in /usr/bin and fill in this code:
Code:
#!/bin/bash
# put your domain in this var
https=http://YOURIP/

while :
do
# save the status in some variable
status=`curl $https -k -s -f -o /dev/null && echo "SUCCESS" || echo "ERROR"`

# print results (or use it in your scripts)
if [[ "$status" == "ERROR" ]]; then
systemctl restart pegascape
date +'%Y-%m-%d %T':
echo "ERROR - SERVICE WILL RESTART"
fi

sleep 2;
done
Don't forget to make the script executable.
Then, create a pegascapehealthcheck.service in /etc/systemd/system/ with the code.

Code:
[Unit]
Description=PegaScape Startup
After=network-online.target

[Service]
Type=simple
ExecStart=/usr/bin/pegascapehealthcheck.sh

[Install]
# Autostart after reboot
WantedBy=multi-user.target

Then, start and enable the health check for startup
Code:
sudo systemctl start pegascapehealthcheck.service
sudo systemctl enable pegascapehealthcheck.service

When running
Code:
sudo systemctl status pegascapehealthcheck.service
it'll print any occasions where the service was restarted into the output
May 21 12:31:16 instance-20240515-1503 pegascapehealthcheck.sh[281551]: 2024-05-21 12:31:16:
May 21 12:31:16 instance-20240515-1503 pegascapehealthcheck.sh[669]: ERROR - SERVICE WILL RESTART

Then you shoud be up and running! Feel free to share your Public Instance with the community! If you want, send me the IP and I'll keep the first post updated!
 
Last edited by einhuman197,

Draxzelex

Well-Known Member
Member
Joined
Aug 6, 2017
Messages
19,032
Trophies
2
Age
29
Location
New York City
XP
13,446
Country
United States
Thank you. This is a very much appreciated contribution towards the Switch hacking community. While I don't own a patched console myself, I'm sure there are many who will be thanking you for your hard work.
 
  • Like
Reactions: einhuman197

XSinfonyX

New Member
Newbie
Joined
May 25, 2024
Messages
2
Trophies
0
Age
26
XP
9
Country
Mexico
Hello, I tried to connect my switch with your instance but I'm having problems with the connection, it is still working?
 

einhuman197

Well-Known Member
OP
Member
Joined
Aug 17, 2015
Messages
991
Trophies
0
Location
Inside your bootloader (´◉◞౪◟◉)
XP
823
Country
Germany
Hello, I tried to connect my switch with your instance but I'm having problems with the connection, it is still working?
Hey, it's still up and running, I just used caffeine on my 4.1 sysnand Switch to launch hekate successfully. According to the logs the server is running flawlessly for days. What's your particular issue? Do you launch the PegaScape Site via Fake News?
 

XSinfonyX

New Member
Newbie
Joined
May 25, 2024
Messages
2
Trophies
0
Age
26
XP
9
Country
Mexico
Hey, it's still up and running, I just used caffeine on my 4.1 sysnand Switch to launch hekate successfully. According to the logs the server is running flawlessly for days. What's your particular issue? Do you launch the PegaScape Site via Fake News?
I have my switch at 4.1 but I can't start caffeine to enter Hekate. I entered using the store's vulnerability, I don't know about fake news. The error that appears is 2124-8007, investigating I found out that it was due to a problem in the DNS, that's why my question was, I think it doesn't work for me
 

chewskydoo

New Member
Newbie
Joined
Mar 14, 2007
Messages
1
Trophies
1
XP
19
Country
United States
I'm using a 1.0 switch, and although I can get the applet to load using your DNS, I can't start Nereba. Does this only work for Caffeine? (FYI, it does allow me to access RCM.)
 

einhuman197

Well-Known Member
OP
Member
Joined
Aug 17, 2015
Messages
991
Trophies
0
Location
Inside your bootloader (´◉◞౪◟◉)
XP
823
Country
Germany
Sorry for the late replies, I didn't check gbatemp while on vacation!

I have my switch at 4.1 but I can't start caffeine to enter Hekate. I entered using the store's vulnerability, I don't know about fake news. The error that appears is 2124-8007, investigating I found out that it was due to a problem in the DNS, that's why my question was, I think it doesn't work for me
My Instance runs PegaScape in Applet Mode, since the original guide had instructions to set up Fake News, no matter which entry point you use. I'm surprised that apparently many people don't have Fake News installed, it's always faster.

Personally I don't plan on hosting a second instance of PegaScape in non-applet mode permanently. I'd have to setup and maintain a second VPS just dedicated to that task.

You could just also just host the non-applet mode locally for a single time to install Fake News Injector HBLauncher and then use this public instance permanently without any hassle.

If someone really would need the non-applet mode because local hosting doesn't work, I can temporarily change the operating mode to non-applet, you or anyone else can just contact me. We can arrange a time via Discord or Private Message where I change the mode for a single time. Then you can run Fake News Injector and install Fake News. It's also faster to launch than both eshop, settings or PuyoPuyo.


I'm using a 1.0 switch, and although I can get the applet to load using your DNS, I can't start Nereba. Does this only work for Caffeine? (FYI, it does allow me to access RCM.)
Sadly I don't have any other nereba reports, neither positive nor negative. Did you test running Nereba using locally hosted PegaScape? Did it work there?


Thanks for the positive reports, glad it works for you and my mirror is helping you :) @unholyhimura @Francesca!
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: https://www.youtube.com/watch?v=_PiiXM51oBo