📄 interceptty.1
字号:
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.14.\".\" Standard preamble:.\" ========================================================================.de Sh \" Subsection heading.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Vb \" Begin verbatim text.ft CW.nf.ne \\$1...de Ve \" End verbatim text.ft R.fi...\" Set up some character translations and predefined strings. \*(-- will.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left.\" double quote, and \*(R" will give a right double quote. | will give a.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'.\" expand to `' in nroff, nothing in troff, for use with C<>..tr \(*W-|\(bv\*(Tr.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'.ie n \{\. ds -- \(*W-. ds PI pi. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch. ds L" "". ds R" "". ds C` "". ds C' ""'br\}.el\{\. ds -- \|\(em\|. ds PI \(*p. ds L" ``. ds R" '''br\}.\".\" If the F register is turned on, we'll generate index entries on stderr for.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index.\" entries marked with X<> in POD. Of course, you'll have to process the.\" output yourself in some meaningful fashion..if \nF \{\. de IX. tm Index:\\$1\t\\n%\t"\\$2"... nr % 0. rr F.\}.\".\" For nroff, turn off justification. Always turn off hyphenation; it makes.\" way too many mistakes in technical documents..hy 0.if n .na.\".\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2)..\" Fear. Run. Save yourself. No user-serviceable parts.. \" fudge factors for nroff and troff.if n \{\. ds #H 0. ds #V .8m. ds #F .3m. ds #[ \f1. ds #] \fP.\}.if t \{\. ds #H ((1u-(\\\\n(.fu%2u))*.13m). ds #V .6m. ds #F 0. ds #[ \&. ds #] \&.\}. \" simple accents for nroff and troff.if n \{\. ds ' \&. ds ` \&. ds ^ \&. ds , \&. ds ~ ~. ds /.\}.if t \{\. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u". ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'.\}. \" troff and (daisy-wheel) nroff accents.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'.ds 8 \h'\*(#H'\(*b\h'-\*(#H'.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#].ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#].ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#].ds ae a\h'-(\w'a'u*4/10)'e.ds Ae A\h'-(\w'A'u*4/10)'E. \" corrections for vroff.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'. \" for low resolution devices (crt and lpr).if \n(.H>23 .if \n(.V>19 \\{\. ds : e. ds 8 ss. ds o a. ds d- d\h'-1'\(ga. ds D- D\h'-1'\(hy. ds th \o'bp'. ds Th \o'LP'. ds ae ae. ds Ae AE.\}.rm #[ #] #H #V #F C.\" ========================================================================.\".IX Title "INTERCEPTTY 1".TH INTERCEPTTY 1 "2004-09-05" "perl v5.8.3" "User Contributed Perl Documentation".SH "NAME"interceptty \- Intercept traffic to and from a serial port..SH "SYNOPSIS".IX Header "SYNOPSIS".Vb 32\& Usage: ./interceptty [-V] [-qvl] [-s back-set] [-o output-file] \& [-p pty-dev] [-t tty-dev] \& [-m [pty-owner,[pty-group,]]pty-mode]\& [-u uid] [-g gid] [-/ chroot-dir]\& back-device front-device\& back-device Use back-device as the device to intercept\& path TTY dev is at /path\& @/path Socket is at /path\& @host:port Inet socket is at host:port\& !prog Run prog for backend\& =rfd[,wfd] Use file descriptors\& front-device Use front-device as the device applications connect to\& path Create symlink at /path\& @/path Socket at /path\& @host:port Inet socket at host:port\& =rfd[,wfd] Use file descriptors\& '-' to prevent creating a front-device.\& Doesn't currently do anything.\& -l Line-buffer output\& -o output-file Write intercepted data to output-file\& -s back-stty Use given settings to set up back-device\& These settings are passed directly to stty(1).\& -m pty-mode Specify permissions for the new pty.\& Format is [pty-owner,[pty-group,]]pty-mode]\& -u uid Switch to given uid after setting up (must be root)\& -g gid Switch to given gid after setting up (must be root)\& -/ chroot-dir chroot(2) to given dir after setting up (must be root)\& -q Activate quiet mode\& -v Activate verbose mode\& -V Print version number then exit\& -p pty-dev Full path to pty device for front-end (used internally)\& -t tty-dev Full path to tty device for front-end (used externally).Ve.SH "DESCRIPTION".IX Header "DESCRIPTION"interceptty is designed to sit between a serial port (or otherterminal device, or program, or socket, or something connected to afile descriptor) and a program which is communicating with thatdevice, recording everything that goes back and forth between the two.It does this by opening the real device, creating a pseudo\-tty, thenforwarding everything between the two, recording whatever it sees. Ithas a number of options that let you fine-tune the devices it uses andthe terminal options for the real device..PPWith the support for various backend types, interceptty is also usefulto create a fake serial port that will talk to the network or to aprogram you've written. The \-q switch will turn off its loggingoutput, and you can read about the different backends further down..PPThe output of interceptty is a somewhat ugly, rudimentary format thatI usually postprocess through interceptty\-nicedump, an included Perlscript. More information about the output format is included later,in the Output section..PPTo stop interceptty, press \s-1CTRL\-C\s0. It doesn't exit under any othercircumstances except error conditions..Sh "Command-Line".IX Subsection "Command-Line".IP "\fIback-device\fR" 4.IX Item "back-device"Use \fIback-device\fR as the backend device\-\-\-the device to which\&\fIinterceptty\fR connects. Normally it will be a character-specialdevice file, like a serial port or other tty-compatible device. Youcan instruct interceptty to use other things for your backend by usinga \fIback-device\fR that starts with one of several special characters..SpIf \fIback-device\fR starts with an \f(CW\*(C`@\*(C'\fR and contains a slash (\f(CW\*(C`/\*(C'\fR), itwill be treated as a Unix socket..SpIf \fIback-device\fR starts with an \f(CW\*(C`@\*(C'\fR and \fIdoesn't\fR contain a slash(\f(CW\*(C`/\*(C'\fR), it will be treated as an Internet hostname, followed by acolon, followed by a port. interceptty will connect to that addressand port..SpIf \fIback-device\fR starts with an exclamation point (\f(CW\*(C`!\*(C'\fR), it will betreated as a program to run. That program will be started up, and itsstandard input and output will be connected to the frontend..SpIf \fIback-device\fR starts with an equal sign (\f(CW\*(C`=\*(C'\fR), it will be treatedas a file descriptor to use, or a comma-seperated pair of filedescriptors. The first file descriptor will be used for reading, andthe second for writing; if only one is specified, it will be used forboth. These descriptors must already be opened by the program thatstarted interceptty..IP "\fIfront-device\fR" 4.IX Item "front-device"Use \fIfront-device\fR as the frontend device\-\-\-the device to which otherapplications should connect to talk to the backend device throughinterceptty. Normally interceptty will create a pseudo\-terminal, thencreate a symlink to the master device at \fIfront-device\fR. You cancontrol whether and how it creates a pseudo-terminal with the \fI\-t\fRand \fI\-p\fR options. You can have it create no symlink by giving a\&\fIfront-device\fR of a single dash (\f(CW\*(C`\-\*(C'\fR), and you can use things otherthan pseudo-terminals as a frontend by using a \fIfront-device\fR thatstarts with one of several special characters.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -