How does FTP work - ftp

I want to make my own ftp server software. I know, there are many ftp servers ready to install that have many features, but I still want to make my own, cause I can customize it and make it the way I want. Also, I find it fun to code, and I would rather make my own FTP server instead of downloading one that is ready to use if I have time. The problem is I can't find any information on how the protocol works and stuff like that. I would appreciate it if someone could explain how the protocol works or at least send me to a page that has useful information. Thanks!

If you are curious about beeing downvoted, here the explanation:
When planning a homebrew ftp program, it is a good point to google about FTP. Soon you will find RFC`S (that is "Request For Comment"), where things like the FTP protocol are described.
Thats a good starting point.
Then, when you have troubles with specific points, come back, show your code here, and ask for help.

Related

Is there any way to see a list of other files that a torrents peers is sharing?

I am not sure if this is the right place to ask this question. Mods please feel free to move it if feel so
I am downloading a file (an old rare map-history) via torrents. There is a couple of peers who probably have similar interests in history and maps and they might have more maps in their collection which they are currently sharing. Is there any way to see what else are they sharing?
Short answer - no. That would be really bad for anonymity and wouldn't work logistically with the torrent protocol. The only way you could find out what they are seeding if by cross-checking the IP of the peers you connect to on other similar torrents / on the same website with their ip.

Anybody knows the technology approach behind livelook.com's concept?

Livelook.com "shares" screens without requiring shared parties to download nor install anything. These are my guesses on how it works:
Proxy server keeping track of shared parties who both are browsing the same website (thus not really screen sharing)
Interaction is being "recorded" by host side javascript and then serialized over to the client's javascript (ajax) who will then have to de-serialize the actions from the host and mimic the behaviour.
Anyone else has a take on this?
I did some research on this, and I'm pretty sure it uses Java since that is one of the requirements.
"To use LiveLOOK's screen sharing and co browsing products you will need a browser and java. Java is typically pre-installed on all computers. If your computer d..."
http://www.livelook.com/faq.asp
Here is perhaps how they get access to the screen:
http://www.daniweb.com/software-development/java/code/216988/java-code-to-capture-your-screen-as-image
But I'm a C++ man so, I wouldn't know if there's a better way to do things like that in Java.

Some way to send data from one FTP server to another without intermediary?

I'm trying to move a large amount of files from one CDN to another. I know that they have a very high-speed connection to each other, so what I'd like to do is connect them directly, but the only protocol I have access to with each is FTP. Is there any way to log into the current CDN and send their files to the other FTP? It seems like it should be possible, I just have no idea how to do it.
FXP: see Wikipedia article. Powerful FTP clients are capable of doing this. From protocol point of view it's trivial.
BTW this question is probably offtopic here.

How to set up a computer network with ruby

I would like to set up a network with some computers I have, where they can connect to one main source, then receive and send messages back to it. I have never done any network programming before, so I'm just wondering what are the best tutorials using Ruby that I could use.
Thanks in advance.
There are about a billion ways you could do this. Could you post more about what the problem is you're trying to solve, or what the content/purpose/size/format/etc. of the messages is to be? Are you building something "for real" or just trying to learn network programming?
Also, do you already have the lower layer stuff figured out? You have networking infrastructure setup, IP addresses assigned, etc? If not, you'll need to get through that. Once you have that, you could start with a tutorial on basic socket programming in Ruby, but - depending on the answers to the questions above - you might not want to "roll your own" solution at that level. The answer might be to use an XMPP (Jabber) server, and use an XMPP client library, or you might want to deploy something like ActiveMQ, HornetQ, etc. and use a library for interfacing with that. Or maybe you want to use HTTP and pass messages around in JSON, or XML or $WHATEVER. In short, there are a LOT of options in this area.

Telnet lib and language choice for cross OS telnet client?

I'm looking to start a MUD client application, which connects to a MUD hosted on a telnet server. The only thing important to me is that it runs painlessly and efficiently across any OS. Aside from that requirement, I'm not really sold on any language.
So I'm looking for a freely available telnet client library on which I can base my application, so I don't have to deal with the details of the protocol too much.
I would always consider Twisted for this kind of thing (Python).
The beauty is that if you later decide to swap it out to SSH or anything more secure than telnet, you can with little pain.
Twisted, twisted, twisted!
To use telnet, see package twisted.conch.telnet. It's got some spartan API docs, but the real information on using it comes from searching on Google Code Search, such as this nugget from grailmud - a MUD server.
For all of my MUD programming, I just created my own routines from the ground up using the RFCs.
In case you'd like to avoid some of my pain, I wrapped it up into a fairly simple C# class that handles Telnet properly. In case you'd like to peruse it, you can view it here.
This code has been copy/pasted and run on Windows and on Linux (through Mono) on a handful of separate projects and works pretty good.
There is a telnet interface in CPAN if you like Perl. It's pretty minimal, but it should get the job done.
[edit]
libcurl is also supposed to be able to do telnet, although I couldn't find any examples of it.
pmc ( http://sourceforge.net/projects/perlmudclient/ ) was an attempt to do exactly this. I've spent some of the last week going through it; it uses an older modified version of Net::Telnet to do its connectivity work.
My problem is that Net::Telnet seems to have a blocking interface when a partial line is sent by the server, i.e. a line not terminated by a newline. It has two features that support this (waitfor and its prompt mechanism), because almost all telnet servers have prompts that are not newline-terminated.
MUDs often have "prompts" that are non-standard and vary through the course of the game; the MUD I admin on has a "Your choice: " prompt as its login [it's not just for usernames], and many game features present alternative prompts. So I suspect you'll need to bear this in mind when you go looking for a cross-platform Telnet library!
If you like C, I heartily recommend libtelnet. It will maintain an internal state that does all the IAC sequence parsing for you, and handles option negotiation using the Q method.

Resources