Coder Social home page Coder Social logo

ftpd's People

Contributors

archshift avatar averne avatar d0k3 avatar fincs avatar frogomeli avatar hikari-chin avatar joshenders avatar justinkb avatar mid-kid avatar mtheall avatar riccardocossu avatar thedax avatar titegtnodi avatar tuxsh avatar wintermute avatar wmedlar avatar yellows8 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

ftpd's Issues

Important things needed

Yes, I do know I have posted this before and you should know too, but I have found something that is not too expensive on the resources side of the 3DS. This will allow FTP over TLS on the 3DS without using way too much resources if you go to and use matrixssl , as I read it says that matrixssl is very lightweight meaning that you know, it would not use so much resources to create a FTP over TLS connection. Just go to matrixssl.org and you will see it. You should also enable a password (which should be optional too) that can be changed so nobody can accidentally or purposefully access the 3DS system and mess up some files in it. I ended up finding matrixssl just by doing a tiny bit of research, but I guess this might help or not.

How to build and install?

Hi,
I had no trouble building it (I got the 3dsx file and all without error) and copied it in the 3ds/ftpbrony folder on my sd card. But homebrew launcher won't recognize it. Is it meant to work this way?
A few documentation lines could help, please.

ftBrony doesn't react to the B button at all times

It only reacts after additional FTP commands. In Windows Explorer, f.e. you have to push the B Button on the 3DS (seemingly nothing happens) -> refresh or change the folder in Windows Explorer (it fails in WIndows Explorer, but on the 3DS you get the "Push B to quit message") -> push B again to quit.

I think (I'm not sure) the reason is in the ftp_session_read_command(ftp_session_t *session) function, more specifically in the line saying:
rc = recv(session->cmd_fd, buffer, sizeof(buffer), 0);

No idea how to properly fix this yet, though.

Doesn't always connect.

IDK why, but old versions of FTPD don't give me this problem. version 1.0 of FTBrony was snappier (and had a really unique interface), I clicked connect, it went ahead and did that. Now... I have to wait like 20 secs, even 30, when the FTP client says timeout... Why does this happen? And does it happen to me only? Filezilla keeps telling me waiting for welcome message, and WinSCP just spits up timeouts.

Your app broke my 3ds :(

I installed your app via the qr code and wanted to transfer a file to the 3ds but it was read only. Then I turned off the console. When I now try to start my console the screen just keeps black.

Lockup problem

Using heimdal-ftp on Linux, I try to connect and manage to connect. Then I do a ls or get. The result: ftpd displays "502 Invalid command "EPRT|1|192.168.1.2|52727"

It then locks up and refuses to respond to the Home button or anything else until the ls command times out.

It shouldn't lock up, and also you'd probably be better off returning a response code 522 indicating that you don't support ipv6.

I am able to connect using other ftp clients that apparently don't try to use ipv6.

Press HOME button cannot exit

At any moment I press B then it shows "Press the Home Button to exit", no button functions any more so I need to hard shutdown the device

using ftpd.cia via Luma3DSv6.1.1
ftpd v2.2-17f1036c
JPN 3DSL sys v11.0 (arm9ed)

Latest commit doesn't show directories

Not sure which commit changed things but I just built ftpd with a fresh clone and all directories show up as files that can't be downloaded. I use filezilla.

Command support for Chrome and similar

Using Chrome browser as client, the following commands are sent giving the errors;
SIZE / -> 550 Could not get file size.
LIST -l -> 550 No such file or directory
Only a minor issue, since there are other working clients.

Large Folders Display Empty on Client

Folders with a large total file size (i.e. multiple cart dumps) can be opened on the client, but show nothing inside of them. Total file size in the folder when this happened was a little over 2.2 GB, and individual file sizes ranged from 256 MB to 1 GB. Files in this folder showed up fine on the client when the total size in the folder was ~1.2 GB. I don't know enough about FTP to know if this is an inherent limitation or not, or if it is related to issue #38, which covered large individual files.

Anyway, I thought I should let you know just in case you didn't already. Thank you for a great program!

Not Working on 3DSXL with Emunand 11.1.0-34E

Im using this with rxtools. Installed the CIA no Problem. Displaying the Ip number 192.168.1.30 Port 5000. Tried to connect via firefox (ftp://192.168.1.30:5000) not working. Tried to connect via Filezilla not working.

Edit. Solved it myself. 3ds was running on guest network where i locked access to local network. well stupid me :D

Large file transfers time out after a long period of time.

I currently use FTPD for transferring things such as CIA files and ROMFS files, but some of the files are large and then after a long period of time, FTPD decides to close the connection to the client that is in the middle of a large transfer. This doesn't happen when you transfer lots of amounts of small files. I managed to stop it from timing out by opening an unopened folder to request some file data from the folders to prevent it from closing the connection. This gets very annoying after a while.

BTW, I can't use the SD card on my PC because it says that the file format is unrecognized, so my only option is FTPD, especially because I have used more than 8GB of storage on my SD card.

Can't upload .mp3 files.

Tried uploading a .mp3 using FileZilla Client for Windows, but it keeps saying "Replace file" - do idea why this happens...

Doesn't work with ES File Explorer for Android or XBMC, either.

Thanks for the Homebrew!

Build error, is it my devkitARM install?

make[1]: Entering directory '/home/adrian/ftpd'
console.c
arm-none-eabi-gcc -MMD -MP -MF /home/adrian/ftpd/build/console.d -g -Wall -O3 -mword-relocations -march=armv6k -mtune=mpcore -mfloat-abi=hard -DSTATUS_STRING="\"ftpd v2.2\"" -I/home/adrian/ftpd/include -I/home/adrian/devkitPro/libctru/include -I/home/adrian/ftpd/build -DARM11 -D_3DS -c /home/adrian/ftpd/source/console.c -o console.o
/home/adrian/ftpd/source/console.c: In function 'print_tcp_table':
/home/adrian/ftpd/source/console.c:73:10: error: unknown type name 'SOCU_TCPTableEntry'
   static SOCU_TCPTableEntry tcp_entries[32];
          ^
/home/adrian/ftpd/source/console.c:81:8: warning: implicit declaration of function 'SOCU_GetNetworkOpt' [-Wimplicit-function-declaration]
   rc = SOCU_GetNetworkOpt(SOL_CONFIG, NETOPT_TCP_TABLE, tcp_entries, &o        ^
/home/adrian/ftpd/source/console.c:81:27: error: 'SOL_CONFIG' undeclared (first use in this function)
   rc = SOCU_GetNetworkOpt(SOL_CONFIG, NETOPT_TCP_TABLE, tcp_entries, &o                           ^
/home/adrian/ftpd/source/console.c:81:27: note: each undeclared identifier is reported only once for each function it appears in
/home/adrian/ftpd/source/console.c:81:39: error: 'NETOPT_TCP_TABLE' undeclared (first use in this function)
   rc = SOCU_GetNetworkOpt(SOL_CONFIG, NETOPT_TCP_TABLE, tcp_entries, &o                                       ^
/home/adrian/ftpd/source/console.c:86:36: error: 'SOCU_TCPTableEntry' undeclared (first use in this function)
     for(i = 0; i < optlen / sizeof(SOCU_TCPTableEntry); ++i)
                                    ^
/home/adrian/ftpd/source/console.c:88:27: error: 'entry' undeclared (first use in this function)
       SOCU_TCPTableEntry *entry  = &tcp_entries[i];
                           ^
/home/adrian/ftpd/source/console.c:95:14: error: 'TCP_STATE_CLOSED' undeclared (first use in this function)
         case TCP_STATE_CLOSED:
              ^
/home/adrian/ftpd/source/console.c:97:14: error: 'TCP_STATE_LISTEN' undeclared (first use in this function)
         case TCP_STATE_LISTEN:
              ^
/home/adrian/ftpd/source/console.c:99:14: error: 'TCP_STATE_ESTABLISHED' undeclared (first use in this function)
         case TCP_STATE_ESTABLISHED:
              ^
/home/adrian/ftpd/source/console.c:101:14: error: 'TCP_STATE_FINWAIT1' undeclared (first use in this function)
         case TCP_STATE_FINWAIT1:
              ^
/home/adrian/ftpd/source/console.c:103:14: error: 'TCP_STATE_FINWAIT2' undeclared (first use in this function)
         case TCP_STATE_FINWAIT2:
              ^
/home/adrian/ftpd/source/console.c:105:14: error: 'TCP_STATE_CLOSE_WAIT' undeclared (first use in this function)
         case TCP_STATE_CLOSE_WAIT:
              ^
/home/adrian/ftpd/source/console.c:107:14: error: 'TCP_STATE_LAST_ACK' undeclared (first use in this function)
         case TCP_STATE_LAST_ACK:
              ^
/home/adrian/ftpd/source/console.c:109:14: error: 'TCP_STATE_TIME_WAIT' undeclared (first use in this function)
         case TCP_STATE_TIME_WAIT:
              ^
/home/adrian/devkitPro/devkitARM/base_rules:84: recipe for target 'console.o' failed
make[2]: *** [console.o] Error 1
Makefile.3ds:133: recipe for target 'build' failed
make[1]: *** [build] Error 2
make[1]: Leaving directory '/home/adrian/ftpd'
Makefile:6: recipe for target 'all' failed
make: *** [all] Error 2

Also, is there a CIA version?

.cia version crashes on N3DS; works on O3DS.

I compiled the latest commit as a .cia (both with and without #47 fixed), and it crashes to the "An error has occurred. Hold down the ..." screen for me and a few others. However, people in the #cakey IRC channel reported that the .CIA I compiled works fine on O3DS, so this issue appears to be N3DS only; might be USA only as well, no one with a EUR/JPN unit was around to test. ErrDisp seems to say that the Home Menu is complaining about fs not finding something:

FATAL ERROR 

PID: 0x00040030_00008F02
REV: 61806
AID: 0xFFFFFFFF_FFFFFFFF
ADR: 0x00229338
RSL: 0xC8804478
          Level: -7 (this should be 25, some sort of display error)
          Summary: 4
          Module: 17
          Desc: 120

Makefile doesn't properly generate the .smdh while building as a .cia, resulting in a blank icon.

Not a big issue, but a few folks in #cakey noticed if you attempt to build ftpd as a CIA, the icon isn't generated properly and results in the CIA having a blank square for an icon. The issue seems to be the smdh generation in Makefile.3ds being commented out:

#$(OUTPUT).smdh : $(APP_ICON)
# @bannertool makesmdh -s "$(APP_TITLE)" -l "$(APP_DESCRIPTION)" -p "$(APP_AUTHOR)" -i $(APP_ICON) -o $@
# @echo "built ... $(notdir $@)"

The icon was generated correctly when those lines were un-commented out.

Implement SIZE command

Hey,

Dolphin (the KDE file manager for Linux) uses the FTP SIZE command to show file sizes in the GUI. It would be great if this could be implemented.

Fail to retrieve file list when there are too many files/folders

If there are too many files/folders in a single directory, file list will fail. I don't know the exact number of files that triggers this.

This could also explain why dumping a directory with 149 files won't properly work (Pokemon Rumble World savegame)

Error in increase sndbuf and rcvbuf.

The ftp server is so slow.
I noticed the socket send/recv buf is only 8192 and try to increase it.
Get error message: "22 Invalid Argument".
Anything wrong? Or just not support to change it?
Here is the code I add in function ftp_set_socket_nonblocking.

  int rcvbuf, sndbuf;
  socklen_t len = 4;
  getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &rcvbuf, &len);
  console_print(YELLOW "SO_RCVBUF = %d  len %d (before set it)\n" RESET, rcvbuf, len);

  rcvbuf  *= 2;
  if(setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &rcvbuf, sizeof(rcvbuf)) < 0) {
    console_print(RED "setsockopt: %d %s\n" RESET, errno, strerror(errno));
  }
  getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &rcvbuf, &len);
  console_print(YELLOW "SO_RCVBUF = %d (after set it)\n" RESET, rcvbuf);


  getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &sndbuf, &len);
  console_print(YELLOW "SO_SNDBUF = %d  len %d (before set it)\n" RESET, sndbuf, len);

  sndbuf *= 2;
  if(setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &sndbuf, sizeof(sndbuf)) < 0) {
    console_print(RED "setsockopt: %d %s\n" RESET, errno, strerror(errno));
  }
  getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &sndbuf, &len);
  console_print(YELLOW "SO_SNDBUF = %d (after set it)\n" RESET, sndbuf);

Add MLSD command

Hi there – currently, the FTP server only supports the LIST command for directory listings. Although this is fine, it’s a difficult format for some libraries to parse. The MLSD command, on the other hand, provides a standardized, easily-dealt-with response that would help library development.

Info on the command: https://tools.ietf.org/html/rfc3659#page-23

Would it be possible to include this command?

not working when internet is down...

why FTDP doesn't work when there's no internet but the router wifi works fine... i mean, both 3ds and PC still are conected in the local network...
thanks...

SIZE command not accepted

Server: 3DS ftpd v2.2
Client: Linux curlftpfs

Checked with Wireshark:

SIZE SEF10171519_boot11_00.bin
502 Invalid command "SIZESEF10171519_boot11_00.bin"

Note that in the response to the SIZE command, the space between command and argument is missing. Could this indicate a processing error in the ftpd or just a formatting error in the reply?

Strange IP address

This isn't necessarily a problem with ftpd, but when I launch ftpd, my 3DS gets assigned an unusual IP address, and I can no longer connect to it using filezilla. My IP address was 10.0.1.7, has something similar occurred to anyone else?

Doesn't send 220

Normal servers send 220 after logging in to indicate that it it ready for the new client. As ftbrony doesn't send this after someone logs in some clients just throw an error and don't connect.

Maybe add a WiFi signal rate and or battery rate?

For example using a 5 bar system, all five bars coloured in = perfect as can be signal, 4 out of 5 = 80% signal strength, 3 out 5 = 60% signal strength, 2 out of 5 = 40% signal strength, 1 out of 5 = 20% signal strength and no bars coloured = WiFi turned off or no WiFi is found because the signal is so weak that it can't even connect.

Or could use a more detailed method using percentages from 0% to 100% rather than bars of signal which would work too.

And assuming you will be transferring over large amounts of files or a large file, a battery indicator would be nice, either a detailed percentage 0 to 100%, estimated remaining time left of battery or a bar method works too.

Frozen console when closing the lid

Console: N3DS 11.1
Version: 2.2 CIA

When I closed the console, screen went black and transfer stopped. When opening the lid, screen is off and the console is frozen.

No FTP over TLS?

A more secure and error free way of transferring files wirelessly.....so if a file transfers over corrupted, it will re-do the transfer or at least redownload the corrupted bits, whereas without TLS, you wouldn't know if the file is corrupted or not on transfer until you try out the file in whatever program it is you need it for and it turns out to be a dud....requiring you to re-transfer the file again...

Building as 3DS / CIA

This is rather an enhancement than a bug, but would adding .CIA / .3DS build goals be possible? It has been done, f.e. in this fork of ftpd:
https://github.com/FloatingStar/FTP-GMX

It requires including a few additional binaries (bannertool, makerom, info.rsf). For the two executables - those could be included as submodules and compiled from source (so that it will still be platform independent).

I'd be willing to do the pull request for this if you are interested.

REQ: Toggle Screen Blanking

GREAT app. Could we get a toggle button that shuts the screen off while transferring? FTPing 20GB takes a long time - would be GREAT if we could just toggle off the screens. Thanks!

Code not compiling

We tried to make on Linux but got error report saying a lot of variables not declared. . . I saw there's an update post on devkitARM. . Not on 3ds so I am not very sure if the not compiling issue is generated by that.
What I do is just go to the folder where I put every code and makefiles. Then I type make
Or if anyone can tell me if it still compile on Windows? And how about after installing the devkitARM last update on Nov 16

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.