Posted: . At: 10:16 AM. This was 2 years ago. Post ID: 16057
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


Interesting Linux command.


Interesting Linux command. This will give output rather like hacker-typer, this is printing the strace output of the ps aux command, this is very interesting to watch as the user can see what is actually happening when you are running this very useful one-liner. This prints quite pertinent output.

strace ps aux 2>&1 | pv -q -L 100

This is an example of the output, this is a good command to leave running in a terminal to provide some cool scrolling code to decorate your hacker desktop.

┌──(john㉿DESKTOP-PF01IEE)-[~]
└─$ strace ps aux 2>&1 | pv -q -L 100
execve("/usr/bin/ps", ["ps", "aux"], 0x7ffe23414158 /* 35 vars */) = 0
brk(NULL)                               = 0x55724113b000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=39811, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 39811, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7effbfc07000
close(3)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libprocps.so.8", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200V\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=84016, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7effbfc05000
mmap(NULL, 229408, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7effbfbcc000
mmap(0x7effbfbd1000, 40960, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x5000) = 0x7effbfbd1000
mmap(0x7effbfbdb000, 16384, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0xf000) = 0x7effbfbdb000
mmap(0x7effbfbdf000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x12000) = 0x7effbfbdf000
mmap(0x7effbfbe2000, 139296, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x7effbfbe2000
close(3)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 !\0\0\0\0\0\0"..., 832) = 832
newfstatat(3, "", {st_mode=S_IFREG|0644, st_size=22864, ...}, AT_EMPTY_PATH) = 0
mmap(NULL, 24816, PROT_READ, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x7effbfbc5000
mmap(0x7effbfbc7000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2000) = 0x7effbfbc7000
mmap(0x7effbfbc9000, 4096, PROT_READ, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0x7effbfbc9000
mmap(0x7effbfbca000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x4000) = 0x7effbfbca000
close(3)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\3\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0000y\2\0\0\0\0\0"..., 832) = 832
pread64(3, "\6\0\0\0\4\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0@\0\0\0\0\0\0\0"..., 784, 64) = 784
pread64(3, "\4\0\0\0\20\0\0\0\5\0\0\0GNU\0\2\200\0\300\^C

Another one is the matrix command, which renders scrolling Matrix code in your terminal.

┌──(john㉿DESKTOP-PF01IEE)-[~]
└─$ sudo apt install cmatrix

This is very nice to have running in a terminal window.

Another possibility.

watch -n 1 tail /var/log/messages

Watching the logs in a terminal window can be very informative indeed. This is good when working on development and you need to monitor the progress of a service.

Also this script.

https://securitronlinux.com/bejiitaswrath/glances-a-nice-new-networking-script-for-linux-that-runs-on-python/. This is a great system information script to have running on your server. Or even leaving a terminal running with htop. That can also be a godsend.

Yet another command to try out in your terminal.

xxd < /dev/urandom | while read -r IN; do echo "$IN"; sleep ${1:-0.5} ; done

This is an example of the output you will get from this command.

┏━(Message from Kali developers)
┃
┃ This is a minimal installation of Kali Linux, you likely
┃ want to install supplementary tools. Learn how:
┃ ⇒ https://www.kali.org/docs/troubleshooting/common-minimum-setup/
┃
┗━(Run: “touch ~/.hushlogin” to hide this message)
┌──(john㉿DESKTOP-PF01IEE)-[~]
└─$ xxd < /dev/urandom | while read -r IN; do echo "$IN"; sleep ${1:-0.5} ; done
00000000: 393d daa7 084e 1916 e004 8856 485e ee61  9=...N.....VH^.a
00000010: b120 d10a e815 cff8 1d3b da83 5d5f 3744  . .......;..]_7D
00000020: d5ac 8e1e 9155 1f54 9b8e 1446 6edb 3bfe  .....U.T...Fn.;.
00000030: b76f 1d7a fb4d 78aa 2f3f 1cbe 50b0 608c  .o.z.Mx./?..P.`.
00000040: d3c5 4372 5f86 6ca5 a218 4ef9 9155 6d29  ..Cr_.l...N..Um)
00000050: dfa1 6f81 1810 3b60 1749 a22f 7f50 6061  ..o...;`.I./.P`a
00000060: cf2b 65cb a2b2 0c45 f210 1688 657f 11f5  .+e....E....e...
00000070: c850 c2d0 941b 6202 51fd 8f27 39a8 6192  .P....b.Q..'9.a.
00000080: 1f52 fdaf 4db9 b890 7ee2 ecbe c3bc 8e60  .R..M...~......`
00000090: 1590 ba52 bdb5 2927 c9d5 c42e 2527 f842  ...R..)'....%'.B
000000a0: 296a 94aa 1d69 9670 213e f39a c70b 07f4  )j...i.p!>......
000000b0: 1ea2 9ead d075 f0ef c9f6 5ff0 a5a0 9c7b  .....u...._....{
000000c0: 843d e450 be40 07b1 02b1 ceac 104b 618b  [email protected].
000000d0: 226b 7da2 0ed4 006e e7a3 b814 ea89 f84f  "k}....n.......O
000000e0: 1d54 7a07 bb59 415b 4143 2947 cca7 9440  .Tz..YA[AC)G...@
000000f0: 6d94 8160 bc5c 2720 2043 964b 19be 44c6  m..`.\'  C.K..D.
00000100: a749 faab 2f7b 6c7c 1a57 14e2 fe81 9226  .I../{l|.W.....&
00000110: d007 091c 188f 30f4 2923 b160 ebb8 b081  ......0.)#.`....
00000120: bb2f 63b5 6af9 a835 60c7 f9fd c9fe 6341  ./c.j..5`.....cA
00000130: c9c0 57b8 f27a 3bd1 3820 5617 799e 67e8  ..W..z;.8 V.y.g.
00000140: e307 95a1 d153 255f dcc2 1493 e50f bcc1  .....S%_........
00000150: deef 91c4 f7c8 22d9 91e1 b938 4236 41cb  ......"....8B6A.
00000160: 4cc3 a3c9 ebba 0531 3406 2bd3 858b dbbc  L......14.+.....
00000170: 4feb f0ec f2f1 30e8 ef29 73f0 b0fe 1342  O.....0..)s....B
00000180: 2b47 df32 5c40 8ad5 50b1 ebce 7aec 5b6f  +G.2\@..P...z.[o
00000190: 3764 bbf6 13ea 9336 289d e44c 6799 9db0  7d.....6(..Lg...
000001a0: 6a1b 1866 5ca9 f4d7 c316 ab4f b85b d8ef  j..f\......O.[..
000001b0: f111 3efc 1cef b66c 86fd 8f76 8a01 5701  ..>....l...v..W.
000001c0: df19 f066 8ce1 1197 51e7 cbcb 316a 5ebd  ...f....Q...1j^.
000001d0: 5d41 8a61 9bfd ef1f 1b0f f69c a8da f07f  ]A.a............
000001e0: 346f ce39 7d3d dfb4 9cf6 746e 7da3 bf1d  4o.9}=....tn}...

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.