The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,343 other followers

Archive for the ‘cURL’ Category

56 Linux Networking commands and scripts

Posted by jpluimers on 2021/01/25

Back in 2019, there were 56 commands and scripts covered. I wonder how many there are now.

An ongoing list of Linux Networking Commands and Scripts. These commands and scripts can be used to configure or troubleshoot your Linux network.

Source: [WayBack55 Linux Networking commands and scripts

List back then (which goes beyond just built-in commands: many commands from optional packages are here as well):

  1. arpwatch – Ethernet Activity Monitor.
  2. bmon – bandwidth monitor and rate estimator.
  3. bwm-ng – live network bandwidth monitor.
  4. curl – transferring data with URLs. (or try httpie)
  5. darkstat – captures network traffic, usage statistics.
  6. dhclient – Dynamic Host Configuration Protocol Client
  7. dig – query DNS servers for information.
  8. dstat – replacement for vmstat, iostat, mpstat, netstat and ifstat.
  9. ethtool – utility for controlling network drivers and hardware.
  10. gated – gateway routing daemon.
  11. host – DNS lookup utility.
  12. hping – TCP/IP packet assembler/analyzer.
  13. ibmonitor – shows bandwidth and total data transferred.
  14. ifstat –  report network interfaces bandwidth.
  15. iftop – display bandwidth usage.
  16. ip (PDF file) – a command with more features that ifconfig (net-tools).
  17. iperf3 – network bandwidth measurement tool. (above screenshot Stacklinux VPS)
  18. iproute2 – collection of utilities for controlling TCP/IP.
  19. iptables – take control of network traffic.
  20. IPTraf – An IP Network Monitor.
  21. iputils – set of small useful utilities for Linux networking.
  22. jwhois (whois) – client for the whois service.
  23. “lsof -i” – reveal information about your network sockets.
  24. mtr – network diagnostic tool.
  25. net-tools – utilities include: arp, hostname, ifconfig, netstat, rarp, route, plipconfig, slattach, mii-tool, iptunnel and ipmaddr.
  26. ncat – improved re-implementation of the venerable netcat.
  27. netcat – networking utility for reading/writing network connections.
  28. nethogs – a small ‘net top’ tool.
  29. Netperf – Network bandwidth Testing.
  30. netsniff-ng – Swiss army knife for daily Linux network plumbing.
  31. netstat – Print network connections, routing tables, statistics, etc.
  32. netwatch – monitoring Network Connections.
  33. ngrep – grep applied to the network layer.
  34. nload – display network usage.
  35. nmap – network discovery and security auditing.
  36. nslookup – query Internet name servers interactively.
  37. ping – send icmp echo_request to network hosts.
  38. route – show / manipulate the IP routing table.
  39. slurm – network load monitor.
  40. snort – Network Intrusion Detection and Prevention System.
  41. smokeping –  keeps track of your network latency.
  42. socat – establishes two bidirectional byte streams and transfers data between them.
  43. speedometer – Measure and display the rate of data across a network.
  44. speedtest-cli – test internet bandwidth using speedtest.net
  45. ss – utility to investigate sockets.
  46. ssh –  secure system administration and file transfers over insecure networks.
  47. tcpdump – command-line packet analyzer.
  48. tcptrack – Displays information about tcp connections on a network interface.
  49. telnet – user interface to the TELNET protocol.
  50. tracepath – very similar function to traceroute.
  51. traceroute – print the route packets trace to network host.
  52. vnStat – network traffic monitor.
  53. wget –  retrieving files using HTTP, HTTPS, FTP and FTPS.
  54. Wireless Tools for Linux – includes iwconfig, iwlist, iwspy, iwpriv and ifrename.
  55. Wireshark – network protocol analyzer.

Via:

–jeroen

Posted in *nix, *nix-tools, cURL, dig, nmap, Power User, ssh/sshd, tcpdump, Wireshark | Leave a Comment »

curl/wget: use content-disposition for the file names

Posted by jpluimers on 2020/04/27

For me, on Windows, curl works better than wget, but on Linux/Mac OS X, curl tends to work better. Some people find wget easier for downloading multiple URLs at the same time. So here the parameter switches for both so they download to the file specified by the Content-Disposition http header:

  • curl --remote-name --remote-header-name
  • wget --content-disposition

My experience is that wget is better at this, especially when redirects are involved (by adding a [WayBack] --location parameter to  thecurl command line).

So for instance the first fails, but the second succeeds determining the download to be VSCodeUserSetup-x64-1.27.2.exe (so curl keeps the name stable):

curl.exe --location --remote-name --remote-time --remote-header-name https://vscode-update.azurewebsites.net/latest/win32-x64-user/stable

wget.exe --content-disposition https://vscode-update.azurewebsites.net/latest/win32-x64-user/stable

This takes into account the name after all followed redirects.

Via:

–jeroen

Posted in *nix, cURL, Power User, wget | Leave a Comment »

20 Cool Command Line Tricks for Windows and macOS

Posted by jpluimers on 2019/11/08

After all these years in the field, I still learned new tricks from [WayBack20 Cool Command Line Tricks for Windows and macOS which I have rephrased:

Windows

1) View installed drivers: [WayBack] driverquery

2) Watch Star Wars in ASCII: [WayBacktelnet towel.blinkenlights.nl

3) Save folder trees to disk: tree (I had totally forgotten about this, probably because it leaves out a lot of directories and files)

