Hacking Apparently it IS possible to trick nes golf into loading on your switch

D

Deleted-394630

Guest
what did you input for this error?

--------------------- MERGED ---------------------------

if this is an issues with node start.js, find out what your ipv4 is, and do this
Sudo node start.js --disable-curses --logfile debug.txt --host 0.0.0.0
insert your ip address where 0.0.0.0 is
im not sure what that errors is but I've seen where people had to force their computer to output their IP
you can find out your ipv4 by typing "ipconfig"
node start.js --disable-curses --logfile debug.txt
 

blinkzane

Panic at your moms house
OP
Member
Joined
Jul 24, 2012
Messages
944
Trophies
1
Location
Florida
XP
1,640
Country
United States
what did you input for this error?

--------------------- MERGED ---------------------------

if this is an issues with node start.js, find out what your ipv4 is, and do this
Sudo node start.js --disable-curses --logfile debug.txt --host 0.0.0.0
insert your ip address where 0.0.0.0 is
im not sure what that errors is but I've seen where people had to force their computer to output their IP
you can find out your ipv4 by typing "ipconfig"

also just try not to do sudo su if that is what caused the new error. its possible you're doing too much not realizing it by using su
 
D

Deleted-394630

Guest
also just try not to do sudo su if that is what caused the new error. its possible you're doing too much not realizing it by using su
When I do:
node start.js --disable-curses --logfile debug.txt --host 0.0.0.0
(I put my ip, but I'm not sharing that)
I end up back at:
Please run as root so we can bind to port 53 & 80
Or if I do sudo su before doing anything. I end up with the same error from before:
Code:
Error: EINVAL: invalid argument, uv_interface_addresses
    at Object.networkInterfaces (os.js:126:30)
    at Object.ip.address (/home/Admin/pegaswitch/node_modules/ip/lib/ip.js:357:23)
    at Object.<anonymous> (/home/Admin/pegaswitch/start.js:61:28)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:187:16)
 

blinkzane

Panic at your moms house
OP
Member
Joined
Jul 24, 2012
Messages
944
Trophies
1
Location
Florida
XP
1,640
Country
United States
When I do:
node start.js --disable-curses --logfile debug.txt --host 0.0.0.0
(I put my ip, but I'm not sharing that)
I end up back at:
Please run as root so we can bind to port 53 & 80
Or if I do sudo su before doing anything. I end up with the same error from before:
Code:
Error: EINVAL: invalid argument, uv_interface_addresses
    at Object.networkInterfaces (os.js:126:30)
    at Object.ip.address (/home/Admin/pegaswitch/node_modules/ip/lib/ip.js:357:23)
    at Object.<anonymous> (/home/Admin/pegaswitch/start.js:61:28)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:187:16)
if it says to run as root then do sudo before node start.js, maybe try reinstalling pegaswitch with sudo privileges
cd
sudo npm install pegaswitch
sudo npm node start.js --disable-curses --logfile debug txt

if it doesnt let you install it again (ive had this a couple of times)
rm -rf pegaswitch
then follow above instructions

if you are on windows, try powershell, I got it to work there before I did anywhere else.

this could also be a bash issue.
 
D

Deleted-394630

Guest
if it says to run as root then do sudo before node start.js, maybe try reinstalling pegaswitch with sudo privileges
cd
sudo npm install pegaswitch
sudo npm node start.js --disable-curses --logfile debug txt

if it doesnt let you install it again (ive had this a couple of times)
rm -rf pegaswitch
then follow above instructions

if you are on windows, try powershell, I got it to work there before I did anywhere else.

this could also be a bash issue.
Sorry for wasting your time, I'm gonna give up for now, and hope in the future there is a more streamlined version of pegaswitch, or another way to get Flog working. Thanks so much for helping me anyways.
 

blinkzane

Panic at your moms house
OP
Member
Joined
Jul 24, 2012
Messages
944
Trophies
1
Location
Florida
XP
1,640
Country
United States
Sorry for wasting your time, I'm gonna give up for now, and hope in the future there is a more streamlined version of pegaswitch, or another way to get Flog working. Thanks so much for helping me anyways.
I wish i knew what the error was, I didnt have that issue with mine but it took me 3 days to get it to run. I had to troubleshoot a lot but now I understand what the commands do lol. I havent coded in almost ten years let alone used a linux distro longer.
 
D

Deleted User

Guest
If you're doing this on Windows: Don't.
If you're doing this on Linux: Disable dnsmasq (semi-optional), then use sudo node start.js --host 127.0.0.0, then copy the dns it says listening and do sudo node start.js --host <internal ip here>

works perfectly fine on Windows ten using linux subsystem
 

firelog

New Member
Newbie
Joined
Oct 10, 2017
Messages
1
Trophies
0
Age
33
XP
41
Country
Russia
I've read all the thread, but didn't find same problem. I try to start pegaswitch via Win 10 linux subsystem. When i put sudo node start.js, i get this:
/mnt/c/Users/Павел/pegaswitch/start.js:24
let argv = yargs
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3

