Building Pagascape from source to running Self Hosted mode.

Has been reports of the public PegaScape site suffering crashes and been offline, so I decided to create a Step by step tutorial about building the Pegascape Source and running it on Self Hosted mode.

If you need to run pegascape on a Ubuntu Machine, open a Terminal window and run the commands:

you need Python 2 on the system, so installed python2 and created an alias to python

Bash:
sudo apt update
sudo apt install python2
alias python=/usr/bin/python2

Using the recommendation of @xradeon , installed the node and npm, 9.11.2 & 5.6.0 versions respectively (https://gbatemp.net/threads/pegascape-alternative.650182/post-10372685)

You need some base packages installed, curl to download the specific NPM version script, git to clone the repo, make and g++ to build the source
Bash:
sudo apt install curl git make g++

In order to use a specific NPM version, I followed the instructions on https://stackoverflow.com/questions...l-a-specific-version-of-node-on-ubuntu-debian (Answer 56):
Bash:
cd ~
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash
source ~/.nvm/nvm.sh
nvm install 9.11.2
node --version
npm --version


As instructed by the README.MD on the original repo: https://github.com/noahc3/PegaScape#self-hosting
after install NodeJS & NPM, executed the next commands to clone the repo and build using NPM:
Bash:
cd ~
git clone https://www.github.com/noahc3/PegaScape
cd ~/PegaScape/
npm install

on my system systemd-resolved was running so I had to stop it to be able to run integrated DNS
Bash:
sudo systemctl stop systemd-resolved

As we are using a specific version of NPN which is installed for the user not system wide, if you use the command sudo node you get the "command not found" error
1710276002266.png

so you need to execute it with full path:
Bash:
sudo /home/impeeza/.nvm/versions/node/v9.11.2/bin/node start.js --webapplet

Now the PegaScape server is running self hosted
1710276011922.png


To close the PegaScape site, you type .exit and press [ENTER]

Tested on a 4.1.0 console and works fine.

If you want to use caffeine is recommended to leave out the parameter --webapplet since that one is for fake news and might cause the problem using caffeine.

Remember there are another parameters to start.js:
--webapplet: To enable fake internet, allowing the Switch to pass the connection test and load things like Fake News.
--ip <html_server_ip_override> if the detected IP address for the HTML server is not preffered.
--host <dns_server_ip_override> if the detected IP address for the DNS server is not preffered.
--disable-dns if you want to disable the internal DNS server and use something else (dnsmasq, bind, etc).
 

Attachments

  • 1710275505480.png
    1710275505480.png
    19.2 KB · Views: 12
Last edited by impeeza,

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
4,779
Trophies
2
Age
48
Location
Japan
XP
3,679
Country
United States
In ubuntu, when using sudo, you need extra flags to preserve the environment (paths and such). I almost always use sudo -HE (although only one of those... I forget which... is really necessary). This takes care of having to type the whole path, as long as that is part of the regular user's path in bash.rc
 
  • Love
Reactions: impeeza

impeeza

¡Kabito!
OP
Member
Joined
Apr 5, 2011
Messages
6,360
Trophies
3
Age
46
Location
At my chair.
XP
18,716
Country
Colombia
In ubuntu, when using sudo, you need extra flags to preserve the environment (paths and such). I almost always use sudo -HE (although only one of those... I forget which... is really necessary). This takes care of having to type the whole path, as long as that is part of the regular user's path in bash.rc
Will try it, I did use -E in the past for some MSYS commands
Post automatically merged:

In ubuntu, when using sudo, you need extra flags to preserve the environment (paths and such). I almost always use sudo -HE (although only one of those... I forget which... is really necessary). This takes care of having to type the whole path, as long as that is part of the regular user's path in bash.rc
Didn't work on my ubuntu.
 
Last edited by impeeza,

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
4,779
Trophies
2
Age
48
Location
Japan
XP
3,679
Country
United States
Will try it, I did use -E in the past for some MSYS commands
Post automatically merged:


Didn't work on my ubuntu.
Then /.nvm/versions/node/v9.11.2/bin/ isn't set in ~/.bashrc in the path. It probably doesn't get added when (or the way) you installed it.

If you add it to the path, then "sudo -HE node start.js --webapplet" would suffice. Personally though, I'd make an easier .sh file to make executable and run instead. Doesn't even need the .sh extension, as long as you make it executable and the file starts with a shebang (#!/bin/sh), Ubuntu will know what to do with it.

For example, when I needed some extra steps to update the Atmosphere code between versions (because of sept), I simply typed updateat, and atmosphere updated, make clean, and built the new version. I dropped the updateat script into opt/devkipro/tools, since that was already in my path.

Code:
#! /bin/sh
git pull origin master
git submodule update --init --recursive
git fetch --all
make clean
export SEPT_00_ENC_PATH='/home/urherenow/projects/Atmosphere/sept-secondary_00.enc'
export SEPT_01_ENC_PATH='/home/urherenow/projects/Atmosphere/sept-secondary_01.enc'
export SEPT_DEV_00_ENC_PATH='/home/urherenow/projects/Atmosphere/sept-secondary_dev_00.enc'
export SEPT_DEV_01_ENC_PATH='/home/urherenow/projects/Atmosphere/sept-secondary_dev_01.enc'
make dist-no-debug

EDIT: In hindsight, it may be easier to forget about the path bit, because if you make a script, you'll only have to type it once, for the script. Look at me thinking about things the hard way... :wacko:
 
Last edited by urherenow,
  • Love
Reactions: impeeza

impeeza

¡Kabito!
OP
Member
Joined
Apr 5, 2011
Messages
6,360
Trophies
3
Age
46
Location
At my chair.
XP
18,716
Country
Colombia
Then /.nvm/versions/node/v9.11.2/bin/ isn't set in ~/.bashrc in the path. It probably doesn't get added when (or the way) you installed it.

If you add it to the path, then "sudo -HE node start.js --webapplet" would suffice. Personally though, I'd make an easier .sh file to make executable and run instead. Doesn't even need the .sh extension, as long as you make it executable and the file starts with a shebang (#!/bin/sh), Ubuntu will know what to do with it.

For example, when I needed some extra steps to update the Atmosphere code between versions (because of sept), I simply typed updateat, and atmosphere updated, make clean, and built the new version. I dropped the updateat script into opt/devkipro/tools, since that was already in my path.

Code:
#! /bin/sh
git pull origin master
git submodule update --init --recursive
git fetch --all
make clean
export SEPT_00_ENC_PATH='/home/urherenow/projects/Atmosphere/sept-secondary_00.enc'
export SEPT_01_ENC_PATH='/home/urherenow/projects/Atmosphere/sept-secondary_01.enc'
export SEPT_DEV_00_ENC_PATH='/home/urherenow/projects/Atmosphere/sept-secondary_dev_00.enc'
export SEPT_DEV_01_ENC_PATH='/home/urherenow/projects/Atmosphere/sept-secondary_dev_01.enc'
make dist-no-debug

EDIT: In hindsight, it may be easier to forget about the path bit, because if you make a script, you'll only have to type it once, for the script. Look at me thinking about things the hard way... :wacko:
Yes the issue here is the installation method of NPM and NODE I chose a "manual" script to do it because the NODE version restriction

Will try the script to set variables and try to normal NOM installation on Ubuntu to confirm
 

Mthodmn101

Well-Known Member
Member
Joined
Jan 31, 2008
Messages
650
Trophies
1
XP
1,712
Country
United States
which dns ip do we remove and replace with our own from the previous pegascape setup? do we need to do further blocking of nintendo servers so the switch doesnt try and update?
 

impeeza

¡Kabito!
OP
Member
Joined
Apr 5, 2011
Messages
6,360
Trophies
3
Age
46
Location
At my chair.
XP
18,716
Country
Colombia
which dns ip do we remove and replace with our own from the previous pegascape setup? do we need to do further blocking of nintendo servers so the switch doesnt try and update?
When you have the PegaScape self hosted, you use as DNS the IP indicated by the node running, by example on my case:

1710475194989.png


192.168.209.140
 

impeeza

¡Kabito!
OP
Member
Joined
Apr 5, 2011
Messages
6,360
Trophies
3
Age
46
Location
At my chair.
XP
18,716
Country
Colombia
previously i thought 2 dns ip were used but just using the dns listed in my self-hosted is fine? and wont allow any nintendo connection to mess it up?
OK, this DNS setting is only to launch the vulnerability, after you have the console running you can setup DNS90 or better Atmosphere's DNSiTM

https://rentry.org/AvoidSwitchBan
 

Mthodmn101

Well-Known Member
Member
Joined
Jan 31, 2008
Messages
650
Trophies
1
XP
1,712
Country
United States
OK, this DNS setting is only to launch the vulnerability, after you have the console running you can setup DNS90 or better Atmosphere's DNSiTM

https://rentry.org/AvoidSwitchBan
i was more referring to avoid getting the update nag when launching caffeine. (im not too versed on this and set this up for a relative a while ago)
 
  • Like
Reactions: impeeza

MrZizou325i

Member
Newcomer
Joined
Mar 17, 2024
Messages
9
Trophies
0
Age
38
XP
14
Country
Spain
Sí, espera a que alguien cree una solución contenedora o inténtalo de nuevo.
Hola soy novato en todo esto. He seguido todos los pasos de tu tutorial, y en el último paso me da la siguiente información: Respondiendo con dirección 172.21.123.15
IP del conmutador DNS 172.21.123.15
Ahora, ¿cómo debo configurar mi conexión en el conmutador? Gracias y perdón por ser torpe.
Post automatically merged:

Yeah wait for someone to create a container solution or try it again
Hi, I'm a newbie to all this. I have followed all the steps in your tutorial, and in the last step it gives me the following information: Responding with address 172.21.123.15
dns switch ip 172.21.123.15
Now how should I configure my connection on the switch? Thanks, and sorry I'm clumsy
 

impeeza

¡Kabito!
OP
Member
Joined
Apr 5, 2011
Messages
6,360
Trophies
3
Age
46
Location
At my chair.
XP
18,716
Country
Colombia
Hola soy novato en todo esto. He seguido todos los pasos de tu tutorial, y en el último paso me da la siguiente información: Respondiendo con dirección 172.21.123.15
IP del conmutador DNS 172.21.123.15
Ahora, ¿cómo debo configurar mi conexión en el conmutador? Gracias y perdón por ser torpe.
Post automatically merged:


Hi, I'm a newbie to all this. I have followed all the steps in your tutorial, and in the last step it gives me the following information: Responding with address 172.21.123.15
dns switch ip 172.21.123.15
Now how should I configure my connection on the switch? Thanks, and sorry I'm clumsy
You config your Network settings to use DNS 172.21.123.15 and then run pegascape proccess.
 

MrZizou325i

Member
Newcomer
Joined
Mar 17, 2024
Messages
9
Trophies
0
Age
38
XP
14
Country
Spain
You config your Network settings to use DNS 172.21.123.15 and then run pegascape proccess.
Good morning. I'm trying to access pegascape with the new DNS, but it keeps giving me an error... I don't know what I must be doing wrong. I am attaching images to see if you can help me...
 

Attachments

  • Screenshot_2024-03-19-07-44-58-573_com.miui.gallery.jpg
    Screenshot_2024-03-19-07-44-58-573_com.miui.gallery.jpg
    415.9 KB · Views: 10
  • Screenshot_2024-03-19-07-46-22-976_com.miui.gallery.jpg
    Screenshot_2024-03-19-07-46-22-976_com.miui.gallery.jpg
    315.3 KB · Views: 13
  • Screenshot_2024-03-19-07-44-34-579_com.miui.gallery.jpg
    Screenshot_2024-03-19-07-44-34-579_com.miui.gallery.jpg
    334.4 KB · Views: 13

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
4,779
Trophies
2
Age
48
Location
Japan
XP
3,679
Country
United States
I'm pretty sure you can just accept it. As far as I can remember, it will report a failure if it can't talk to Ninty over the internet... which is a good thing. If you're sure your PC host is running, and running at 172.21.123.15, then just accept the settings and give it a try.

Edit: and I hope you're aware that this is only for fw 1.0.0-3.0.0 or 4.0.1-4.1.0
 
  • Like
Reactions: impeeza

MrZizou325i

Member
Newcomer
Joined
Mar 17, 2024
Messages
9
Trophies
0
Age
38
XP
14
Country
Spain
I'm pretty sure you can just accept it. As far as I can remember, it will report a failure if it can't talk to Ninty over the internet... which is a good thing. If you're sure your PC host is running, and running at 172.21.123.15, then just accept the settings and give it a try.

Edit: and I hope you're aware that this is only for fw 1.0.0-3.0.0 or 4.0.1-4.1.0
Hello. I don't know what I'm doing wrong... I put the DNS IP in the PC's browser bar and it opens the pegascape exploit. But I configure it in the console settings and it gives me a DNS error..... my firm version is 4.1.0
 

geekclassy1

New Member
Newbie
Joined
Mar 18, 2024
Messages
2
Trophies
0
Age
24
XP
5
Country
France
Hello. I don't know what I'm doing wrong... I put the DNS IP in the PC's browser bar and it opens the pegascape exploit. But I configure it in the console settings and it gives me a DNS error..... my firm version is 4.1.0
I have about the same problem. On my PC every is fine, but when I try from the Switch it doesn't work.

I can connect to the network fine but I cannot launch the exploit, the internet page doesn't load at all..
Post automatically merged:

Good morning. I'm trying to access pegascape with the new DNS, but it keeps giving me an error... I don't know what I must be doing wrong. I am attaching images to see if you can help me...
Did you check the IP address on the host computer (the computer that on which the VM is running) ?
If so try from another computer/ your phone. It can be a VM network issue (e.g your VM is set up to communicate only to the host or on local NAT)
 

MrZizou325i

Member
Newcomer
Joined
Mar 17, 2024
Messages
9
Trophies
0
Age
38
XP
14
Country
Spain
I have about the same problem. On my PC every is fine, but when I try from the Switch it doesn't work.

I can connect to the network fine but I cannot launch the exploit, the internet page doesn't load at all..
Post automatically merged:


Did you check the IP address on the host computer (the computer that on which the VM is running) ?
If so try from another computer/ your phone. It can be a VM network issue (e.g your VM is set up to communicate only to the host or on local NAT)
You're right. From the PC where I have mounted the VM it does load the exploit, then I have tried with the mobile phone connected to the same Wi-Fi network and the exploit does not load... How could I solve this? I am very new to these topics. Thank you
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    K3Nv2 @ K3Nv2: Lol rappers still promoting crypto