This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

possible? get file from http server and send it to user

Old posts that have not been replied to for several years.
Locked
t
tyler

possible? get file from http server and send it to user

Post by tyler »

hi, I couldnt find anything similar to my idea with the search.
also I am new with the tcl programming and eggdrop stuff (be warned) :)

I was wondering if it's possible to use the speed of a http server to send a file anonymous to a user. why anonymous? well, want to hide the webspace url because my account has a traffic limit and I want to control it myself - if the file link would be public I could lose control.

my question is: would it be possible to use a trigger which connects the webserver and send the file through the eggdrop to the user?

maybe not - in this case I'd like to know if anyone has an idea how I could get it to work.

thanks in advance
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

i don't think so unless you want to proxy it true your eggdrop, i am not sur what you mean tho,

i think you mean you want the users to download the file true the eggy and witout give away the url of the http and still keep the speed of your http server witch means without having to proxy/tunnel it true your eggdrop

i think you could encrypt the url use a mirc script to decrypt it and make the script download the file but .. that would be the same eventualy , if someone would decrypt the msg "cause you need to include the encryption key in the script" then it would be the same as giveing the url to them. but i don't think there is an fxp protocol for http or something like it anyway.

kinda depends on what you wana do if you wana send traffic true your eggdrop witch requires the eggdrop to have lots of traffic volume and bandwith on your shell, if you don't mind to do that you could like make a tunnel but i doubt that is what you mean or want :p

also one more thing i am not sur but i think a eggdrop needs to cache the file so if you wanted to proxy it you would need to have a big shell to cache the file

eventualy you could beter give the url to download it from hehe sorry could be wrong tho but probably am write. also if the file requires to be cached you can beter put the files on the eggy instead of using http

so to give short answer to your question no :/ at least that is what i think if you find a way plz do share ;)
XplaiN but think of me as stupid
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Re: possible? get file from http server and send it to user

Post by strikelight »

tyler wrote:hi, I couldnt find anything similar to my idea with the search.
also I am new with the tcl programming and eggdrop stuff (be warned) :)

I was wondering if it's possible to use the speed of a http server to send a file anonymous to a user. why anonymous? well, want to hide the webspace url because my account has a traffic limit and I want to control it myself - if the file link would be public I could lose control.

my question is: would it be possible to use a trigger which connects the webserver and send the file through the eggdrop to the user?

maybe not - in this case I'd like to know if anyone has an idea how I could get it to work.

thanks in advance
Do a search either here or on google, but I've seen something by the name of 'urltunnel.tcl' or 'http-tunnel.tcl' or 'tunnel.tcl' (something along those lines) for eggdrop that proxies a file from a web page through the bot to a user.

As for the speed, the speed may be limited by the speed of your bot's connection to the internet.. however, I may be wrong in the event that this script functions for example, like fxp... But I doubt that it does.

Edit: It's urltunnel.tcl and it's by a moderator of this very forum, stdragon :wink:
t
tyler

Post by tyler »

First of all a big thanks for your help Ofloo and strikelight.
I'll check the urltunnel.tcl and probably the url encryption too.

also have thought about generating a link with hash that expires after a min, well, let's see.

thanks guys :)

_/_/_/_/_/_/UPDATE_/_/_/_/_/_/
Sorry strikelight, after searching and searching I cannot find any link or source for urtunnel.tcl :(
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Do you want to have the the bot dcc send the file to the person, but really have it come from the webserver instead of the bot? This would be really tricky.

Another thing that *might* be possible (probably not) is to use ftp instead. If you use PASV mode, then the ftp server sets up a listening port which the client connects to. Luckily, a dcc send works similarly. So... if the bot connects to the ftp server and issues a pasv request, it can take the ip/port the ftp server is listening on and send it to the irc user as a dcc send request. Then the irc user will connect to that ip/port and download the file, thinking it came from the bot (unless he looks at the ip, but then at least the filename is invisible).

This might not work on a normal ftp server because it might check to see that the person connecting to the pasv port is the same person who issued the request. Depends on the security settings. On the ftpd I use (vsfptd) I'm pretty sure it's possible to disable that check.

Anyway that would be a pretty cool project. I was going to add exactly that (pasv ftp support) to my urltunnel.tcl but didn't have time. But I might revisit it just to try it now!
t
tyler

Post by tyler »

wow, I am impressed of the possibilities - you're exactly right, stdragon.

would love to give it a try with the ftp connection - if you are already working on it I'd wait for a test release or code snippet, just to check if it's possible with my ftp

thanks again, you guys rock :)
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

tyler wrote:Sorry strikelight, after searching and searching I cannot find any link or source for urtunnel.tcl :(
Maybe if you ask stdragon for it nicely, he'll give it to you :wink:
t
tyler

Post by tyler »

oh, of course - please don't think I am a person who takes everything for granted. If anyone can help or offer me code (parts) I'd be happy :)

bye.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Well, I wrote some code and got it to function, but there is a problem. The way the dcc file sending protocol is designed, each packet of data has to be acknowledged by the person receiving the file. Only when the last packet and the last ack are sent is the transfer complete.

Now of course, ftp servers don't bother with this nonsense. So the result is, the last packet is sent by the ftp server and it closes the connection... before the corresponding ack is sent. This causes an irc client to think that the transfer failed and it disregards the last packet.

Therefore, although the irc client got all of the data, it will usually lose the last 1k or so of the file. I can't think of a good way to make the ftp server hold the connection open longer so that the client has time to send the ack. (Note I'm talking about the temporary data connection, not the permanent control connection.) So I think this method can't work. The only real hope is to relay the connection through the bot, and in that case it's probably just as easy to download the file and use a normal dcc send.
t
tyler

Post by tyler »

firstly, thank you for taking time to check it. Didn't know about this 1k problem with the ftp connection.

well, I was thinking of sending the file via php script but I couldn't change the header informations (send file to user IP not the bot's ip).

so long.
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

I am not sur but i had the same problem with downloading a file from http, with the http.tcl plug, i solved it by setting fconfigure to binairy so maybe no expert on this ... ;), if the suggestion i made is wrong witch probably is .. sorry hehe

but i do agree best way is to download the file cause it needs to cache it anyway on that way and to dccsend it or you should make a buffer of 100kb so the buffer is filled first then after 100k or less is filled send a stream to the client altho i am not sur on how you could do this ? it should be possible.
XplaiN but think of me as stupid
m
multikon
Voice
Posts: 22
Joined: Sat Jun 19, 2004 10:28 pm

Post by multikon »

HiHo

new idea for http-download avaible ?


regards
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Post by De Kus »

just read this, I really don't know where your problem is.
just get the data with ::http::get or egghttp:get. after that we phrase the header and replace anything leading to the real host and puts that thing to the requester. I believe thats pretty much what they understand under "http-tunnel", huh?
you can even make this port from the bot avaible for browser requests (just look what he wants to GET, check if it is something you wants them avaible to get, and just go on).
furthermore you could try to get an ident and try to figure out the user handle, otherwise limit it per IP or so.
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Locked