Could anybody help me?
 

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
4,777
Trophies
2
Age
48
Location
Japan
XP
3,678
Country
United States
This thread clued me in to the fact that WSL existed in the first place, so unrelated to pegaswitch and golf... THANK YOU! A couple of very important things to remember that aren't in the instructions for lsxx

1) edit the start menu icon by adding "--login" to the end of the shortcut. You need this to make permanent variables by editing ~/.profile (such as "
DEVKITPRO="/home/urherenow/devkitPro"
DEVKITARM="$DEVKITPRO/devkitARM"
)

2) WSL is kind-of sort-of aware of *SOME* Windows stuff, so wonky things can happen if you don't tell bash to ignore your Windows PATH by editing Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss by adding the DWORD AppendNtPath 0x00000000

3) Firewalls detect bash as application "?????????" and like to block it. If you find that when installing stuff, it seems to pause at 0% for a couple of minutes before doing anything, it's probably your firewall/antivirus blocking it. Make a rule explicitly allowing all traffic to/from MAC address E0-3F-49-6B-78-F0 or archive.ubuntu.com [91.189.88.162].

4) Related to #3, if you have IPv6 issues edit /etc/gai.conf (sudo nano /etc/gai.conf) and uncomment the following line

Code:
#    For sites which prefer IPv4 connections change the last line to
#
#precedence ::ffff:0:0/96  100          //remove the "#"

This should speed you up quite a bit in following the OP's tutorial.

And finally... do NOT EVER edit Linux files from Windows. Use nano or install something else that works in bash (any suggestions? Linux desktop apps don't run for obvious reasons...)

EDIT:
Also @blinkzane I didn't have to do anything else special on Windows except for using sudo for installing npm (got a warning or two anyway, but at least it worked).

Now that I got it working, I tried to launch Golf 3 times, and it worked all 3 times :P figuring out the controls in the game is harder than Getting it to launch IMHO. (ver 3.0.0)
 
Last edited by urherenow,

blinkzane

Panic at your moms house
OP
Member
Joined
Jul 24, 2012
Messages
944
Trophies
1
Location
Florida
XP
1,640
Country
United States
This thread clued me in to the fact that WSL existed in the first place, so unrelated to pegaswitch and golf... THANK YOU! A couple of very important things to remember that aren't in the instructions for lsxx

1) edit the start menu icon by adding "--login" to the end of the shortcut. You need this to make permanent variables by editing ~/.profile (such as "
DEVKITPRO="/home/urherenow/devkitPro"
DEVKITARM="$DEVKITPRO/devkitARM"
)

2) WSL is kind-of sort-of aware of *SOME* Windows stuff, so wonky things can happen if you don't tell bash to ignore your Windows PATH by editing Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Lxss by adding the DWORD AppendNtPath 0x00000000

3) Firewalls detect bash as application "?????????" and like to block it. If you find that when installing stuff, it seems to pause at 0% for a couple of minutes before doing anything, it's probably your firewall/antivirus blocking it. Make a rule explicitly allowing all traffic to/from MAC address E0-3F-49-6B-78-F0 or archive.ubuntu.com [91.189.88.162].

4) Related to #3, if you have IPv6 issues edit /etc/gai.conf (sudo nano /etc/gai.conf) and uncomment the following line

Code:
#    For sites which prefer IPv4 connections change the last line to
#
#precedence ::ffff:0:0/96  100          //remove the "#"

This should speed you up quite a bit in following the OP's tutorial.