5) Show your Wi-Fi password [WayBacknetsh wlan show profile SSID key=clear (replace SSID with your network name; use nets wlan show profile to view the network names)

7) Check your laptop’s battery health: [WayBack] powercfg /batteryreport which will be in ” and hit Enter to generate the report, then %HOMEPATH%\battery-report.html

8) View your Windows license key: wmic path softwarelicensingservice get OA3xOriginalProductKey [WayBack]

Mac OS X / macOS / however it is called now

1) Change the default screenshot type: [WayBackdefaults write com.apple.screencapture type JPG (you can also use JP2 (for JPEG2000), PDF, PNG, TIFF and others)

2) Get your Mac to speak to you: use say

3) Add a message to the login screen: sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "your new text on the logon window" [WayBack]

4) Play Tetris and other classics: start emacs, then press Esc followed by X, type in tetris, pong, snake or solitaire (to exit emacs, press CtrlX followed by CtrlC). There are [WayBack] more emacs games.

5) Get a dictionary definition: run curl dict://dict.org/d:word (where word is what you are after) which uses the [WayBack] dict protocol

6) Keep macOS awake: [WayBack] caffeinate optionally followed by a -t## parameter where ## is the number of seconds to not sleep.

7) Show hidden files: defaults write com.apple.finder AppleShowAllFiles -bool TRUE; killall Finder or use this AppleShowAllFiles script which I had forgotten about writing in the first place.

10) Add Spaces to the Dock: defaults write com.apple.dock persistent-apps -array-add ‘{”tile-type”=”spacer-tile”;}’; killall Dock running the command as many times as you want spaces. To get rid of a space you’ve added, just drag them to the Trash.

–jeroen

via: [WayBack] 20 Cool Command Line Tricks for Windows and macOS http://flip.it/SvcQlu – Joe C. Hecht – Google+

Posted in *nix, *nix-tools, Apple, cURL, Power User | Leave a Comment »

Convert cURL command syntax to Python requests, Node.js code

Posted by jpluimers on 2019/07/26

Utility for converting curl commands to code

For my link archive: [WayBack] Convert cURL command syntax to Python requests, Node.js code

–jeroen

Posted in *nix, *nix-tools, cURL, Development, JavaScript/ECMAScript, Node.js, Power User, Python, Scripting, Software Development | Leave a Comment »

Transferring files from a Linux console: transfer.sh and anypaste.xyz

Posted by jpluimers on 2019/07/26

transfer.sh

anypaste.xyz

–jeroen

via: [WayBack] Interesting: Anypaste – Share And Upload Files To Compatible Hosting Sites Automatically… – DoorToDoorGeek “Stephen McLaughlin” – Google+

Posted in *nix, *nix-tools, bash, cURL, Power User | Leave a Comment »

 
%d bloggers like this: