-
Notifications
You must be signed in to change notification settings - Fork 1
/
dccserver.man
158 lines (158 loc) · 3.63 KB
/
dccserver.man
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
.TH "DCCSERVER" "1" "January 20, 2012" "NiH" "General Commands Manual"
.nh
.if n .ad l
.SH "NAME"
\fBdccserver\fR
\- simulate mIRC's /dccserver command
.SH "SYNOPSIS"
.HP 10n
\fBdccserver\fR
[\fB\-ehiv\fR]
[\fB\-n\fR\ \fInickname\fR]
[\fB\-p\fR\ \fIport\fR]
.SH "DESCRIPTION"
\fBdccserver\fR
aims to provide the functions of mIRC's /dccserver command.
.PP
Currently, Chat and Send (including resume) modes are supported.
Fserve and Get mode are not yet supported.
.PP
All connections are accepted; some simple checks on allowed file names
are done.
During connectione establishment, there is a 15 seconds timeout; during
transfers, it is 2 minutes.
Chats have no timeout.
.PP
Supported options:
.TP 15n
\fB\-e\fR
Echo lines input by the user.
Useful e.g. if you are using dccserver in an
irssi(1)
window (see also the
\fB\-i\fR
option and the
\fIEXAMPLES\fR
section).
.TP 15n
\fB\-h\fR
Display a short help message.
.TP 15n
\fB\-i\fR
Do not filter out control characters for color, bold, reverse, and
underlined text.
Useful if your terminal or wrapper can interpret them.
.TP 15n
\fB\-n\fR \fInickname\fR
Set nickname used in handshake to
\fInickname\fR.
Should be the same nickname that you use on IRC, otherwise most
clients will complain and close the connection.
Defaults to
\(lqdccserver\(rq.
.TP 15n
\fB\-p\fR \fIport\fR
Listen for connections on port
\fIport\fR.
You can specify this argument multiple times to listen on more than
one port.
If no
\fB\-p\fR
is given,
\fBdccserver\fR
will listen on port 59, since that is mIRC's default port.
Please note that you have to have root privileges to bind to ports
below 1024.
See
\fISECURITY CONSIDERATIONS\fR
below.
.TP 15n
\fB\-v\fR
Display program name and version number.
.PP
After a client has connected, you can send commands to it manually.
This is useful for chats or fserves.
The syntax is
\(lq<nn>: <text>\(rq
where
\(lq<nn>\(rq
is the number of the child, and
\(lq<text>\(rq
the text you want to send.
For example:
\(lq0:\ dir\(rq.
Please note that the
\(lq\&:\(rq
and the space are necessary.
.PP
Text coming from the remote clients will be shown prepended by their
nickname and child ID.
.PP
You can give
\fBdccserver\fR
commands by entering one of the following keywords without a child ID
in front:
.TP 12n
\fBclose X\fR
to close the connection with ID X, e.g.,
\fBclose 3\fR.
.TP 12n
\fBinfo\fR
to get an overview of the current connection state.
.TP 12n
\fBquit\fR
to close all connections and exit the program.
.SH "EXAMPLES"
Listen on ports 59 and 37334 as user
\(lqyournick\(rq:
.nf
.sp
.RS 6n
dccserver -n yournick -p 59 -p 37334
.RE
.fi
.PP
With
irssi(1),
you could create the following alias (one line):
.nf
.sp
.RS 6n
/alias DCCSERVER
window new hidden;
window name dccserver$0;
echo dccserver for $N on port $0;
exec -name dccserver$0 -nosh -interactive -window dccserver -n $N -p $0 -i -e
.RE
.fi
.PP
and then open a new window with a dccserver inside with
\(lq/dccserver 59\(rq
for port 59.
.SH "SEE ALSO"
dccsend(1)
.SH "AUTHORS"
\fBdccserver\fR
was written by
Thomas Klausner <\[email protected]\fR>.
.SH "BUGS"
Get and Fserve modes are not yet supported.
.SH "SECURITY CONSIDERATIONS"
mIRC's default port is 59.
To bind to ports below 1024, one needs root privileges; for this reason
\fBdccserver\fR
is installed setuid root.
To limit damage done in case of trouble,
\fBdccserver\fR
chroot(2)s
itself in the current directory and drops the setuid privileges as soon
as possible.
.PP
Alternatively, you can remove the setuid bit from
\fBdccserver\fR
with
\(lq\fBchmod u-s /path/to/dccserver\fR\(rq
with the limitation that you will only be able to use
\fBdccserver\fR
on ports above 1024, and you won't get the effect of
chroot(2).