Giter Site home page Giter Site logo

reswitched / pegaswitch Goto Github PK

View Code? Open in Web Editor NEW
933.0 103.0 106.0 1.5 MB

PegaSwitch is an exploit toolkit for the Nintendo Switch

Home Page: https://reswitched.team

License: ISC License

JavaScript 99.31% HTML 0.61% Emacs Lisp 0.08%
switch exploit rop-exploitation console-framework

pegaswitch's People

Contributors

3daniel avatar azure-agst avatar crowell avatar d3m3vilurr avatar daeken avatar dazjo avatar dwood15 avatar govanify avatar hexkyz avatar hikari-chin avatar inarius avatar jam1garner avatar kgsws avatar maschell avatar misson20000 avatar normmatt avatar ns-mkusper avatar pixel-stuck avatar qyriad avatar rajkosto avatar roblabla avatar sciresm avatar someoneweird avatar tuxsh avatar wchill avatar yupferris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pegaswitch's Issues

switch cannot connect to computer

Hello,

Here is the exception:

D, [2017-03-13T22:04:36.482691 #7940] DEBUG -- : <> Receiving incoming query (43 bytes) to RubyDNS::UDPHandler...
D, [2017-03-13T22:04:36.483187 #7940] DEBUG -- : <47316> Processing question conntest.nintendowifi.net Resolv::DNS::Resource::IN::A...
D, [2017-03-13T22:04:36.483187 #7940] DEBUG -- : <47316> Searching for conntest.nintendowifi.net Resolv::DNS::Resource::IN::A
D, [2017-03-13T22:04:36.483187 #7940] DEBUG -- : <47316> Checking rule [/./, Resolv::DNS::Resource::IN::A]...
D, [2017-03-13T22:04:36.483187 #7940] DEBUG -- : <47316> Regexp pattern matched with #<MatchData "c">.
I, [2017-03-13T22:04:36.483187 #7940]  INFO -- : Resource class: Resolv::DNS::Resource::IN::A
E, [2017-03-13T22:04:36.483187 #7940] ERROR -- : <47316> Exception thrown while processing conntest.nintendowifi.net Resolv::DNS::Resource::IN::A!
E, [2017-03-13T22:04:36.483187 #7940] ERROR -- : ArgumentError: cannot interpret as IPv4 address: nil
E, [2017-03-13T22:04:36.483687 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/2.3.0/resolv.rb:2346:in `create'
E, [2017-03-13T22:04:36.483687 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/2.3.0/resolv.rb:2147:in `initialize'
E, [2017-03-13T22:04:36.483687 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubydns-1.0.3/lib/rubydns/transaction.rb:130:in `new'
E, [2017-03-13T22:04:36.483687 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubydns-1.0.3/lib/rubydns/transaction.rb:130:in `respond!'
E, [2017-03-13T22:04:36.483687 #7940] ERROR -- : rdns.rb:17:in `block (2 levels) in <main>'
E, [2017-03-13T22:04:36.483687 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubydns-1.0.3/lib/rubydns/server.rb:217:in `call'
E, [2017-03-13T22:04:36.483687 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubydns-1.0.3/lib/rubydns/server.rb:327:in `block (2 levels) in process'
E, [2017-03-13T22:04:36.483687 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubydns-1.0.3/lib/rubydns/server.rb:325:in `catch'
E, [2017-03-13T22:04:36.483687 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubydns-1.0.3/lib/rubydns/server.rb:325:in `block in process'
E, [2017-03-13T22:04:36.484187 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubydns-1.0.3/lib/rubydns/server.rb:322:in `each'
E, [2017-03-13T22:04:36.484187 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubydns-1.0.3/lib/rubydns/server.rb:322:in `process'
E, [2017-03-13T22:04:36.484187 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubydns-1.0.3/lib/rubydns/transaction.rb:192:in `process'
E, [2017-03-13T22:04:36.484187 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubydns-1.0.3/lib/rubydns/server.rb:106:in `block in process_query'
E, [2017-03-13T22:04:36.484688 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubydns-1.0.3/lib/rubydns/server.rb:98:in `each'
E, [2017-03-13T22:04:36.484688 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubydns-1.0.3/lib/rubydns/server.rb:98:in `process_query'
E, [2017-03-13T22:04:36.484688 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubydns-1.0.3/lib/rubydns/handler.rb:55:in `process_query'
E, [2017-03-13T22:04:36.484688 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rubydns-1.0.3/lib/rubydns/handler.rb:87:in `respond'
E, [2017-03-13T22:04:36.484688 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `public_send'
E, [2017-03-13T22:04:36.484688 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:26:in `dispatch'
E, [2017-03-13T22:04:36.484688 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/calls.rb:122:in `dispatch'
E, [2017-03-13T22:04:36.485187 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:60:in `block in invoke'
E, [2017-03-13T22:04:36.485187 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/cell.rb:71:in `block in task'
E, [2017-03-13T22:04:36.485187 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/actor.rb:357:in `block in task'
E, [2017-03-13T22:04:36.485187 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:57:in `block in initialize'
E, [2017-03-13T22:04:36.485187 #7940] ERROR -- : C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/celluloid-0.16.0/lib/celluloid/tasks/task_fiber.rb:15:in `block in create'
D, [2017-03-13T22:04:36.485187 #7940] DEBUG -- : <47316> Time to process request: 0.002s
D, [2017-03-13T22:04:36.485187 #7940] DEBUG -- : <47316> Writing 43 bytes response to client via UDP...

I tried the following options:

fails at connecting to router (in the animation)

ip address settings - automatic
dns settings - manual

  • primary dns 192.168.x.x (my computer's local ip)
  • secondary dns (same as primary)

proxy settings - off

fails at connecting to the internet (animation)

ip address settings - automatic
dns settings - manual

  • primary dns - 192.168.x.x (my computer's local ip)
  • secondary dns (same as primary)

proxy settings - on

  • server 192.168.x.x (same as primary dns)
  • port 8081
  • auto-authentication - off

any ideas how to make this work?

os: windows 10
ruby version - 2.3.3p222
nodejs 7.5.0
python 2.7.13

Can't connect to DNS

I've setup PegaSwitch and startet the DNS Server but when trying to connect my Switch to the DNS, my Switch returns a "Data Transmission failed" Error. Can someone help me with this Error?

Fails to install on windows 10.

Both npm and nodejs are running without issue.

I have installed the windows-build-tools globally prior to this.

pegaswitch_fail

Python is 2.7.

DNS setup error

When running sudo node start.js under Ubuntu, after installing everything, I get an error: There was an issue setting up DNS: bind EADDRINUSE 0.0.0.0:53
How would I fix this? I'm not exactly a linux noob but I'm not sure how to fix this myself.

Exploit failed on firmware 2.1.0

Got a Switch today, took an update from 1.0.0 to 2.1.0. Got DNS pointed to PegaSwitch and successfully loaded the exploit webpage on the device, but the exploit seems to be non-functional on this firmware version.

My logs read "Success percentage: 0.00 (100 samples). Exploit failed." . Let me know if I can assist in debugging in any way -- happy to try patches on my console for example.

ERROR: [ 408, '0x80e16 (Not initialized in module RO userland)' ]

When attempting to run the loadNro.js I am getting the above error.

Using Windows (for whatever reason, the linux subsystem within Windows wouldn't let me connect but doing node in Windows did)

Commands Issued:
switch 'woops' (3.0.0)> evalfile scripts/selftest.js
'no output'
switch 'woops' (3.0.0)> evalfile usefulscripts/loadNro.js
ERROR: [ 408, '0x80e16 (Not initialized in module RO userland)' ]

Debug Log:
ALL TESTS PASSED!
IPC message:

  • Command ID / Result code: Error: 0x80c16 (Already initialized in module RO userland)
    IPC message:
  • Command ID / Result code: Error: 0x80e16 (Not initialized in module RO userland)
    IPC message:
  • Command ID / Result code: Error: 0x80e16 (Not initialized in module RO userland)
    ERR [408]: 0x80e16 (Not initialized in module RO userland)
    ResultCode@exploit/ResultCode.js:15:0
    assertOk@exploit/ipc.js:555:0
    eval code

I looked and saw the nros/ace.nro file was there, not sure if this script is used for loading compiled modules or what....

Maybe if we are redirecting the output of the debug to a log that 'no output' should be changed to something like, 'check debug log for output' or something...

Switch seem to connect to computer, but not 100% working

So I have managed to run PegaSwitch, but only the cmd with rdns is working.
I start all command:

1

Then when I connect my Switch to internet:

2

My Switch Internet config:

  • IP address settings: automatic

  • dns settings: manual
    (Primary and secondary DNS = Computer IPv4 (192.168.001.028)

  • proxy settings - off

Is there something I did wrong ?

my 3.0.0 switch disconnects (error code 2168-0002) when i'm trying to load a .NRO file "help wanted"

hi when i'm trying to run a .NRO file on my 3.0.0 switch my switch gives me a black screen error code 2168-0002 and tell me to shutdown the console

Here is the log file :

Starting.
Building stuff.
Building stuff.
Found addresses!
b3a8460
3b
b3a2780
3b
b3a2740
3b
Building stuff.
Building stuff.
Inside o...
Success?
Cleaning up
Loading and running main
Loaded
Exploit triggered. Beginning breakage.
Disabling watchdog timer...
VM: 0x0000003b0b23d000
WD: 0x0000003b0b19e160
Pwning sdb module...
Starting sdbcore...
Pwning sdb...
Author ID: 2,9,109,192,80,231,66,8,160,154,214,94,144,160,136,145
mii handle is 0x39003b
wipe miis ...
reloading sdb, this might take a while ...
new sdb pid: 0x7e
new sdb pid: 0x7f
sdb pid is 0x7f this.sdb_base at 0x0000005e62200000
** good base ***
this.pdm_base at 0x0000005e62350ec0
writePdm ...
trigger ...
cleanup ...
entering pluhax ...
trigger ...
pluSP at 0x00000004ec9b4770
... write
... read
read value: 0x1122334429910baf
... call
call: 0x1122aabbf00d1234
Setting up RO hax...
Opening SM handle
0x0000000000000000
SM handle: e8018
0x0000000000000000
0
80000008
20
f0019
Port handle: f0019
IPC message:

PID: 0x0000000000000078
Moved handles
0x3e8039
ldr:ro is PID 0x78
IPC message:
IPC message:
Data
data+0x0 | 80 00 00 00 00 00 00 00 | ........ |
Pwned sdb...
Pegaswitch loaded!
UA: Mozilla/5.0 (Nintendo Switch; WifiWebAuthApplet) AppleWebKit/601.6 (KHTML, like Gecko) NF/4.0.0.6.9 NintendoBrowser/5.1.0.14936
Handle 0 ready
Accepted new pipe 10001a
Handle 1 ready
Got incoming message on 10001a
Writing handle
replyandreceive
Copying data
Done?
Attempting to respond
replyandreceive
0x000000000000ea01
Done?
Handle 1 ready
Got incoming message on 10001a
Writing handle
replyandreceive
Copying data
Done?
Attempting to respond
replyandreceive
0x000000000000ea01
Done?
Connected to PC...
Handle 1 ready
Got incoming message on 10001a
Writing handle
replyandreceive
Copying data
Done?
Attempting to respond
replyandreceive
0x000000000000ea01
Done?
Handle 1 ready
Got incoming message on 10001a
Writing handle
replyandreceive
Copying data
Pipe closed. Removing.
dynamic offset: 0xf1a0
IPC message:
NRO loaded at 0x0000002a7f083000
closing sm and jumping...
Here is a pic :

pegaswitch

i don't know what to do can anyone help me??

"help wanted"

Need docs and better examples for IPC API

I feel like our IPC API can take a little getting used to, and there is very little public documentation; pretty much all anyone has to go off of are the few included scripts.

Error code 2168-0002 happens immediately on switch when running exploit instead of connecting

Hi guys. Running into the above error when running pegaswitch on a 64bit Mint 18.2 install in a VM, with proper network settings enabled in Virtualbox to let its IP be seen on the network.

FYI, my switch is on Firmware 2.3.0. I missed the opportunately to system update to 3.0; and I've only got Zelda, so no cart updating to 3.0 for me, for now.

The pegaswitch install went fine, the script launches correctly (after killing-dnsmasq-shenanigans of course), and announces itself properly on the network, the Switch properly latches onto it, displays the pegaswitch logo, etc,........but dies the instant the exploit is triggered, every time. I have screenshots of the output (attached).
virtualbox_linux mint_07_10_2017_02_26_32

What Do I change the DNS to and do I have to change the TCP/UDP ports?

C:\Users\aidan\PegaSwitch-master>ruby rdns.rb $192.168.56.1
I, [2017-03-14T16:09:08.644173 #12936] INFO -- : Starting RubyDNS server (v1.0.3)...
I, [2017-03-14T16:09:08.644173 #12936] INFO -- : <> Listening on udp:0.0.0.0:53
I, [2017-03-14T16:09:08.659645 #12936] INFO -- : <> Listening on tcp:0.0.0.0:53

With this, what settings would I change on my switch?

Exploit failed on 3.0.0, Access to latest version

I'm trying to get pegaswitch to run, to do some switch investigations and learn about its internals.

Running 3.0.0, however i get the

Sucess percentage: 0.00
Exploit failed.

I am assuming this is due to the public build not including the exploit used for 3.0.0.
Is there anyway to get access to such version?

Thanks

Unable to see consoles

I've connected my switch (exploit failed the first time, but on the second attempt it works).
I used "consoles" to get connected console, but I only get

switch> consoles



switch>

Le lancement de PegaSwitch sur 3.0.0 provoque l'erreur 2011-0301

Une fois PegaSwitch lancé et toutes les action effectués, l'écran de la Switch affiche ce message d'erreur :

Code d'erreur : 2011-0301
Une erreur est survenue.

Appuyer sur le bouton d'alimentation et redémarrez la console.
Si vous ne parvenez pas à redémarrez la console, maintenez le
bouton d'alimentation pendant 12 secondes pour l'éteindre.

Si le problème persiste, consultez le site suivant :
support.nintendo.com/switch/error

(X1) XAJ4000***** (Numéro de série de la console)
(X2) 3.0.0

Au redémarrage on obtient une fenêtre avec ceci (Il me semble que celui là est normal) :

Code d'erreur : 2812-0001
Les données du Mii étaient corrompues et ont été effacées.

OK

Puis, la Switch redémarre .

"node debug.js" returns errors

node debug.js
/Users/jaisongreen/Projects/PegaSwitch/debug.js:30
let connection
^^^

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:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:968:3

running node using "use_strict" produces more errors.

node --use_strict debug.js
/Users/jaisongreen/Projects/PegaSwitch/debug.js:42
function sendMsg (cmd, args = []) {
                            ^

SyntaxError: Unexpected token =
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:968:3

QueryMem Dump Unstable

Regression caused by 1f0da11 causes random crashes when querying memory addresses (with sc.memdump commented out). Commits prior to this have no such issue and are able to query the full address range.

Automatically close browser when exploit fails

We may want to show a message to the first-time user explaining that the browser will have to be restarted, but for someone who has already done this twenty times that day, it might save them a little bit of time.

Switch does not execute javascript

Hello, I am unable to get the switch to execute the pegaswitch javascript, with DEBUG enabled here is the switch getting the page:

Waiting for connection..
  express:router dispatching GET / +1m
  express:router query  : / +1ms
  express:router expressInit  : / +1ms
  express:router jsonParser  : / +1ms
  body-parser:json skip empty body +0ms
  express:router dispatching GET / +2s
  express:router query  : / +0ms
  express:router expressInit  : / +1ms
  express:router jsonParser  : / +0ms
  body-parser:json skip empty body +0ms

But it never seems to execute javascript like chrome does:

  express:router dispatching GET / +12ms
  express:router query  : / +1ms
  express:router expressInit  : / +0ms
  express:router jsonParser  : / +0ms
  body-parser:json skip empty body +0ms
  express:router dispatching GET /minmain.js +26ms
  express:router query  : /minmain.js +1ms
  express:router expressInit  : /minmain.js +0ms
  express:router jsonParser  : /minmain.js +0ms
  body-parser:json skip empty body +0ms
  express:router dispatching GET /bundle.js +2s
  express:router query  : /bundle.js +0ms
  express:router expressInit  : /bundle.js +0ms
  express:router jsonParser  : /bundle.js +1ms
  body-parser:json skip empty body +0ms
  express:router dispatching POST /log +217ms
  express:router query  : /log +0ms
  express:router expressInit  : /log +1ms
  express:router jsonParser  : /log +0ms
  body-parser:json content-type "application/json" +0ms
  body-parser:json content-encoding "identity" +0ms
  body-parser:json read body +0ms
  body-parser:json parse body +1ms
  body-parser:json parse json +0ms

On the switch I see an error that it can't connect to the internet rather than any html.

Am running on OSX and switch system v2.0.0.

Thanks!

Multiple consoles connected to PegaSwitch

I think it'd be cool to be able to connect multiple Switches to PegaSwitch at once. Give each one a name, include it in the prompt, and have a command to change which console is "active". This requires some method of uniquely identifying the console, assigning a name, and keeping track of these assignments. set:sys#68 GetSerialNumber() might be a good choice for the unique ID.

Unable to verify NRO hash or NRR signature in module RO userland

I'm encountering this error when using runnro for any of the test nro files.

Here's the end of the log file:

Writing handle
replyandreceive
Copying data
Pipe closed. Removing.
dynamic offset: 0xf1a0
IPC message:

  • Command ID / Result code: Error: 0x1216 (Unable to verify NRO hash or NRR signature in module RO userland)
    IPC message:
  • Command ID / Result code: Error: 0x1216 (Unable to verify NRO hash or NRR signature in module RO userland)
    error in then()
    ERR [409]: 0x1216 (Unable to verify NRO hash or NRR signature in module RO userland)
    ResultCode@exploit/ResultCode.js:15:0
    assertOk@exploit/ipc.js:555:0
    http://ctest.cdn.nintendo.net/bundle.js:1772:133
    getService@exploit/ipc.js:665:0
    http://ctest.cdn.nintendo.net/bundle.js:1761:16
    promiseReactionJob@null:null:null

sdbcore is already set to true in config.json

Has anyone else encountered this issue before?

Can't Connect

I followed all of the instructions.
When I do it with proxy it gives me cannot connect to server after about 5 minutes.
When I use it it without proxy it cannot read DNS name resolution. The settings for my proxy are as follows.

Server:192.168.1.9
Port:53
Auto Authentication: Off

My DNS settings are as follows.

Primary DNS: 192.168.001.009
Secondary DNS: 192.168.001.009

I tried it without the secondary DNS too, what can I do?

Error Connecting to switch

It says this when it Trys to connect to my switch

starting.
building stuff.
building stuff.
ERR [56]: TypeError null is not an object (evaluating 'vr.track.kind')

Error: listen EACCES 0.0.0.0:80

I have encountered an error, given with the following stack trace:

$ sudo node start.js
events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: listen EACCES 0.0.0.0:80
    at Object._errnoException (util.js:1021:11)
    at _exceptionWithHostPort (util.js:1043:20)
    at Server.setupListenHandle [as _listen2] (net.js:1327:19)
    at listenInCluster (net.js:1385:12)
    at doListen (net.js:1494:7)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
    at Function.Module.runMain (module.js:667:11)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

I am not entirely sure what to make of it. I'm in the process of installing PegaSwitch from scratch after updating to Ubuntu Xenial on WSL.

Waiting for connection

I can get my switch to connect to the capture page, and in the debug log it says that it starting, however in the REPL window it says that it is still waiting for a connection. What should I do to fix this? I am running on Ubuntu and I have node, python, and ruby installed.

pegaswitch

Javascript REPL

The current REPL does not have support for saving values and references to variables, and they must instead be copy/pasted. To add to that, some people are having issues copy/pasting out of the curses interface (holding shift works).

Also, much functionality is hidden and commented out. In order to enable this, the code must be changed, which involves reloading the webpage on the Switch.

If the REPL were changed to a Javascript prompt, it would solve all these problems and more. NPM packages and node.js libraries would be available, which, for example, would make it easier to save and load data to and from files.

switch disconnects when i'm running .NRO file

hi when i'm trying to run a .NRO file on my 3.0.0 switch my switch gives me a black screen and tell me to shutdown the console

Here is the log file :

Starting.
Building stuff.
Building stuff.
Found addresses!
b3a8460
3b
b3a2780
3b
b3a2740
3b
Building stuff.
Building stuff.
Inside o...
Success?
Cleaning up
Loading and running main
Loaded
Exploit triggered. Beginning breakage.
Disabling watchdog timer...
VM: 0x0000003b0b23d000
WD: 0x0000003b0b19e160
Pwning sdb module...
Starting sdbcore...
Pwning sdb...
Author ID: 2,9,109,192,80,231,66,8,160,154,214,94,144,160,136,145
mii handle is 0x39003b
wipe miis ...
reloading sdb, this might take a while ...
new sdb pid: 0x7e
new sdb pid: 0x7f
sdb pid is 0x7f this.sdb_base at 0x0000005e62200000
** good base ***
this.pdm_base at 0x0000005e62350ec0
writePdm ...
trigger ...
cleanup ...
entering pluhax ...
trigger ...
pluSP at 0x00000004ec9b4770
... write
... read
read value: 0x1122334429910baf
... call
call: 0x1122aabbf00d1234
Setting up RO hax...
Opening SM handle
0x0000000000000000
SM handle: e8018
0x0000000000000000
0
80000008
20
f0019
Port handle: f0019
IPC message:

  • PID: 0x0000000000000078
  • Moved handles
    • 0x3e8039
      ldr:ro is PID 0x78
      IPC message:
      IPC message:
  • Data
    data+0x0 | 80 00 00 00 00 00 00 00 | ........ |
    Pwned sdb...
    Pegaswitch loaded!
    UA: Mozilla/5.0 (Nintendo Switch; WifiWebAuthApplet) AppleWebKit/601.6 (KHTML, like Gecko) NF/4.0.0.6.9 NintendoBrowser/5.1.0.14936
    Handle 0 ready
    Accepted new pipe 10001a
    Handle 1 ready
    Got incoming message on 10001a
    Writing handle
    replyandreceive
    Copying data
    Done?
    Attempting to respond
    replyandreceive
    0x000000000000ea01
    Done?
    Handle 1 ready
    Got incoming message on 10001a
    Writing handle
    replyandreceive
    Copying data
    Done?
    Attempting to respond
    replyandreceive
    0x000000000000ea01
    Done?
    Connected to PC...
    Handle 1 ready
    Got incoming message on 10001a
    Writing handle
    replyandreceive
    Copying data
    Done?
    Attempting to respond
    replyandreceive
    0x000000000000ea01
    Done?
    Handle 1 ready
    Got incoming message on 10001a
    Writing handle
    replyandreceive
    Copying data
    Pipe closed. Removing.
    dynamic offset: 0xf1a0
    IPC message:
    NRO loaded at 0x0000002a7f083000
    closing sm and jumping...

Here is a pic :

pegaswitch

i don't know what to to:(

Is Creating a DNS Server supposed to take this long.

It has been about five minutes and it is still on this screen
ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32]

C:\Users\aidan>cd PegaSwitch-master

C:\Users\aidan\PegaSwitch-master>ruby rdns.rb $192.168.56.1
I, [2017-03-14T16:09:08.644173 #12936] INFO -- : Starting RubyDNS server (v1.0.3)...
I, [2017-03-14T16:09:08.644173 #12936] INFO -- : <> Listening on udp:0.0.0.0:53
I, [2017-03-14T16:09:08.659645 #12936] INFO -- : <> Listening on tcp:0.0.0.0:53

Is it supposed to take this long?

Pegaswitch dns server

It seems as though the switch can't connect to the dns server pegaswitch makes, or the program doesn't set one up in the first place.

I'm running ubuntu, followed all the instructions. The terminal gives no errors, but the console doesn't connect to the dns I set up in the settings.

Npm install problem

Error during npm install :
image
I try everything, I installed python, other versions of node, removed cache, run as administrator.
But it doesn't work

evalfile responds w/ "no output"

pegaswitch is on screen and switch is connected
input> evalfile ./usefulscripts/SetupNew.js
I receive>no output

       I am launching on WSL with>node start.js --disable-curses --logfile debug.txt

otherwise I get a blank log file with>node start.js

Please Help (sry)

First, I used CD to go into the pegaswitch-master folder, and than typed, npm install. After that, I typed pip2 install flask but it gave the following message.

'pip2' is not recognized as an internal or external command,
operable program or batch file.

After this, I decided to skip that step and try to do the rubydns part. When I typed it in without starting the Command line with ruby, it gave me another error. When I tried to do it by running the command line by ruby, it said error loading file.

What did I do wrong? Sorry to trouble you, im a bit of a newbie.

Ruby DNS error when running with Ruby:
ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32]

C:\Users\aidan>cd PegaSwitch-master

C:\Users\aidan\PegaSwitch-master>ruby rdns.rb $192.168.56.1
C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- rubydns (LoadError) from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require'
from rdns.rb:2:in `

'

C:\Users\aidan\PegaSwitch-master>cd Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in
The filename, directory name, or volume label syntax is incorrect.

C:\Users\aidan\PegaSwitch-master>

Pip2 Install Flask Error:

C:\Users\aidan\PegaSwitch-master>pip2 install flask
'pip2' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\aidan\PegaSwitch-master>

[Feature Request] Promise driven PegaSwitch

As discussed in Discord earlier, it would be really nice to see a cleaner API for evaled files.

sc.getService("set:sys", (setsys) => {
	sc.getService("set:fd", (setfd) => {
		[...]
	});
});

In the SetupNew.js file, callbacks can become very nested. Adding promises / async code would help alleviate this problem.

sc.getService("set:sys")
  .then((setsys) => sc.getService("set:fd"), rejected)
  .then((setfd) => { [...] }, rejected);
async function example() {
  try {
  const setsys = await sc.getService("set:sys");
  const setfd = await sc.getService("set:fd");
  } catch (e) {
    //rejected
  }

  [..] // has access to setsys and setfd
}

The advantage is that no matter how many services you call, they are all processed sequentially and the code stays in a direction that moves your eyes down, has less brackets, and overall leads to less bugs.

Here is an initial implementation using it on just the start.js file. I plan to continue developing it but just got a small start on it for an example:
https://github.com/JoelLarson/pegaswitch/tree/feature/promise-driven

Open a Gitter Chat room ?

Not an issue sorry... but...Why dint you open a gitter chat room for this repostory and for the community i think it would be a great idea and id get involved myself ?

DNS does not setup

Hi is there anyone That can help me with this issue.
There was an issue setting up DNS: bind EADDRINUSE 0.0.0.0:53

Discord code not working

Sorry to open another issue, the discord code says invalid or expired, any chance of getting a new invite or contacting me ? Thanks

automatically reconnect to repl if disconnected

If disconnected from the REPL, PegaSwitch should try to automatically reconnect. This would make it significantly easier to restart the REPL after some new change without having to reload PegaSwitch.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.