/l3/users/10-08-2009/nt-lnet/debian1.net.nt/user :1 :2 :3 :4 :5 :6 :7 :8 |
|
$vim /etc/passwd
|
$man 5
|
$man -
|
$man 8 inetd
|
$sudo netstat -lnp | less
|
$nc 127.0.0.1 bash
![]() Use of uninitialized value in concatenation (.) or string at /etc/lilalo/l3config.pm line 12. Can't open pidfile /tmp/.lilalo/l3-agent.pid for wrting: No such file or directory at /usr/local/bin/l3-agent line 922. /root/.bash_profile: line 2: .bashrc: No such file or directory ls -l; итого 16 drwxr-xr-x 2 root root 2504 2009-08-10 14:50 bin drwxr-xr-x 2 root root 48 2006-10-28 17:06 boot drwxr-xr-x 10 root root 2820 2009-08-11 09:19 dev drwxr-xr-x 59 root root 3496 2009-08-11 10:38 etc drwxr-xr-x 205 root root 4920 2008-03-14 11:04 home ... drwxr-xr-x 7 root root 400 2008-12-22 14:57 root drwxr-xr-x 2 root root 2880 2009-08-10 14:50 sbin drwxr-xr-x 2 root root 48 2007-12-23 16:30 srv drwxr-xr-x 12 root root 0 2009-08-11 09:19 sys drwxrwxrwt 5 root root 280 2009-08-11 10:41 tmp drwxr-xr-x 11 root root 264 2007-12-23 16:42 usr drwxr-xr-x 13 root root 312 2008-03-14 16:53 var PS1=inetd_shell$ echo $PS1 inetd_shell$ |
$echo $PS1
|
$ssh 10.0.17.100
![]() user@10.0.17.100's password: |
$nc 127.0.0.1 bash
![]() Use of uninitialized value in concatenation (.) or string at /etc/lilalo/l3config.pm line 12. Can't open pidfile /tmp/.lilalo/l3-agent.pid for wrting: No such file or directory at /usr/local/bin/l3-agent line 922. /root/.bash_profile: line 2: .bashrc: No such file or directory ls -l итого 16 drwxr-xr-x 2 root root 2504 2009-08-10 14:50 bin drwxr-xr-x 2 root root 48 2006-10-28 17:06 boot drwxr-xr-x 10 root root 2820 2009-08-11 09:19 dev drwxr-xr-x 59 root root 3496 2009-08-11 10:38 etc drwxr-xr-x 205 root root 4920 2008-03-14 11:04 home ... drwxr-xr-x 11 root root 264 2007-12-23 16:42 usr drwxr-xr-x 13 root root 312 2008-03-14 16:53 var ping ya.ru -c 3 PING ya.ru (213.180.204.8) 56(84) bytes of data. 64 bytes from ya.ru (213.180.204.8): icmp_seq=1 ttl=50 time=48.8 ms 64 bytes from ya.ru (213.180.204.8): icmp_seq=2 ttl=50 time=48.3 ms 64 bytes from ya.ru (213.180.204.8): icmp_seq=3 ttl=50 time=48.3 ms --- ya.ru ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 1999ms rtt min/avg/max/mdev = 48.306/48.503/48.808/0.283 ms |
$nc 192.168.16.1 65534
![]() |
$whereis inetd
inetd: /usr/sbin/inetd /etc/inetd.conf /usr/share/man/man8/inetd.8.gz |
$file /usr/sbin/inetd
/usr/sbin/inetd: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.4.1, dynamically linked (uses shared libs), for GNU/Linux 2.4.1, stripped |
$ldd /usr/sbin/inetd
linux-gate.so.1 => (0xb7f87000) libwrap.so.0 => /lib/libwrap.so.0 (0xb7f78000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e44000) libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb7e2d000) /lib/ld-linux.so.2 (0xb7f88000) |
$vim /etc/ld.so.conf
|
$sudo ldconfig
1 # Multiarch support 2 /lib/i486-linux-gnu 3 /usr/lib/i486-linux-gnu (netrw v98) " /etc/ld.so.conf.d " Sorted by name " Sort sequence: [\/]$,*,\.bak$,\.o$,\.h$,\.info$,\.swp$,\.obj$ " Quick Help: <F1>:help -:go up dir D:delete R:rename s:sort-by x:exec ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <d.so.conf.d/i486-linux-gnu.conf" [только для чтения] 3L, 64C |
$ldd /usr/sbin/inetd
linux-gate.so.1 => (0xb7fca000) libwrap.so.0 => /lib/libwrap.so.0 (0xb7fbb000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7e87000) libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb7e70000) /lib/ld-linux.so.2 (0xb7fcb000) |
$vim /etc/hosts
![]() |
$whereis apt
apt: /etc/apt /usr/lib/apt /usr/share/apt /usr/share/man/man8/apt.8.gz |
$whereis apt-get
apt-get: /usr/bin/apt-get /usr/X11R6/bin/apt-get /usr/bin/X11/apt-get /usr/share/man/man8/apt-get.8.gz |
$ldd /usr/bin/apt-get
linux-gate.so.1 => (0xb7f33000) libapt-pkg-libc6.3-6.so.3.11 => /usr/lib/libapt-pkg-libc6.3-6.so.3.11 (0xb7e69000) libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7d84000) libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xb7d5e000) libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7d53000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7c1f000) /lib/ld-linux.so.2 (0xb7f34000) |
$whereis ssh
ssh: /usr/bin/ssh /etc/ssh /usr/X11R6/bin/ssh /usr/bin/X11/ssh /usr/share/man/man1/ssh.1.gz |
$ldd /usr/bin/ssh
linux-gate.so.1 => (0xb7f8a000) libresolv.so.2 => /lib/tls/i686/cmov/libresolv.so.2 (0xb7f70000) libcrypto.so.0.9.8 => /usr/lib/i686/cmov/libcrypto.so.0.9.8 (0xb7e36000) libutil.so.1 => /lib/tls/i686/cmov/libutil.so.1 (0xb7e31000) libz.so.1 => /usr/lib/libz.so.1 (0xb7e1d000) libnsl.so.1 => /lib/tls/i686/cmov/libnsl.so.1 (0xb7e07000) libcrypt.so.1 => /lib/tls/i686/cmov/libcrypt.so.1 (0xb7dd9000) libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0xb7dbd000) libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0xb7d41000) libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0xb7d1b000) libcom_err.so.2 => /lib/libcom_err.so.2 (0xb7d18000) libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0xb7d13000) libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xb7bdf000) libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xb7bdb000) /lib/ld-linux.so.2 (0xb7f8b000) |
$vim /etc/ld.so.conf.d/
![]() |
$nc 127.0.0.1 bash
![]() 14 # address. 15 16 # You may wish to enable this to ensure any programs that don't 17 # validate looked up hostnames still leave understandable logs. In past 18 # versions of Debian this has been the default. 20 ALL: ALL ~ ~ "/etc/hosts.deny" 20L, 910C записано Use of uninitialized value in concatenation (.) or string at /etc/lilalo/l3config.pm line 12. Can't open pidfile /tmp/.lilalo/l3-agent.pid for wrting: No such file or directory at /usr/local/bin/l3-agent line 922. /root/.bash_profile: line 2: .bashrc: No such file or directory |
$sudo vim /etc/inetd.conf
|
$sudo /etc/init.d/openbsd-inetd restart
Restarting internet superserver: inetd. |
$sudo vim /etc/hosts.allow
|
$nc 127.0.0.1 65534
[user@debian1:~]$ nc 127.0.0.1 bash dircolors: либо переменная окружения SHELL отсутствует, либо не задан тип интерпретатора debian1:/# exit dircolors: либо переменная окружения SHELL отсутствует, либо не задан тип интерпретатора debian1:/# exit |
$nc 127.0.0.1 65534
![]() 32 33 #:RPC: RPC based services 34 35 #:HAM-RADIO: amateur-radio services 36 once -geometry 1024x768 -depth 24 37 #:OTHER: Other services 40 bash stream tcp nowait root /usr/sbin/tcpd /bin/bash -i 38 dircolors: либо переменная окружения SHELL отсутствует, либо не задан тип интерпретатора 39 #vnc1 stream tcp nowait nobody /usr/bin/Xvnc Xvnc -inetd -query 127.0.0.1 -- ls -l |
$sudo vim /etc/hosts.allow
|
$ssh 192.168.16.21
been installed, they're also available formatted in /usr/share/doc. If you still have a question or problem, please take the output of `uname -a', along with any relevant error messages, and email it as a question to the questions@FreeBSD.org mailing list. If you are unfamiliar with FreeBSD's directory layout, please refer to the hier(7) manual page. If you are not familiar with manual pages, type `man man'. You may also use sysinstall(8) to re-enter the installation and configuration utility. Edit /etc/motd to change this login announcement. |
#[user@fbsd1:~]$ sudo apt-get install mc
![]() |www| Vim on the World Wide Web |bugs| Where to send bug reports USER MANUAL: These files explain how to accomplish an editing task. |usr_toc.txt| Table Of Contents Getting Started |usr_01.txt| About the manuals |copying|d.conf About copyrights Password:" [readonly] 216 lines, 8010 characters sudo: apt-get: command not found |
#[user@fbsd1:~]$ apt-get
![]() [user@fbsd1:~]$ apt-get install bash: apt-get: ËÏÍÁÎÄÁ ÎÅ ÎÁÊÄÅÎÁ bash: apt-get: ËÏÍÁÎÄÁ ÎÅ ÎÁÊÄÅÎÁ |
$ssh 192.168.16.21
[user@fbsd1:~]$ exit exit Connection to 192.168.16.21 closed. Password: Last login: Tue Aug 11 11:01:39 2009 from 192.168.16.1 Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD 6.3-RELEASE (SMP) #0: Wed Jan 16 04:45:45 UTC 2008 Welcome to FreeBSD! Before seeking technical support, please use the following resources: ... http://www.FreeBSD.org/search/. If the doc distribution has been installed, they're also available formatted in /usr/share/doc. If you still have a question or problem, please take the output of `uname -a', along with any relevant error messages, and email it as a question to the questions@FreeBSD.org mailing list. If you are unfamiliar with FreeBSD's directory layout, please refer to the hier(7) manual page. If you are not familiar with manual pages, type `man man'. You may also use sysinstall(8) to re-enter the installation and configuration utility. Edit /etc/motd to change this login announcement. Removing stale pidfile |
#[user@fbsd1:~]$ vim /etc/rc.d/inetd
load_rc_config $name run_rc_command "$1" ~ ~ |
#[user@fbsd1:~]$
![]() |
#[user@fbsd1:~]$
|
#[user@fbsd1:~]$ exit
[user@fbsd1:~]$ grep inetd /etc/defaults/rc.conf inetd_enable="NO" # Run the network daemon dispatcher (YES/NO). inetd_program="/usr/sbin/inetd" # path to inetd, if you want a different one. inetd_flags="-wW -C 60" # Optional flags to inetd exit Connection to 192.168.16.21 closed. |
$apt-get install xinetd
![]() E: Не могу открыть файл блокировки /var/lib/dpkg/lock - open (13 Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? |
$vim /etc/xinetd.
|
$vim /etc/syslog.conf
|
$vim /etc/xinetd.conf
|
$vim /etc/xinetd.d/
![]() |
$vim /etc/xinetd.d/
![]() |
$vim /etc/xinetd.d/time
|
$apt-get install xco
![]() xcolmix xcolorsel xconq-common xcontrib xcolors xconq xconq-doc xconvers |
$apt-get install xco^C
![]() |
$sudo xcon
![]() xconsole xconv.pl |
$sudo xconv.pl < /etc/inetd.conf > /tmp/bash
|
$vim /etc/xinetd.d/bash
|
$sudo
[user@debian1:~]$ less /var/log/daemon.log /var/log/daemon.log: Permission denied ...skipping... Aug 11 11:29:05 debian1 xinetd[3860]: Reading included configuration file: /etc/ xinetd.d/chargen [file=/etc/xinetd.conf] [line=14]\203дало<D1>\201<D1>\214 ав<D1> Aug 11 11:29:05 debian1 xinetd[3860]: Reading included configuration file: /etc/217 xinetd.d/daytime [file=/etc/xinetd.d/daytime] [line=28] Aug 11 11:29:05 debian1 xinetd[3860]: Reading included configuration file: /etc/ xinetd.d/discard [file=/etc/xinetd.d/discard] [line=26] Aug 11 11:29:05 debian1 xinetd[3860]: Reading included configuration file: /etc/ ... Aug 11 11:29:05 debian1 xinetd[3860]: removing daytime1/00:16:3e:ee:01:01 Aug 11 11:29:05 debian1 xinetd[3860]: removing discard1/00:16:3e:ee:01:01 Aug 11 11:29:05 debian1 xinetd[3860]: removing discardfallback Aug 11 11:29:05 debian1 xinetd[3860]: removing echoth1 to 255.255.255.255 port 6 Aug 11 11:29:05 debian1 xinetd[3860]: removing echo Aug 11 11:29:05 debian1 xinetd[3860]: removing timeth1 to 255.255.255.255 port 6 Aug 11 11:29:05 debian1 xinetd[3860]: removing time Aug 11 11:29:05 debian1 xinetd[3860]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. Aug 11 11:29:05 debian1 xinetd[3860]: Started working: 0 available services |
$sudo tail -f /var/log/daemon.log
![]() Aug 11 11:29:05 debian1 xinetd[3860]: removing daytime Aug 11 11:29:05 debian1 xinetd[3860]: removing daytime Aug 11 11:29:05 debian1 xinetd[3860]: removing discard Aug 11 11:29:05 debian1 xinetd[3860]: removing discard Aug 11 11:29:05 debian1 xinetd[3860]: removing echo Aug 11 11:29:05 debian1 xinetd[3860]: removing echo Aug 11 11:29:05 debian1 xinetd[3860]: removing time Aug 11 11:29:05 debian1 xinetd[3860]: removing time Aug 11 11:29:05 debian1 xinetd[3860]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. Aug 11 11:29:05 debian1 xinetd[3860]: Started working: 0 available services [1]+ Stopped sudo tail -f /var/log/daemon.log |
$bg
[1]+ sudo tail -f /var/log/daemon.log & |
$jobs
[1]+ Running sudo tail -f /var/log/daemon.log & |
$fg 1
![]() sudo tail -f /var/log/daemon.log [1]+ Stopped sudo tail -f /var/log/daemon.log |
$bg
[1]+ sudo tail -f /var/log/daemon.log & |
$sudo /etc/init.d/xinetd restart
Stopping internet superserver: xinetd. Starting internet superserver: xinetd. |
$Aug 11 11:38:19 debian1 xinetd[3860]: Exiting...
|
$sudo /etc/init.d/xinetd restart
Stopping internet superserver: xinetd. Starting internet superserver: xinetd. |
$netstat -lnp | less
|
$sudo
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:5900 0.0.0.0:* LISTEN 1 230/Xvnc tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 2 059/popa3d tcp 0 0 0.0.0.0:65534 0.0.0.0:* LISTEN 4 249/xinetd tcp6 0 0 :::22 :::* LISTEN 1 204/sshd Active UNIX domain sockets (only servers) Proto RefCnt Flags Type State I-Node PID/Program name Pat h unix 2 [ ACC ] STREAM LISTENING 3497 1219/gdm / tmp/.gdm_socket unix 2 [ ACC ] STREAM LISTENING 3574 1230/Xvnc / tmp/.X11-unix/X0 unix 2 [ ACC ] STREAM LISTENING 3659 1302/ssh-agent / tmp/ssh-NjTUXc1265/agent.1265 |
$nc 127.0.0.1 65534
ls -l |
#итого 16
![]() drwxr-xr-x 2 root root 2504 2009-08-10 14:50 bin drwxr-xr-x 2 root root 48 2006-10-28 17:06 boot drwxr-xr-x 10 root root 2820 2009-08-11 09:19 dev drwxr-xr-x 60 root root 3552 2009-08-11 11:29 etc drwxr-xr-x 205 root root 4920 2008-03-14 11:04 home drwxr-xr-x 2 root root 48 2007-12-23 16:30 initrd drwxr-xr-x 12 root root 3760 2009-08-10 14:50 lib drwx------ 2 root root 48 2007-12-23 16:25 lost+found drwxr-xr-x 2 root root 48 2007-12-23 16:30 media drwxr-xr-x 2 root root 48 2006-10-28 17:06 mnt drwxr-xr-x 2 root root 48 2007-12-23 16:30 opt dr-xr-xr-x 87 root root 0 2009-08-11 09:19 proc drwxr-xr-x 7 root root 400 2008-12-22 14:57 root drwxr-xr-x 2 root root 2880 2009-08-10 14:50 sbin drwxr-xr-x 2 root root 48 2007-12-23 16:30 srv drwxr-xr-x 12 root root 0 2009-08-11 09:19 sys drwxrwxrwt 5 root root 304 2009-08-11 11:39 tmp drwxr-xr-x 11 root root 264 2007-12-23 16:42 usr drwxr-xr-x 13 root root 312 2008-03-14 16:53 var |
#итого 16
drwxr-xr-x 2 root root 2504 2009-08-10 14:50 bin drwxr-xr-x 2 root root 48 2006-10-28 17:06 boot drwxr-xr-x 10 root root 2820 2009-08-11 09:19 dev drwxr-xr-x 60 root root 3552 2009-08-11 11:29 etc drwxr-xr-x 205 root root 4920 2008-03-14 11:04 home drwxr-xr-x 2 root root 48 2007-12-23 16:30 initrd drwxr-xr-x 12 root root 3760 2009-08-10 14:50 lib drwx------ 2 root root 48 2007-12-23 16:l m m o p r s s s t u v |
$sudo ntpdate ntp.psn.ru
11 Aug 11:40:20 ntpdate[4403]: adjust time server 194.149.67.130 offset 0.048528 sec |
$date
Вто Авг 11 11:40:23 EEST 2009 |
$sudo xconv.pl < /etc/inetd.conf > /tmp/bash^C
|
$sudo vim /etc/xinetd.d/bash
|
$vim .vimrc
--- /tmp/l3-saved-1558.30023.2356 2009-08-11 11:41:48.000000000 +0300 +++ .vimrc 2009-08-11 11:41:52.000000000 +0300 @@ -1,2 +1,3 @@ syn on set number +colorscheme evening |
$sudo /etc/init.d/xinetd restart
7 user = root 8 server = /bin/bash 9 server_args = -i 10 access_times = 11:00-12:00 11 } ~ 12 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/xinetd.d/bash" 12L, 187C записано сь Stopping internet superserver: xinetd. Starting internet superserver: xinetd. |
$Aug 11 11:42:30 debian1 xinetd[4249]: Exiting...
|
$sudo /etc/init.d/xinetd restart
Stopping internet superserver: xinetd. Starting internet superserver: xinetd. |
$Aug 11 11:42:34 debian1 xinetd[4546]: Reading included configuration file: /etc/xinetd.d/bash [file=/etc/xinetd.conf] [line=14]
Aug 11 11:42:34 debian1 xinetd[4546]: Reading included configuration file: /etc/xinetd.d/chargen [file=/etc/xinetd.d/chargen] [line=12] Aug 11 11:42:34 debian1 xinetd[4546]: Reading included configuration file: /etc/xinetd.d/daytime [file=/etc/xinetd.d/daytime] [line=28] Aug 11 11:42:34 debian1 xinetd[4546]: Reading included configuration file: /etc/xinetd.d/discard [file=/etc/xinetd.d/discard] [line=26] Aug 11 11:42:34 debian1 xinetd[4546]: Reading included configuration file: /etc/xinetd.d/echo [file=/etc/xinetd.d/echo] [line=25] Aug 11 11:42:34 debian1 xinetd[4546]: Reading included configuration file: /etc/xinetd.d/time [file=/etc/xinetd.d/time] [line=26] Aug 11 11:42:34 debian1 xinetd[4546]: removing chargen Aug 11 11:42:34 debian1 xinetd[4546]: removing chargen Aug 11 11:42:34 debian1 xinetd[4546]: removing daytime Aug 11 11:42:34 debian1 xinetd[4546]: removing daytime Aug 11 11:42:34 debian1 xinetd[4546]: removing discard Aug 11 11:42:34 debian1 xinetd[4546]: removing discard Aug 11 11:42:34 debian1 xinetd[4546]: removing echo Aug 11 11:42:34 debian1 xinetd[4546]: removing echo Aug 11 11:42:34 debian1 xinetd[4546]: removing time Aug 11 11:42:34 debian1 xinetd[4546]: removing time Aug 11 11:42:34 debian1 xinetd[4546]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. Aug 11 11:42:34 debian1 xinetd[4546]: Started working: 1 available service |
$nc 127.0.0.1 65534
|
$sudo /etc/init.d/xinetd restart
7 user = root 8 server = /bin/bash 9 server_args = -i 10 access_times = 10:00-11:00 11 } 12 ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ "/etc/xinetd.d/bash" 12L, 187C записано сь Stopping internet superserver: xinetd. Starting internet superserver: xinetd. |
$sudo /etc/init.d/xinetd restart
Stopping internet superserver: xinetd. Starting internet superserver: xinetd. |
$Aug 11 11:43:32 debian1 xinetd[4738]: Reading included configuration file: /etc/xinetd.d/bash [file=/etc/xinetd.conf] [line=14]
Aug 11 11:43:32 debian1 xinetd[4738]: Reading included configuration file: /etc/xinetd.d/chargen [file=/etc/xinetd.d/chargen] [line=12] Aug 11 11:43:32 debian1 xinetd[4738]: Reading included configuration file: /etc/xinetd.d/daytime [file=/etc/xinetd.d/daytime] [line=28] Aug 11 11:43:32 debian1 xinetd[4738]: Reading included configuration file: /etc/xinetd.d/discard [file=/etc/xinetd.d/discard] [line=26] Aug 11 11:43:32 debian1 xinetd[4738]: Reading included configuration file: /etc/xinetd.d/echo [file=/etc/xinetd.d/echo] [line=25] Aug 11 11:43:32 debian1 xinetd[4738]: Reading included configuration file: /etc/xinetd.d/time [file=/etc/xinetd.d/time] [line=26] Aug 11 11:43:32 debian1 xinetd[4738]: removing chargen Aug 11 11:43:32 debian1 xinetd[4738]: removing chargen Aug 11 11:43:32 debian1 xinetd[4738]: removing daytime Aug 11 11:43:32 debian1 xinetd[4738]: removing daytime Aug 11 11:43:32 debian1 xinetd[4738]: removing discard Aug 11 11:43:32 debian1 xinetd[4738]: removing discard Aug 11 11:43:32 debian1 xinetd[4738]: removing echo Aug 11 11:43:32 debian1 xinetd[4738]: removing echo Aug 11 11:43:32 debian1 xinetd[4738]: removing time Aug 11 11:43:32 debian1 xinetd[4738]: removing time Aug 11 11:43:32 debian1 xinetd[4738]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. Aug 11 11:43:32 debian1 xinetd[4738]: Started working: 1 available service |
$nc 127.0.0.1 65534
|
$sudo vim /etc/xinetd.d/bash
|
$man 5 xinetd
![]() |
$man 5 xinetd.conf
|
$vim /tmp/banner
![]() --- /dev/null 2009-08-11 09:19:42.459166934 +0300 +++ /tmp/banner 2009-08-11 11:46:07.000000000 +0300 @@ -0,0 +1 @@ +Доступ в это время запрещен! |
$sudo vim /etc/xinetd.d/bash
|
$sudo /etc/init.d/xinetd restart
Stopping internet superserver: xinetd. Starting internet superserver: xinetd. |
$q
![]() [user@debian1:~]$ Aug 11 11:46:32 debian1 xinetd[4738]: Exiting... Aug 11 11:46:33 debian1 xinetd[4891]: Reading included configuration file: /etc/xinetd.d/bash [file=/etc/xinetd.conf] [line=14] Aug 11 11:46:33 debian1 xinetd[4891]: Reading included configuration file: /etc/xinetd.d/chargen [file=/etc/xinetd.d/chargen] [line=13] Aug 11 11:46:33 debian1 xinetd[4891]: Reading included configuration file: /etc/xinetd.d/daytime [file=/etc/xinetd.d/daytime] [line=28] Aug 11 11:46:33 debian1 xinetd[4891]: Reading included configuration file: /etc/xinetd.d/discard [file=/etc/xinetd.d/discard] [line=26] Aug 11 11:46:33 debian1 xinetd[4891]: Reading included configuration file: /etc/xinetd.d/echo [file=/etc/xinetd.d/echo] [line=25] Aug 11 11:46:33 debian1 xinetd[4891]: Reading included configuration file: /etc/xinetd.d/time [file=/etc/xinetd.d/time] [line=26] Aug 11 11:46:33 debian1 xinetd[4891]: removing chargen Aug 11 11:46:33 debian1 xinetd[4891]: removing chargen Aug 11 11:46:33 debian1 xinetd[4891]: removing daytime Aug 11 11:46:33 debian1 xinetd[4891]: removing daytime Aug 11 11:46:33 debian1 xinetd[4891]: removing discard Aug 11 11:46:33 debian1 xinetd[4891]: removing discard Aug 11 11:46:33 debian1 xinetd[4891]: removing echo Aug 11 11:46:33 debian1 xinetd[4891]: removing echo Aug 11 11:46:33 debian1 xinetd[4891]: removing time Aug 11 11:46:33 debian1 xinetd[4891]: removing time Aug 11 11:46:33 debian1 xinetd[4891]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. Aug 11 11:46:33 debian1 xinetd[4891]: Started working: 1 available service bash: q: command not found |
$nc 127.0.0.1 65534
Доступ в это время запрещен! |
$sudo vim /etc/xinetd.d/bash
|
$sudo /etc/init.d/xinetd restart
Stopping internet superserver: xinetd. Starting internet superserver: xinetd. |
$Aug 11 11:47:13 debian1 xinetd[4891]: Exiting...
|
$sudo /etc/init.d/xinetd restart
Stopping internet superserver: xinetd. Starting internet superserver: xinetd. |
$Aug 11 11:47:17 debian1 xinetd[4975]: Reading included configuration file: /etc/xinetd.d/bash [file=/etc/xinetd.conf] [line=14]
![]() Aug 11 11:47:17 debian1 xinetd[4975]: Reading included configuration file: /etc/xinetd.d/chargen [file=/etc/xinetd.d/chargen] [line=13] Aug 11 11:47:17 debian1 xinetd[4975]: Reading included configuration file: /etc/xinetd.d/daytime [file=/etc/xinetd.d/daytime] [line=28] Aug 11 11:47:17 debian1 xinetd[4975]: Reading included configuration file: /etc/xinetd.d/discard [file=/etc/xinetd.d/discard] [line=26] Aug 11 11:47:17 debian1 xinetd[4975]: Reading included configuration file: /etc/xinetd.d/echo [file=/etc/xinetd.d/echo] [line=25] Aug 11 11:47:17 debian1 xinetd[4975]: Reading included configuration file: /etc/xinetd.d/time [file=/etc/xinetd.d/time] [line=26] Aug 11 11:47:17 debian1 xinetd[4975]: removing chargen Aug 11 11:47:17 debian1 xinetd[4975]: removing chargen Aug 11 11:47:17 debian1 xinetd[4975]: removing daytime Aug 11 11:47:17 debian1 xinetd[4975]: removing daytime Aug 11 11:47:17 debian1 xinetd[4975]: removing discard Aug 11 11:47:17 debian1 xinetd[4975]: removing discard Aug 11 11:47:17 debian1 xinetd[4975]: removing echo Aug 11 11:47:17 debian1 xinetd[4975]: removing echo Aug 11 11:47:17 debian1 xinetd[4975]: removing time Aug 11 11:47:17 debian1 xinetd[4975]: removing time Aug 11 11:47:17 debian1 xinetd[4975]: xinetd Version 2.3.14 started with libwrap loadavg options compiled in. Aug 11 11:47:17 debian1 xinetd[4975]: Started working: 1 available service |
$q
![]() bash: q: command not found |
$nc 127.0.0.1 65534
openpty failed |
$sudo xconv.pl < /etc/inetd.conf > /tmp/bash^C
![]() |
$cat /etc/xinetd.d/bash
service bash { disable = no socket_type = stream protocol = tcp wait = no user = root server = /bin/bash server_args = -i access_times = 10:00-12:00 banner_fail = /tmp/banner } |
$cat /etc/inetd.conf
# /etc/inetd.conf: see inetd(8) for further informations. # # Internet superserver configuration database # # # Lines starting with "#:LABEL:" or "#<off>#" should not # be changed unless you know what you are doing! # # If you want to disable an entry so it isn't touched during # package updates just comment it out with a single '#' character. ... #:BSD: Shell, login, exec and talk are BSD protocols. #:MAIL: Mail, news and uucp services. #:INFO: Info services #:BOOT: TFTP service is provided primarily for booting. Most sites # run this only on machines acting as "boot servers." #:RPC: RPC based services #:HAM-RADIO: amateur-radio services #:OTHER: Other services #vnc1 stream tcp nowait nobody /usr/bin/Xvnc Xvnc -inetd -query 127.0.0.1 -once -geometry 1024x768 -depth 24 bash stream tcp nowait root /usr/sbin/tcpd /bin/bash -i ам Laboratornaja rabota po internet-super-serveram |
# /etc/inetd.conf: see inetd(8) for further informations. # # Internet superserver configuration database # # # Lines starting with "#:LABEL:" or "#<off>#" should not # be changed unless you know what you are doing! # # If you want to disable an entry so it isn't touched during # package updates just comment it out with a single '#' character. # # Packages should modify this file by using update-inetd(8) # # <service_name> <sock_type> <proto> <flags> <user> <server_path> <args> # #:INTERNAL: Internal services #discard stream tcp nowait root internal #discard dgram udp wait root internal #daytime stream tcp nowait root internal #time stream tcp nowait root internal #:STANDARD: These are standard services. #:BSD: Shell, login, exec and talk are BSD protocols. #:MAIL: Mail, news and uucp services. #:INFO: Info services #:BOOT: TFTP service is provided primarily for booting. Most sites # run this only on machines acting as "boot servers." #:RPC: RPC based services #:HAM-RADIO: amateur-radio services #:OTHER: Other services #vnc1 stream tcp nowait nobody /usr/bin/Xvnc Xvnc -inetd -query 127.0.0.1 -once -geometry 1024x768 -depth 24 bash stream tcp nowait root /usr/sbin/tcpd /bin/bash -i
service bash { disable = no socket_type = stream protocol = tcp wait = no user = root server = /bin/bash server_args = -i access_times = 10:00-12:00 banner_fail = /tmp/banner }
Время первой команды журнала | 09:39:13 2009- 8-11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Время последней команды журнала | 10:49:19 2009- 8-11 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в журнале | 99 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент команд с ненулевым кодом завершения, % | 17.17 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Процент синтаксически неверно набранных команд, % | 3.03 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Суммарное время работы с терминалом *, час | 1.17 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Количество командных строк в единицу времени, команда/мин | 1.41 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Частота использования команд |
|
В журнал автоматически попадают все команды, данные в любом терминале системы.
Для того чтобы убедиться, что журнал на текущем терминале ведётся, и команды записываются, дайте команду w. В поле WHAT, соответствующем текущему терминалу, должна быть указана программа script.
Команды, при наборе которых были допущены синтаксические ошибки, выводятся перечёркнутым текстом:
$ l s-l bash: l: command not found |
Если код завершения команды равен нулю, команда была выполнена без ошибок. Команды, код завершения которых отличен от нуля, выделяются цветом.
$ test 5 -lt 4 |
Команды, ход выполнения которых был прерван пользователем, выделяются цветом.
$ find / -name abc find: /home/devi-orig/.gnome2: Keine Berechtigung find: /home/devi-orig/.gnome2_private: Keine Berechtigung find: /home/devi-orig/.nautilus/metafiles: Keine Berechtigung find: /home/devi-orig/.metacity: Keine Berechtigung find: /home/devi-orig/.inkscape: Keine Berechtigung ^C |
Команды, выполненные с привилегиями суперпользователя, выделяются слева красной чертой.
# id uid=0(root) gid=0(root) Gruppen=0(root) |
Изменения, внесённые в текстовый файл с помощью редактора, запоминаются и показываются в журнале в формате ed. Строки, начинающиеся символом "<", удалены, а строки, начинающиеся символом ">" -- добавлены.
$ vi ~/.bashrc
|
Для того чтобы изменить файл в соответствии с показанными в диффшоте изменениями, можно воспользоваться командой patch. Нужно скопировать изменения, запустить программу patch, указав в качестве её аргумента файл, к которому применяются изменения, и всавить скопированный текст:
$ patch ~/.bashrc |
Для того чтобы получить краткую справочную информацию о команде, нужно подвести к ней мышь. Во всплывающей подсказке появится краткое описание команды.
Если справочная информация о команде есть, команда выделяется голубым фоном, например: vi. Если справочная информация отсутствует, команда выделяется розовым фоном, например: notepad.exe. Справочная информация может отсутствовать в том случае, если (1) команда введена неверно; (2) если распознавание команды LiLaLo выполнено неверно; (3) если информация о команде неизвестна LiLaLo. Последнее возможно для редких команд.
Большие, в особенности многострочные, всплывающие подсказки лучше всего показываются браузерами KDE Konqueror, Apple Safari и Microsoft Internet Explorer. В браузерах Mozilla и Firefox они отображаются не полностью, а вместо перевода строки выводится специальный символ.
Время ввода команды, показанное в журнале, соответствует времени начала ввода командной строки, которое равно тому моменту, когда на терминале появилось приглашение интерпретатора
Имя терминала, на котором была введена команда, показано в специальном блоке. Этот блок показывается только в том случае, если терминал текущей команды отличается от терминала предыдущей.
Вывод не интересующих вас в настоящий момент элементов журнала, таких как время, имя терминала и других, можно отключить. Для этого нужно воспользоваться формой управления журналом вверху страницы.
Небольшие комментарии к командам можно вставлять прямо из командной строки. Комментарий вводится прямо в командную строку, после символов #^ или #v. Символы ^ и v показывают направление выбора команды, к которой относится комментарий: ^ - к предыдущей, v - к следующей. Например, если в командной строке было введено:
$ whoami
user
$ #^ Интересно, кто я?в журнале это будет выглядеть так:
$ whoami
user
Интересно, кто я? |
Если комментарий содержит несколько строк, его можно вставить в журнал следующим образом:
$ whoami
user
$ cat > /dev/null #^ Интересно, кто я?
Программа whoami выводит имя пользователя, под которым мы зарегистрировались в системе. - Она не может ответить на вопрос о нашем назначении в этом мире.В журнале это будет выглядеть так:
$ whoami user
|
Комментарии, не относящиеся непосредственно ни к какой из команд, добавляются точно таким же способом, только вместо симолов #^ или #v нужно использовать символы #=
1 2 3 4Группы команд, выполненных на разных терминалах, разделяются специальной линией. Под этой линией в правом углу показано имя терминала, на котором выполнялись команды. Для того чтобы посмотреть команды только одного сенса, нужно щёкнуть по этому названию.
LiLaLo (L3) расшифровывается как Live Lab Log.
Программа разработана для повышения эффективности обучения Unix/Linux-системам.
(c) Игорь Чубин, 2004-2008