deHakkelaar

Authored Comments

For the TAB example, you can place all the sed operations in one argument instead of two with the compound semicolon ";" separating them eg:
sed -e 's/^/>/; s/\t/ /g' Makefile

Another useful one is adding a REGEX first, similar like grepping, before applying the operators on a line eg:
sed '/REGEX/ s/^/>/; s/\t/ /g' Makefile

Below might come in handy if install nmap:

$ sudo nmap --script broadcast-dhcp-discover
Starting Nmap 7.80 ( https://nmap.org ) at 2022-07-22 10:44 CEST
Pre-scan script results:
| broadcast-dhcp-discover:
| Response 1 of 1:
| IP Offered: 10.0.0.252
| DHCP Message Type: DHCPOFFER
| Server Identifier: 10.0.0.2
| IP Address Lease Time: 2m00s
| Renewal Time Value: 1m00s
| Rebinding Time Value: 1m45s
| Subnet Mask: 255.255.255.0
| Broadcast Address: 10.0.0.255
| Domain Name: home.dehakkelaar.nl
| NTP Servers: 10.0.0.3
| Domain Name Server: 10.0.0.2, 10.0.0.4
|_ Router: 10.0.0.1

And one can learn allot from a public IP ;)

$ dig +short -x 45.20.209.41
45-20-209-41.lightspeed.rlghnc.sbcglobal.net.

$ sudo nmap -sS 45.20.209.41
Starting Nmap 7.80 ( https://nmap.org ) at 2022-07-22 09:44 CEST
Nmap scan report for 45-20-209-41.lightspeed.rlghnc.sbcglobal.net (45.20.209.41)
Host is up (0.11s latency).
Not shown: 994 filtered ports
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
80/tcp open http
143/tcp open imap
443/tcp closed https
993/tcp open imaps

$ echo | nc -v 45.20.209.41 22
Connection to 45.20.209.41 22 port [tcp/ssh] succeeded!
SSH-2.0-OpenSSH_8.8

$ curl -I 45.20.209.41
HTTP/1.1 200 OK
Date: Fri, 22 Jul 2022 07:45:28 GMT
Server: Apache/2.4.54 (Fedora Linux) OpenSSL/3.0.5
X-Powered-By: PHP/8.1.8
Link: ; rel="https://api.w.org/"
Content-Type: text/html; charset=UTF-8

$ nc 45.20.209.41 25 <<< 'helo me.'
554 yorktown.both.org ESMTP not accepting messages
250 yorktown.both.org Hello XXXX [XXXX], pleased to meet you

$ whois 45.20.209.41
[..]
Organization: AT&T Corp. (AC-3280)

$ whois both.org
[..]
Registrar: Google LLC