And finally... do NOT EVER edit Linux files from Windows. Use nano or install something else that works in bash (any suggestions? Linux desktop apps don't run for obvious reasons...)

EDIT:
Also @blinkzane I didn't have to do anything else special on Windows except for using sudo for installing npm (got a warning or two anyway, but at least it worked).

Now that I got it working, I tried to launch Golf 3 times, and it worked all 3 times :P figuring out the controls in the game is harder than Getting it to launch IMHO. (ver 3.0.0)

I've corrected for errors that i got in the original post, some people had issues and some didn't.
 

cybrian

Well-Known Member
Member
Joined
Sep 14, 2009
Messages
111
Trophies
1
XP
549
Country
United States
So I’m curious here, although this isn’t related to PegaSwitch or the like: what happens to the RTC if I unplug the battery in my Switch and leave it unplugged for a couple minutes? Will it have any idea what time it is? Has anyone tried switching on Airplane Mode or changing the DNS servers and then removing the battery? I’m curious what this does, since without a battery the RTC cannot be certain what time it is, and without recording the time to the NAND regularly it wouldn’t be able to accurately say “It has passed the date of x”.
 

Jhynjhiruu

Well-Known Member
Member
Joined
Dec 31, 2016
Messages
817
Trophies
0
Age
21
XP
1,708
Country
So I’m curious here, although this isn’t related to PegaSwitch or the like: what happens to the RTC if I unplug the battery in my Switch and leave it unplugged for a couple minutes? Will it have any idea what time it is? Has anyone tried switching on Airplane Mode or changing the DNS servers and then removing the battery? I’m curious what this does, since without a battery the RTC cannot be certain what time it is, and without recording the time to the NAND regularly it wouldn’t be able to accurately say “It has passed the date of x”.
All of that has already been tried.
 

cybrian

Well-Known Member
Member
Joined
Sep 14, 2009
Messages
111
Trophies
1
XP
549
Country
United States
All of that has already been tried.
Well I’m not surprised, as I figure it would have been tried as soon as it was known it was based on the date. But it would be an interesting experiment to see what PegaSwitch says the RTC value is when reset this way… It must set it on boot somehow, so what does it set it to?

EDIT: If it can be triggered by manually changing the RTC to the past using PegaSwitch then it’s pretty safe to assume that the Switch isn’t comparing the date to something on boot
 
Last edited by cybrian,

urherenow

Well-Known Member
Member
Joined
Mar 8, 2009
Messages
4,777
Trophies
2
Age
48
Location
Japan
XP
3,678
Country
United States
I now see why people are having issues. Just tried the same thing on my laptop and the experience is horrible. Something is stopping the creator's update from installing, and that is making all the difference in the world. If you're on Windows, get the creator's update installed before installing WSL...
 

blinkzane

Panic at your moms house
OP
Member
Joined
Jul 24, 2012
Messages
944
Trophies
1
Location
Florida
XP
1,640
Country
United States
I now see why people are having issues. Just tried the same thing on my laptop and the experience is horrible. Something is stopping the creator's update from installing, and that is making all the difference in the world. If you're on Windows, get the creator's update installed before installing WSL...
I think it's a bad repo in WSL
 

syntaxyz

Well-Known Member
Newcomer
Joined
Dec 2, 2014
Messages
50
Trophies
0
Age
33
XP
1,178
Country
Netherlands
I've read all the thread, but didn't find same problem. I try to start pegaswitch via Win 10 linux subsystem. When i put sudo node start.js, i get this:
/mnt/c/Users/Павел/pegaswitch/start.js:24
let argv = yargs
^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:374:25)
at Object.Module._extensions..js (module.js:417:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:442:10)
at startup (node.js:136:18)
at node.js:966:3

Could anybody help me?

I am pretty sure you have installed a very old version of nodejs and that you can resolve it by using nodejs version 8.6.0.
For install instructions see this page: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
Good luck!
 

DarkOrb

Well-Known Member
Member
Joined
Oct 11, 2013
Messages
290
Trophies
0
Age
31
XP
874
Country
Germany
I was able to succesfully start Pegaswitch, but when I set the primary and secondary DNS on my Switch to the one shown in the pegaswitch window, it says connection failed (2110-3150). When I set the DNS to automatic it's able to connect, so it must be a problem with Pegaswitch. Any idea how I can fix this? I already deactivated all my firewalls (even the windows firewall) but to no avail.

EDIT: I was able to fix this problem with the help from the guys from the ReSwitched Discord Server: If you are using Skype, you have to go to Options/Advanced/Connection and uncheck "Use port 80 and 443 for additional incoming connections". If this doesn't fix it, try to turn off your Windows Firewall entirely.
 
Last edited by DarkOrb,
  • Like
Reactions: blinkzane

blinkzane

Panic at your moms house
OP
Member
Joined
Jul 24, 2012
Messages
944
Trophies
1
Location
Florida
XP
1,640
Country
United States
I was able to succesfully start Pegaswitch, but when I set the primary and secondary DNS on my Switch to the one shown in the pegaswitch window, it says connection failed (2110-3150). When I set the DNS to automatic it's able to connect, so it must be a problem with Pegaswitch. Any idea how I can fix this? I already deactivated all my firewalls (even the windows firewall) but to no avail.

EDIT: I was able to fix this problem with the help from the guys from the ReSwitched Discord Server: If you are using Skype, you have to go to Options/Advanced/Connection and uncheck "Use port 80 and 443 for additional incoming connections". If this doesn't fix it, try to turn off your Windows Firewall entirely.
I actually meant to mention this fix in the original post, thank you!
 

machinoman

Well-Known Member
Member
Joined
Feb 12, 2011
Messages
322
Trophies
0
XP
611
Country
United States
I have no linux experience but i finished everything up to the final command to launch pegaswitch but i instead get error

"There was an issue setting up DNS: bind EADDRINUSE 0.0.0.0:53"

even doing the second command for if there was any error didnt change it. So idk. Anyhelp here :)?

I experienced the exact same issue using Ubuntu. Something else is running on port 53 and you just have to close it. Enter this in:

sudo lsof -i tcp:53

You will get feedback like this:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
named 848 bind 21u IPv6 18262 0t0 TCP *:domain (LISTEN)
named 848 bind 22u IPv4 18266 0t0 TCP localhost:domain (LISTEN)


Copy the PID number, it is not actually underlined in the feedback. Then just kill the process:

sudo kill 848

Then just run PegaSwitch normally:

sudo node start.js

You will have to repeat these steps over again if you restart Ubuntu.
 
Last edited by machinoman,
  • Like
Reactions: blinkzane

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    OctoAori20 @ OctoAori20: Nice nice-