flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > Bittorrent client in FASM - impossible?

Goto page 1, 2, 3  Next
Author
Thread Post new topic Reply to topic
rohagymeg



Joined: 19 Aug 2011
Posts: 77
rohagymeg 31 Mar 2012, 18:40
What do you think? Making a Windows only Bittorrent client which supports mainline DHT and it is fast and lightweight like utorrent once was in its early stage.
The goal would be to make a client that would own utorrent in every way. It should have all the features of utorrent 2.0, and no useless ones.
Am I crazy? I think I am. But what's the point in making a useless program that nobody would use? That's why this would not be a bad idea. Think about it; there are very few usable torrent clients for windows now that utorrent became commercial.
Why not get together and make it happen to prove it's very possible?

I'll keep this post updated:

- SHA1 module is done! The source is on the 2nd page. It will be used in the Torrent maker project when I get to implementing functionality to the main button, which is the "Create and save as...".

- The Torrent maker module is a work in progress:
Besides the interface, "Add file", "Add directory" and "Close" buttons are doing what you expect them to do. Additionally, when you press "CreateAndSaveAs...", it checks for the path validity and if valid, tells you if it's a folder or file, then opens up a save as dialog which is filtering *.torrent files.

Update: "Select Source section" (Add file, Add directory) is almost completely done, except the path history, which needs to be implemented in a later period when the settings storage is implemented.
Update2: Drag file support added!
Update3: Trying to make the tracker bencoding part work, which is not a simple task (8:announce and 13:announce-list).

The next WIP is the bencoding. => Tested and the SHA1 works perfectly as a function. I will now start reading up on the bencoding specification to let the final thing happen Smile

Bencoding progress:


  • "announce" key: Done
  • "announce-list" key: Current work. So far it can decide if there are multiple or just one tracker(s) given. No such thing as url validity checking yet.
  • "created by" key: Done


Almost forgot to say, my code doesn't run on xp not just because of the new com interface, but also because the first child window creation is failed, returning NULL, and GetLastError returning 583. If anyone knows what's wrong(all the child windows are failed to be created), please help me, because I don't care about xp compatibility, it would drain all my remaining energy for this project.

The code is getting bigger, so I decided to post a zip file instead of using the forum's code view.

Last update on source code: 2012.11.17


Description:
Download
Filename: Torrent maker.zip
Filesize: 8.06 KB
Downloaded: 905 Time(s)



Last edited by rohagymeg on 16 Nov 2012, 23:57; edited 54 times in total
Post 31 Mar 2012, 18:40
View user's profile Send private message Reply with quote
bubach



Joined: 17 Sep 2004
Posts: 341
Location: Trollhättan, Sweden
bubach 31 Mar 2012, 21:45
Well, µTorrent certainly has grown - but it has also added several very nice features like streaming (in VLC) while downloading. I donät think it's that bad yet. But of course it would be possible to make in FASM, why wouldn't it? Razz
Post 31 Mar 2012, 21:45
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 31 Mar 2012, 21:50
Yes you just have to know the structure of the protocol and how to communicate to different nodes, be able to dictate download/upload rate and (comply with their rules if you are making it as a personal tool/not public) otherwise put a setting where users can change accordingly so as to still comply with the rules of piracy. Laughing Very Happy
Post 31 Mar 2012, 21:50
View user's profile Send private message Reply with quote
rohagymeg



Joined: 19 Aug 2011
Posts: 77
rohagymeg 31 Mar 2012, 22:46
SHA1 algorithm is posted in this forum already. EDIT: Irrelevant, I've made my own.
Torrent file specification is known.
The others I'm not sure about(DHT, the whole protocol). The only way to get this information is reverse engineering Smile

Last time I checked utorrent was compressed with UPX. Simply decompressing it would make debugging easier.


Last edited by rohagymeg on 30 Sep 2012, 17:41; edited 1 time in total
Post 31 Mar 2012, 22:46
View user's profile Send private message Reply with quote
ManOfSteel



Joined: 02 Feb 2005
Posts: 1154
ManOfSteel 01 Apr 2012, 09:07
rohagymeg wrote:
The others I'm not sure about(DHT, the whole protocol). The only way to get this information is reverse engineering Smile

Like there are no FOSS BitTorrent clients?! For instance both Transmission and rTorrent support DHT.
I have no idea if the whole protocol is implemented and what license it is distributed under to begin with, but it seems what's already available to the FOSS communities is quite enough...
Post 01 Apr 2012, 09:07
View user's profile Send private message Reply with quote
rohagymeg



Joined: 19 Aug 2011
Posts: 77
rohagymeg 01 Apr 2012, 10:45
If efficiency is important, we must learn from the best (utorrent). It might does things faster than the other clients considering it's size/feature ratio compared to other clients.
But is analyzing libtorrent a good start?
EDIT: I give up. It's almost impossible to make a better client that utorrent is now in terms of features(not the bloat). Utorrent has been developed since like 2004-5. Who would have time for such a large project?
Post 01 Apr 2012, 10:45
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 01 Apr 2012, 11:58
rohagymeg wrote:
I give up.


Ahahaha, I have given up on projects too. The feeling of giving up in the gut, smh.
Post 01 Apr 2012, 11:58
View user's profile Send private message Reply with quote
SFeLi



Joined: 03 Nov 2004
Posts: 138
SFeLi 02 Apr 2012, 10:23
rohagymeg wrote:
The others I'm not sure about(DHT, the whole protocol). The only way to get this information is reverse engineering :)

(added more links)


