Category: computer networks

Show elapsed (round-trip) time of packets.

$fping -e is alive (301 ms) $fping -e is alive (302 ms) $fping -e is alive (62.2 ms) $fping is alive $ping PING ( 56(84) bytes of data. 64 bytes from ( icmp_seq=1 ttl=49 time=302 ms 64 bytes from ( icmp_seq=2 ttl=49 time=301

Installing dig command on Debian

$sudo apt-get install -y dnsutils Reading package lists… Done Building dependency tree Reading state information… Done The following packages were automatically installed and are no longer required: libcaribou-gtk-module libcaribou-gtk3-module libebur128-1 libevent-2.0-5 libgdict-1.0-10 libgdict-common libgmime-2.6-0 libgnome-autoar-common libgom-1.0-common libjavascriptcoregtk-3.0-0 libnotmuch4 libpcre16-3 libperl5.24 libraw15 libsexy2 libwebkitgtk-3.0-0 libwebpmux2 python-olefile rename tcpd Use ‘sudo apt autoremove’ to remove them. The

finding the current state of a network cable

$sudo cat /sys/class/net/eth0/speed 100 $sudo cat /sys/class/net/eth0/ca carrier carrier_changes $sudo cat /sys/class/net/eth0/carrier 1 $sudo cat /sys/class/net/eth0/carrier_changes 2 $sudo cat /sys/class/net/eth0/operstate up $sudo ethtool eth0 Settings for eth0: Supported ports: [ TP MII ] Supported link modes: 10baseT/Half 10baseT/Full 100baseT/Half 100baseT/Full 1000baseT/Half 1000baseT/Full Supported pause frame use: No Supports auto-negotiation: Yes Advertised link modes: 10baseT/Half 10baseT/Full

httping with sending of username and password and flood ping

$httping -U No URL/host to ping given $httping -U No URL/host to ping given $httping PING (/): connected to (224 bytes), seq=0 time=455.10 ms connected to (224 bytes), seq=1 time=458.34 ms connected to (224 bytes), seq=2 time=447.45 ms ^CGot signal 2 — ping statistics — 4 connects,

A typical hack with strace command which traces a ping command

ABOUT strace strace is a diagnostic, debugging and instructional userspace utility for Linux. It is used to monitor and tamper with interactions between processes and the Linux kernel, which include system calls, signal deliveries, and changes of process state. The operation of strace is made possible by the kernel feature known as ptrace. TYPICAL strace

sample session with “ss” command to show details on network

$ss -t State Recv-Q Send-Q Local Address:Port Peer Address:Port ESTAB 0 0 ESTAB 0 0 ESTAB 0 0 ESTAB 0 0 ESTAB 0 0 ESTAB 0 0 ESTAB 0 0 ESTAB 0 0 ESTAB 0 0 ESTAB

Capturing TCP Flags with tcpdump. Capture all ACK packets

ABOUT TCP FLAGS They are control bits that indicate different connection states or information about how a packet should be handled. FLAGS CWR – Congestion Window Reduced (CWR) flag is set by the sending host to indicate that it received a TCP segment with the ECE flag set (added to header by RFC 3168). ECE

Hacking with debian netselect-apt command

$sudo netselect-apt -t 2 -c IN Using distribution stable. Retrieving the list of mirrors from… –2014-08-31 23:00:07– Resolving (…, Connecting to (||:80… connected. HTTP request sent, awaiting response… 200 OK Length: 350858 (343K) Saving to: ‘/tmp/netselect-apt.Pjgwxz’ 100%[====================================================================================>] 3,50,858 110KB/s in 3.1s 2014-08-31 23:00:11 (110 KB/s) – ‘/tmp/netselect-apt.Pjgwxz’ saved [350858/350858]

Tinkering with the fping command

$fping is alive $fping ICMP Host Unreachable from for ICMP Echo sent to ICMP Host Unreachable from for ICMP Echo sent to ICMP Host Unreachable from for ICMP Echo sent to ICMP Host Unreachable from for ICMP Echo sent to is unreachable $fping