porting Dropbear to the Wii
auntieneo at gmail.com
Mon Mar 16 06:48:44 WST 2009
Nevermind. I looked at PSPSSH's terminal emulator and it looks like
something I could definitely use.
I might resurrect this thread once I have something interesting. Until
then, thanks for all the help!
On Sun, Mar 15, 2009 at 12:00 PM, Jonathan Glines <auntieneo at gmail.com> wrote:
> Actually, concerning the terminal emulator, the printf library that
> I'm using for the Wii supports VT terminal escape codes. I was able to
> change the row and column with printf("\x1b[%d;%dH", row, column); and
> set the foreground color to red with printf("\x1b[31;42m");. The
> background color did not change to green like I expected, but I don't
> think that is much of a problem. Is this fancy printf enough to
> implement a simple terminal emulator? Or is it more involved?
> I've been reading through SSH's RFC and Dropbear's source at the same
> time, and Dropbear's source is way easier to follow than OpenSSH's.
> Nice work. :)
> On Sun, Mar 15, 2009 at 1:32 AM, Matt Johnston <matt at ucc.asn.au> wrote:
>> It certainly should be doable, though I don't know what the
>> Wii platform is like. Take a look at common-session.c for
>> the main select() loop - if the Wii doesn't have posix
>> sockets then you'll need to replace that and other calls to
>> read()/write() and setting up non-blocking sockets.
>> Dropbear doesn't use threads so you'll be OK there. You will
>> probably need to generate your own entropy for the PRNG -
>> moving a controller around for several seconds and hashing
>> the output is a popular way.
>> For a client you'll also need a terminal emulator. Writing
>> one from scratch would be non-trivial I think, though some
>> may already exist for the Wii? Otherwise I guess you could
>> port PuTTY or something similar. (In which case you might
>> want to look at its SSH code instead).
>> Have a look at PSPSSH, a port to the PSP that might have had
>> to solve similar problems.
>> On Sat, Mar 14, 2009 at 02:47:49PM -0600, Jonathan Glines wrote:
>>> Hello everyone. I'm a freshmen in college and need to write something
>>> security-related for a class. After discovering how easy it is to
>>> write homebrew for the Nintendo Wii, I set my sights on writing
>>> something for that platform. Since SSH pretty much rules my life, I
>>> decided to look for relatively simple SSH client I might be able to
>>> port, which brought me to Dropbear.
>>> Now, I know the Wii isn't exactly POSIX compliant; I don't think
>>> there's much of an operating system to speak of. Any port of Dropbear
>>> will probably end up being more of a fork then a port. However, there
>>> is an FTP server and a few other networked apps written for the Wii,
>>> so I'm sure an SSH client is possible. But is a Dropbear port
>>> I'm worried about the POSIX libraries that I won't be able to use,
>>> such as network, time, threads, and entropy. Plus, I'm not well versed
>>> in this stuff to begin with. But this is stuff I would really like to
>>> learn, especially the networking. What parts of the code do you think
>>> I will have to rewrite?
>>> Anyway, I just started this yesterday, and I'm not sure if I can do
>>> it. Any tips, criticism, or words of encouragement would be greatly
>>> appreciated. I'm prepared for blood and sweat if I'm going to get this
>>> to work. ;)
More information about the Dropbear