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
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)
ummm...
I put the DNS IP in the PC's browser bar and it opens the pegascape exploit.
I'd call that a yes... Other than if it's a VM, it can generally communicate with the host but not necessarily other appliances on the network...


It could be the way your router is setup. Is your Switch's IP address in the same subnet, when it's connected to the wifi? Is there a Gateway address, and is that address the IP of your router (in this case, if you have a gateway set at all, you want it to be the linux host IP, not the router... perhaps...)? Are you connecting more than one router in your house with a cable going from a LAN port on one to a WAN port on the other (which is wrong... if you want your devices to talk to each other while connected to separate access points)?

Are you using a Linux VM? If you are, and using NAT in your network settings, I suggest you try bridged. Your VM's IP should end up in the same subnet as everything else that connects to your wifi (likely starting with 192.168, instead of 172.21... does your PC have an IP starting with 172?)
 
Last edited by urherenow,

MrZizou325i

Member
Newcomer
Joined
Mar 17, 2024
Messages
9
Trophies
0
Age
38
XP
14
Country
Spain
ummm...

I'd call that a yes... Other than if it's a VM, it can generally communicate with the host but not necessarily other appliances on the network...


It could be the way your router is setup. Is your Switch's IP address in the same subnet, when it's connected to the wifi? Is there a Gateway address, and is that address the IP of your router (in this case, if you have a gateway set at all, you want it to be the linux host IP, not the router... perhaps...)? Are you connecting more than one router in your house with a cable going from a LAN port on one to a WAN port on the other (which is wrong... if you want your devices to talk to each other while connected to separate access points)?

Are you using a Linux VM? If you are, and using NAT in your network settings, I suggest you try bridged. Your VM's IP should end up in the same subnet as everything else that connects to your wifi (likely starting with 192.168, instead of 172.21... does your PC have an IP starting with 172?)
I do not know what else to do. I'm going crazy.....
I only have one router. I hope that later there will be a solution within my reach, for now my son will have to wait... Thank you for your help. Greetings
 

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 do not know what else to do. I'm going crazy.....
I only have one router. I hope that later there will be a solution within my reach, for now my son will have to wait... Thank you for your help. Greetings
Well, you could start by actually answering questions from people that are trying to help you.

Are you using a VM?
Check the IP address of your phone, connected to your wifi... does it's IP address start with 172.21...?
Can you ping the ip of your phone from within linux?
If you are using a VM, have you set the network settings to BRIDGED?

I need to establish that your network environment is correct and working, before trying to find out if something is configured wrong on the Switch...
 

MrZizou325i

Member
Newcomer
Joined
Mar 17, 2024
Messages
9
Trophies
0
Age
38
XP
14
Country
Spain
Well, you could start by actually answering questions from people that are trying to help you.

Are you using a VM?
Check the IP address of your phone, connected to your wifi... does it's IP address start with 172.21...?
Can you ping the ip of your phone from within linux?
If you are using a VM, have you set the network settings to BRIDGED?

I need to establish that your network environment is correct and working, before trying to find out if something is configured wrong on the Switch...
Sorry. I use Ubuntu install Linux on Windows. The IP of my devices connected to the Wi-Fi network start at 192.168..... I don't know what you mean by pinging my phone's IP in Linux. I have not configured the network in Bridge... Thank you for your help and your patience 😅
 

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
4,779
Trophies
2
Age
48
Location
Japan
XP
3,679
Country
United States
Sorry. I use Ubuntu install Linux on Windows. The IP of my devices connected to the Wi-Fi network start at 192.168..... I don't know what you mean by pinging my phone's IP in Linux. I have not configured the network in Bridge... Thank you for your help and your patience 😅
This is why your setup isn't working. I'm not very familiar with networking in WSL (which is what you're using). A quick Google says that in Windows 10, you can go to the registry key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss. The 2 important entries here are
NatGatewayIpAddress, which should be your router's IP (192.68.0.1 usually, or sometimes 192.168.50.1 for newer ASUS routers)
and
NatNetwork, which should be 192.168.0.0/24 or 192.168.50.0/24 (depending on your local network setup). After changing this to be correct, running node start.js should say it's responding with 192.168.xx.xxx... which would be what you want to use as your DNS on the Switch.

Honestly, it might be easier to download VMWare Player (it's free), and create a Ubuntu VM, with a Bridged network. I don't bother with WSL anymore, so I can't give very precise instructions beyond what I'm Googling with the information you provide.
 

MrZizou325i

Member
Newcomer
Joined
Mar 17, 2024
Messages
9
Trophies
0
Age
38
XP
14
Country
Spain
This is why your setup isn't working. I'm not very familiar with networking in WSL (which is what you're using). A quick Google says that in Windows 10, you can go to the registry key HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss. The 2 important entries here are
NatGatewayIpAddress, which should be your router's IP (192.68.0.1 usually, or sometimes 192.168.50.1 for newer ASUS routers)
and
NatNetwork, which should be 192.168.0.0/24 or 192.168.50.0/24 (depending on your local network setup). After changing this to be correct, running node start.js should say it's responding with 192.168.xx.xxx... which would be what you want to use as your DNS on the Switch.

Honestly, it might be easier to download VMWare Player (it's free), and create a Ubuntu VM, with a Bridged network. I don't bother with WSL anymore, so I can't give very precise instructions beyond what I'm Googling with the information you provide.
Friend, thank you very much. I followed your advice and created a VM with VMWare.... and I was finally able to access the exploit in my console. I appreciate your help. Greetings
 
  • Like
Reactions: urherenow

Skullink120

New Member
Newbie
Joined
Mar 30, 2024
Messages
2
Trophies
0
Age
31
XP
9
Country
Brazil
HELP: Guys, I have a question. In this tutorial it says that it is not necessary to use " --webapplet " for those who use Caffeine (I used it before when the site was working) If I use Caffeine do I have to leave it without anything, or is it mandatory to put some parameter? I already have Pegaswitch installed on NAND. I apologize if some words are wrong or out of order, I'm not very fluent in English and I use Google Translate
 

gtzfreddy

New Member
Newbie
Joined
May 11, 2021
Messages
2
Trophies
0
Age
35
XP
36
Country
Colombia
I follow all the steps in this guide and I manage to create the DNS server correctly but I cannot access the IP it generates from an external device, I tried from WSL and from Virtualbox with the bridge adapter
 

veesonic

Member
Newcomer
Joined
Aug 18, 2019
Messages
20
Trophies
0
Age
44
XP
467
Country
United States
I'm somewhat tech savvy but I get pretty lost when doing anything command prompt, terminal, or linux related. I was able to follow this tutorial and get Pegascape Self Hosting working on Windows 10. I made some adjustments on what I needed to get it working, you can follow the original post and refer to my reply to see my adjustments. B-)

https://gbatemp.net/threads/pegascape-self-hosting-in-windows-10.652216/post-10392861
 

half-turok

Well-Known Member
Member
Joined
Apr 22, 2015
Messages
102
Trophies
0
Age
39
XP
800
Country
Mexico
Can I use this tutorial for Arch Linux? My PC hat Arch Linux and some commands are different like other Linux versions.

I like to try this tutorial, but I want to now if work on my Linux.
 

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