mIRC Home    About    Download    Register    News    Help

Print Thread
#11865 18/02/03 06:39 AM
C
CYE
CYE
C
Folks,
I am new to DCC. I read some articles posted in this forum. Here is my understanding how DCC send/receive works, please let me know if this is correct.

Say you have a sender (ip x.x.x.x) and DCC ports are from 2000 - 3000.

When initiating DCC send request, sender will tell receiver "I want to send you a file named hello.txt, please connect me at x.x.x.x, and use any port within 2000 - 3000".

Then receiver randomly selects a port (in the range of 2000 - 3000), connects to x.x.x.x, and retrieve file "hello.txt".


Is my understanding correct? By the way, does DCC chat work the same way?

thanks
-Chris

Joined: Dec 2002
Posts: 3,015
P
Hoopy frood
Offline
Hoopy frood
P
Joined: Dec 2002
Posts: 3,015
Esentially, yes. In any mIRC window, type /help dcc server protocol

DCC, Direct Client to Client allows you to connect directly to another user rather than going thru the IRC network so that you can send/get/chat privately over a more secure connection. mIRC allows you to specify the range of ports it will use when making dcc connections (always assuming your firewall/router allows access on those ports)

Joined: Dec 2002
Posts: 1,518
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,518
if DCC is truly direct client to client then how can a network filter out whats being sent via dcc??? ..... excuse me if im butting in on this conversation just a bit curious on how that part of it works exactly??

Joined: Dec 2002
Posts: 3,015
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,015
Before a DCC transfer begins the sender sends 2 messages to the reciever. One is a NOTICE, and the other a PRIVMSG, the server reads these and decides whether to deliver them or not.

Notice:
DCC Send autoexec.cfg (0.0.0.0)

Privmsg:
DCC SEND autoexec.cfg 1342275100 4452 4115

Never worked out what the numbers in the privmsg are, hopefully someone who knows will post...

L
lkmyst42
lkmyst42
L
the notice is:
DCC SEND <filename> <ip>

the /msg is:
DCC SEND <filename> <ip in decimal form>* <port> <size>

*meaning 10.1.1.1 is a psuedo decimal representation for the hex number 0A010101 which in decimal form is 167837953

Joined: Dec 2002
Posts: 1,253
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,253
Here is my description of how DCC Send works from a previous post.

if DCC is truly direct client to client then how can a network filter out whats being sent via dcc??? ..... excuse me if im butting in on this conversation just a bit curious on how that part of it works exactly??

The same way they can check for anything else. Check for :DCC SEND

From DALnet's bahamut (s_user.c):
Code:

int check_for_ctcp(char *str, char **dccptr)
{
    char       *p = str;
                
    while ((p = strchr(p, 1)) != NULL)
    {
        if (myncmp(++p, "DCC", 3) == 0)
        {
            if (dccptr)
                *dccptr = p;
            if (myncmp(p+3, " SEND", 5) == 0)
                return CTCP_DCCSEND;
            else 
                return CTCP_DCC;

Basically, if the first word is DCC, we know we have a DCC message of some sort coming through the server, if the next word is SEND, we have ourselves a DCC SEND message so we will check it for file extensions in order to allow us to hook in the /DCCALLOW system.cool

Remember, this all happens before the actual DCC transfer takes place. It's the initiating protocol that uses the IRC server to set up the DCC session parameters.

Joined: Dec 2002
Posts: 1,518
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,518
ty for clarifying that hammer i much appreciate it


Link Copied to Clipboard