Last edited by SFeLi on 03 Apr 2012, 15:16; edited 2 times in total
Post 02 Apr 2012, 10:23
View user's profile Send private message Reply with quote
rohagymeg



Joined: 19 Aug 2011
Posts: 77
rohagymeg 02 Apr 2012, 11:01
Thank god I was wrong. I'll start reading it Smile Thanks for the link!
It seems like if one understands the DHT and the whole protocol completely, he has the freedom to implement it the way he sees it the most efficient.
EDIT: Rome wasn't built in a day. I've read the SHA1 spec and will make the most efficient/fastest code that does SHA1. The one posted in this forum seems too long for such a simple algorithm.
Post 02 Apr 2012, 11:01
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 10 Apr 2012, 07:25
BitTorrent project with FASM is great. uTorrent is too commercial for me. There are several FOSS projects. I am using qBittorrent now but it is too heavy for my taste.
So, the world needs tiny small and fast bittorrent client and it will be great if it is FASM project, portable across at least Win32 and Linux.
Post 10 Apr 2012, 07:25
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
TmX



Joined: 02 Mar 2006
Posts: 841
Location: Jakarta, Indonesia
TmX 10 Apr 2012, 13:11
JohnFound wrote:
uTorrent is too commercial for me.


Well you can use the free version right?
Anyway, I just noticed that uTorrent is available for Linux, too.
Post 10 Apr 2012, 13:11
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3499
Location: Bulgaria
JohnFound 10 Apr 2012, 13:37
The free version is "too commercial". Smile
Post 10 Apr 2012, 13:37
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4330
Location: Now
edfed 10 Apr 2012, 19:25
better to invent a new way to torrent the files, cause now, we need a strong cryptography to download everything quietlly, without being affraid by the copyright psychomania.

all in all, a light-weight torrent client would be fine (in fact, every "programs" need to be light-weight.

it would be better with a good way to find torrents without being forced to login to various junk torrent sites, or to deal with boring new ads (happy adblock+) on the pseudo-pirate bay, and the so cheap content it have.

i can contridute by finding a way to make this code a sort of anticrap thing, by deleting the harddrives and crash the system when "britney spears", "justin bieber" or "desperate housewives" keywords are detected in a torrent file. Smile
Post 10 Apr 2012, 19:25
View user's profile Send private message Visit poster's website Reply with quote
Inagawa



Joined: 24 Mar 2012
Posts: 153
Inagawa 10 Apr 2012, 21:15
Hahaha, the list of crap would get very long very fast!
Post 10 Apr 2012, 21:15
View user's profile Send private message Reply with quote
ctl3d32



Joined: 30 Dec 2009
Posts: 206
Location: Brazil
ctl3d32 20 Apr 2012, 15:55
You can begin converting libtorrent: libtorrent is a C++ implementation of the BitTorrent protocol with the goals of being efficient and easy to use.

It's available at http://sourceforge.net
Post 20 Apr 2012, 15:55
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 21 Apr 2012, 10:47
edfed wrote:
better to invent a new way to torrent the files


I agree. And I'd love to join such a project. Very Happy

Something new and challenging...
Post 21 Apr 2012, 10:47
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2909
Location: 0x77760000
typedef 21 Apr 2012, 10:51
edfed wrote:
better to invent a new way to torrent the files, cause now, we need a strong cryptography to download everything quietlly, without being affraid by the copyright psychomania.

all in all, a light-weight torrent client would be fine (in fact, every "programs" need to be light-weight.

it would be better with a good way to find torrents without being forced to login to various junk torrent sites, or to deal with boring new ads (happy adblock+) on the pseudo-pirate bay, and the so cheap content it have.

i can contridute by finding a way to make this code a sort of anticrap thing, by deleting the harddrives and crash the system when "britney spears", "justin bieber" or "desperate housewives" keywords are detected in a torrent file. Smile


Lightweight

1. Create / Load torrent file(or other new file type)
2. Start / Stop / Pause Download
3. If you own a torrent be able to kick a peer/ ban off a list and broadcast their HWID since they can use proxies and all that.
4. No Apps or whatever they call them.
5. Enjoy piracy or not.
Post 21 Apr 2012, 10:51
View user's profile Send private message Reply with quote
rohagymeg



Joined: 19 Aug 2011
Posts: 77
rohagymeg 13 May 2012, 00:37
typedef I'm happy that you would like to participate. The more experienced people join, the better.

Unfortunately I know very little about windows programming. However this doesn't mean I'm a complete noob. I wrote a program in FASM called "Fl3x Trainer". It's on sourceforge. So with my knowledge, I think I'm able to make the torrent file parsing module, since Fl3x Trainer is based on parsing a file. The part that I know nothing about is network communication, which is the main part of a p2p client lol.

After I graduate(1 month), I will have time to look into libtorrent. Any ideas you guys have about this project, please don't hesitate to share it.
Post 13 May 2012, 00:37
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 12740
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep 13 May 2012, 06:09
hi,
i was thinking about what identify a file as a file,

so if file A with a checksum X value, then we create copy of file A (eg, slice it into several parts, randomize its order) resulted file B with different checksum

so we got file B, (so if user share this disorder clone of file A on internet, would people call it as offense?)

and we leave the users to use "whatever" method to reorder back the file into whatever state that they want.

i think, this kinda sharing is more "safe"
Post 13 May 2012, 06:09
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 12740
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep 13 May 2012, 06:14
maybe a website with "digital image" as "ordering key" to let user reorder back their corrupted file.

it got to be totally unique, every corrupted file required unique digital ordering key...
Post 13 May 2012, 06:14
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2, 3  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.