突然间,我开始在我的用户主目录中看到这个“Typescript”文件,我很好奇,打开它只是为了看到这个:
Script started on 2020-04-11 20:59:06+0600
]0;root@abar: /home/abartoharoot@abar:/home/abartoha# i a
Command 'i' not found, but can be installed with:
apt install iprint
]0;root@abar: /home/abartoharoot@abar:/home/abartoha# iprint
Command 'iprint' not found, did you mean:
command 'qprint' from deb qprint
command 'print' from deb mime-support
Try: apt install <deb name>
]0;root@abar: /home/abartoharoot@abar:/home/abartoha# list
Command 'list' not found, did you mean:
command 'hist' from deb loki
command 'bist' from deb bist
command 'klist' from deb heimdal-clients
command 'klist' from deb krb5-user
command 'flist' from deb mmh
command 'flist' from deb nmh
command 'mlist' from deb mblaze
command 'last' from deb util-linux
command 'dist' from deb mmh
command 'dist' from deb nmh
command 'lift' from deb lift
command 'gist' from deb yorick
Try: apt install <deb name>
]0;root@abar: /home/abartoharoot@abar:/home/abartoha# kclose
Command 'kclose' not found, did you mean:
command 'gclose' from deb gnustep-gui-runtime
Try: apt install <deb name>
]0;root@abar: /home/abartoharoot@abar:/home/abartoha# close
Command 'close' not found, did you mean:
command 'gclose' from deb gnustep-gui-runtime
Try: apt install <deb name>
]0;root@abar: /home/abartoharoot@abar:/home/abartoha# help
GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)
These shell commands are defined internally. Type `help' to see this list.
Type `help name' to find out more about the function `name'.
Use `info bash' to find out more about the shell in general.
Use `man -k' or `info' to find out more about commands not in this list.
A star (*) next to a name means that the command is disabled.
job_spec [&] history [-c] [-d offset] [n] or hist>
(( expression )) if COMMANDS; then COMMANDS; [ elif C>
. filename [arguments] jobs [-lnprs] [jobspec ...] or jobs >
: kill [-s sigspec | -n signum | -sigs>
[ arg... ] let arg [arg ...]
[[ expression ]] local [option] name[=value] ...
alias [-p] [name[=value] ... ] logout [n]
bg [job_spec ...] mapfile [-d delim] [-n count] [-O or>
bind [-lpsvPSVX] [-m keymap] [-f file> popd [-n] [+N | -N]
break [n] printf [-v var] format [arguments]
builtin [shell-builtin [arg ...]] pushd [-n] [+N | -N | dir]
caller [expr] pwd [-LP]
case WORD in [PATTERN [| PATTERN]...)> read [-ers] [-a array] [-d delim] [->
cd [-L|[-P [-e]] [-@]] [dir] readarray [-n count] [-O origin] [-s>
command [-pVv] command [arg ...] readonly [-aAf] [name[=value] ...] o>
compgen [-abcdefgjksuv] [-o option] [> return [n]
complete [-abcdefgjksuv] [-pr] [-DE] > select NAME [in WORDS ... ;] do COMM>
compopt [-o|+o option] [-DE] [name ..> set [-abefhkmnptuvxBCHP] [-o option->
continue [n] shift [n]
coproc [NAME] command [redirections] shopt [-pqsu] [-o] [optname ...]
declare [-aAfFgilnrtux] [-p] [name[=v> source filename [arguments]
dirs [-clpv] [+N] [-N] suspend [-f]
disown [-h] [-ar] [jobspec ... | pid > test [expr]
echo [-neE] [arg ...] time [-p] pipeline
enable [-a] [-dnps] [-f filename] [na> times
eval [arg ...] trap [-lp] [[arg] signal_spec ...]
exec [-cl] [-a name] [command [argume> true
exit [n] type [-afptP] name [name ...]
export [-fn] [name[=value] ...] or ex> typeset [-aAfFgilnrtux] [-p] name[=v>
false ulimit [-SHabcdefiklmnpqrstuvxPT] [l>
fc [-e ename] [-lnr] [first] [last] o> umask [-p] [-S] [mode]
fg [job_spec] unalias [-a] name [name ...]
for NAME [in WORDS ... ] ; do COMMAND> unset [-f] [-v] [-n] [name ...]
for (( exp1; exp2; exp3 )); do COMMAN> until COMMANDS; do COMMANDS; done
function name { COMMANDS ; } or name > variables - Names and meanings of so>
getopts optstring name [arg] wait [-n] [id ...]
hash [-lr] [-p pathname] [-dt] [name > while COMMANDS; do COMMANDS; done
help [-dms] [pattern ...] { COMMANDS ; }
]0;root@abar: /home/abartoharoot@abar:/home/abartoha# helpclosekclose[2Plistiprint[3P aclear[3Pfgclearfgclea[1Pclear[3Pfgclearwifiteeifite[4Psuunsuputhon ./home/abartoha/script.py
[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[Cclear[Kpython[1Pclearpythonscript.py[6Pdirclearscript.pyu --loginh[Kclearsuundo --loginabartoha[6Pclearsu abartoha[1PCOMMAND[5Pclearsu -shclearclear[6Phelp[1P--h[1Ph-help[4Pfgwifiteexit()[Kwifite[4Pjjwifite clee[Kar
[32m .;' `;,
[32m .;' ,;' `;, `;, [0mWiFite v2 (r87)
[32m.;' ,;' ,;' `;, `;, `;,
[32m:: :: : [37m( )[32m : :: :: [37mautomated wireless auditor
[32m':. ':. ':. [37m/_\[32m ,:' ,:' ,:'
[32m ':. ':. [37m/___\[32m ,:' ,:' [37mdesigned for Linux
[32m ':. [37m/_____\[32m ,:'
[32m [37m/ \[32m
[0m
usage: wifite [-h] [--check CHECK] [--cracked] [--recrack] [--all]
[-i INTERFACE] [--mac] [--mon-iface MONITOR_INTERFACE]
[-c CHANNEL] [-e ESSID] [-b BSSID] [--showb] [--nodeauth]
[--power POWER] [--tx TX] [--quiet] [--wpa] [--wpat WPAT]
[--wpadt WPADT] [--strip] [--crack] [--dict DIC] [--aircrack]
[--pyrit] [--tshark] [--cowpatty] [--wep] [--pps PPS]
[--wept WEPT] [--chopchop] [--arpreplay] [--fragment]
[--caffelatte] [--p0841] [--hirte] [--nofakeauth]
[--wepca WEPCA] [--wepsave WEPSAVE] [--wps] [--pixie]
[--wpst WPST] [--wpsratio WPSRATIO] [--wpsretry WPSRETRY]
wifite: error: unrecognized arguments: clear
]0;root@abar: /home/abartoharoot@abar:/home/abartoha# clear
[3J[H[2J]0;root@abar: /home/abartoharoot@abar:/home/abartoha# history 0c
bash: history: 0c: numeric argument required
]0;root@abar: /home/abartoharoot@abar:/home/abartoha# clear
[3J[H[2J]0;root@abar: /home/abartoharoot@abar:/home/abartoha# help\[K
GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu)
These shell commands are defined internally. Type `help' to see this list.
Type `help name' to find out more about the function `name'.
Use `info bash' to find out more about the shell in general.
Use `man -k' or `info' to find out more about commands not in this list.
A star (*) next to a name means that the command is disabled.
job_spec [&] history [-c] [-d offset] [n] or hist>
(( expression )) if COMMANDS; then COMMANDS; [ elif C>
. filename [arguments] jobs [-lnprs] [jobspec ...] or jobs >
: kill [-s sigspec | -n signum | -sigs>
[ arg... ] let arg [arg ...]
[[ expression ]] local [option] name[=value] ...
alias [-p] [name[=value] ... ] logout [n]
bg [job_spec ...] mapfile [-d delim] [-n count] [-O or>
bind [-lpsvPSVX] [-m keymap] [-f file> popd [-n] [+N | -N]
break [n] printf [-v var] format [arguments]
builtin [shell-builtin [arg ...]] pushd [-n] [+N | -N | dir]
caller [expr] pwd [-LP]
case WORD in [PATTERN [| PATTERN]...)> read [-ers] [-a array] [-d delim] [->
cd [-L|[-P [-e]] [-@]] [dir] readarray [-n count] [-O origin] [-s>
command [-pVv] command [arg ...] readonly [-aAf] [name[=value] ...] o>
compgen [-abcdefgjksuv] [-o option] [> return [n]
complete [-abcdefgjksuv] [-pr] [-DE] > select NAME [in WORDS ... ;] do COMM>
compopt [-o|+o option] [-DE] [name ..> set [-abefhkmnptuvxBCHP] [-o option->
continue [n] shift [n]
coproc [NAME] command [redirections] shopt [-pqsu] [-o] [optname ...]
declare [-aAfFgilnrtux] [-p] [name[=v> source filename [arguments]
dirs [-clpv] [+N] [-N] suspend [-f]
disown [-h] [-ar] [jobspec ... | pid > test [expr]
echo [-neE] [arg ...] time [-p] pipeline
enable [-a] [-dnps] [-f filename] [na> times
eval [arg ...] trap [-lp] [[arg] signal_spec ...]
exec [-cl] [-a name] [command [argume> true
exit [n] type [-afptP] name [name ...]
export [-fn] [name[=value] ...] or ex> typeset [-aAfFgilnrtux] [-p] name[=v>
false ulimit [-SHabcdefiklmnpqrstuvxPT] [l>
fc [-e ename] [-lnr] [first] [last] o> umask [-p] [-S] [mode]
fg [job_spec] unalias [-a] name [name ...]
for NAME [in WORDS ... ] ; do COMMAND> unset [-f] [-v] [-n] [name ...]
for (( exp1; exp2; exp3 )); do COMMAN> until COMMANDS; do COMMANDS; done
function name { COMMANDS ; } or name > variables - Names and meanings of so>
getopts optstring name [arg] wait [-n] [id ...]
hash [-lr] [-p pathname] [-dt] [name > while COMMANDS; do COMMANDS; done
help [-dms] [pattern ...] { COMMANDS ; }
]0;root@abar: /home/abartoharoot@abar:/home/abartoha# helpclearhistory 0c[5Pclearwifite clear[8Phelpclosekclose[2Plistiprint[3P aclear[3Pfgclearfgclea[1Pclear[3Pfgclearwifiteeifite[4Psuunsuputhon ./home/abartoha/script.py
[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[Cclear[Kpython[1Pclearpythonscript.py[6Pdirclearscript.pyu --loginh[Kclearsuundo --loginabartoha[6Pclearsu abartoha[1PCOMMAND[5Pclearsu -shclearclear[6Phelp[1P--h[1Ph-help[4Pfgwifiteexit()[Kwifite[4Pjjwifite jj[Kwifite[2Pexit()wifite[4Pfg--help[Kh-hhelpclearclear[Ksu -hsclearsu COMMANDabartoha[6Pclearsu abartoha[1P--login[4Pundo[1Pclearsu -h-login[1Pcript.py[4Pclear[2Pdirscript.py[3Ppython[1Pclearpython[1Pclearputhon ./home/abartoha/script.py
[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[C[Cunsu[K[2Psueifitewifite[1Pclear[3Pfgclearfgclea[1Pclear[3Pfgclear[2Pi aprint[2Plistkclose[1Pclose[1Phelpwifite clear[7Pclearhistory 0c[5Pclear[1Phelp[Khistory -c
]0;root@abar: /home/abartoharoot@abar:/home/abartoha# e[Kexit
我不知道,虽然我有一些猜测,但我希望有一个好人能提供一些现实。我使用 Linux Mint、SSD 上的 Windows、HDD 上的 Linux。感谢您留了这么远。
答案1
去年(2020 年)4 月 11 日,您运行了该script
命令(请参阅man script
)。当它运行时,它会捕获终端的所有输入和输出并将其写入日志文件。默认情况下,该文件被调用typescript
并写入当前目录。
例子
捕获会话日志
script
Script started, file is typescript
~$ date
19 Feb 2021 10:07:29
~$ exit
exit
Script done, file is typescript
查看日志文件
cat typescript
Script started on 2021-02-19 10:07:27+00:00 [TERM="xterm" TTY="/dev/pty0" COLUMNS="112" LINES="24"]
~$ date
19 Feb 2021 10:07:29
~$ exit
exit
Script done on 2021-02-19 10:07:31+00:00 [COMMAND_EXIT_CODE="0"]
您会注意到,实际上所有内容都被捕获,包括 shell 提示符、转义代码序列以及从错误输入中删除的内容。 (在研究这样的日志文件时,试图理解全屏编辑会话几乎是不可能的,除非你简单地理解cat
它。)