Linux Notes

1 minute read

MD5 Checksum

An MD5 checksum is a very reliable way to verify data integrity. The MD5 algorithm takes a file of arbitrary length and produces a 128-bit fingerprint of characters and numbers from that file. It is proposed that it is computationally infeasible to produce two messages having the same output of numbers and characters.

It works with file contents and not the file name. Other checksum algorithm methods used to verify data integrity are

  • sha1sum
  • sha256sum
  root@kali:~# echo "Goodluck" > file1.txt
  root@kali:~# cp file1.txt file2.md

Checksum of the two files note the file names and extention

  root@kali:~# md5sum file1.txt file2.md 
  f59fed97418ccd98d83a460ea76c7a2f  file1.txt
  f59fed97418ccd98d83a460ea76c7a2f  file2.md

Alternatively:

  root@kali:~# md5sum file1.txt file2.md | md5sum --check
  file1.txt: OK
  file2.md: OK

For Sha256:

  root@kali:~# sha256sum file1.txt file2.md 
  55cfc58bdae0da53eb18faf11b394ffb7144b0ca049a489f2b30762323e7b47b  file1.txt
  55cfc58bdae0da53eb18faf11b394ffb7144b0ca049a489f2b30762323e7b47b  file2.md

TCPDUMP

TCPDump allows you to filter network traffic for useful information

    - See the list of interfaces on which tcpdump can listen:
      tcpdump -D
    - Listen on interface eth0:
      tcpdump -i eth0
    - Limit the capture to 100 packets:
      tcpdump -c 100
    - 

Terminal | Shell | TTY | Console

A terminal is a physical device with a keyboard and screen connected to a computer running various OS types. A tty (teletype) is the Unix device name for a physical or virtual terminal connection. A shell is the Unix command interpreter. A console is a generic term for a primary i/o device or interface. In unix terms the console is where the boot/startup messages are sent to. After bootup the console effectively becomes a terminal.

//===========================\\
||          Terminal         ||
||             |-----------| ||
|| Keyboard--->|   Input   |-++->|---|   |-------|
||             |-----------| ||  |tty|<=>| shell |       
||         |---------|<------++--|---|   |-------|
|| Print<--|  Output |       ||
||         |---------|       ||
||                           ||
\\===========================//

Posted:

Leave a comment