Shakiba Moshiri
  • Shakiba Moshiri (شکیبا مشیری)
  • opt
    • high traffic site optimization
      • infrastructure check
      • infrastructure test
  • tools
    • Cryptsetup
      • Container encryption using cryptsetup
    • curly
      • ftp
      • ssl
      • http
      • dns
      • ip
      • email
    • SSH
      • ssh password-less login
        • Untitled
    • volumes and FS
      • installing Gluster fs on Ubuntu 18.04 server
      • Accessing Gluster FS from the client machine
  • CDN
    • How does a CDN work
  • Server Panel
  • DirectAdmin
    • DirectAdmin through a reverse proxy
  • Web Server
    • Nginx
      • Live Steaming with Nginx and FFMPEG
  • Security
  • Container
    • Docker Networking 101
      • why docker networking is important?
      • type of networking in docker
    • Docker
      • How to run gitlab-runner with docker
      • using vim inside any container without installing it
      • Cannot connect to the Docker daemon at unix:///var/run/docker.sock
      • moving docker images around using ssh and pipe
      • How can I make docker-compose pull images using a socks5 proxy?
  • Stack Overflow
  • Github
  • vmware
    • tools
      • how to install vmware CLI govc on Linux
  • Windows
    • How to Erase a Recovery Partition in Windows
Powered by GitBook
On this page
  • Description
  • install
  • or
  • Bash Tab Completion
  • install
  • Use it without install it

Was this helpful?

  1. tools

curly

speak curl for faster troubleshooting

Description

curly is a bash CLI with three things in mind

  1. modern user interface and usage

  2. scalable base code

  3. simplifying workflow for troubleshooting or testing

  4. Bash Tab Completion

install

# first
git clone https://github.com/k-five/curly.git

# second
sudo mv curly/curly.sh /usr/local/bin/curly

# third, check dependencies
curly --command check

or

# first
curl -sL https://raw.githubusercontent.com/k-five/curly/master/curly.sh | sudo tee /usr/local/bin/curly

# second
curly --command check

Bash Tab Completion

curly has script for tab-completion and you can either install it or loading while you are working with it.

install

# first
git clone https://github.com/k-five/curly.git

# second
sudo mv curly/_comp_curly.sh /etc/bash_completion.d/

or load it to memory

source curly/_comp_curly.sh

Use it without install it

See the --help

bash <(curl -sL curl -sL https://raw.githubusercontent.com/k-five/curly/master/curly.sh) --help

sampel output

 /dev/fd/63 help ...

definition:
 doing things in a 'curl' way ...

arguments:
 -F | --ftp             FTP actions ...
    |                   check: checking FTP connection
    |                   mount: mount over FTP
    |                   umount: umount: umount FTP mount point
    |                   upload: upload: upload to a FTP account
    |                   download: download: download from a FTP account
    | --fc              ftp configuration file
    | --fmp             ftp mount point (local machine)
    | --fl              ftp local file for upload
    | --fr              ftp remote path

 -S | --ssl             SSL actions ...
    |                   valid: checking if SSL of a domain is valid
    |                   date: check start and end date of the certificate
    |                   cert: show the certificate
    |                   name: name of domains the certificate issued for
    |                   issue_dv: issue Domain Validation cert
    |                   issue_wc: issue Wild Card cert

 -H | --http            HTTP actions ....
    |                   response: print response header of server
    |                   redirect: check if redirect id done or not
    |                   status: print status for the GET request
    |                   ttfb: print statistics about Time to First Byte
    |                   gzip: check if gzip is enabled or not
                        
 -D | --dns             DNS actions ...
    |                   root: check on root DNS servers
    |                   public: check on public DNS servers e.g 1.1.1.1
    |                   trace: trace from a public DNS server to main server
    | --dc              dns servers to use, default is: 1.1.1.1
    |                   or a file containing some DNS servers ( IPs | names )

 -I | --ip              IP actions ...
    |                   info: any info based on shodan dB
    |                   port: quick check open ports
    |                   route: trace route
    | --ia              ip address e.g. : 1.1.1.1
    | --im              maximum number of hops
    | --ic              set the number of pings sent

 -E | --email           Email actions ...
    |                   send: send an email
    | --ec              email configuration file for sending an email
    | --eb              email body (= contents) of the email that is send

 -C | --command         Command actions ...
    |                   check: check prerequisite for run curly
    |                   install: install all prerequisite

 -h | --help            print this help
 -d | --domain          name of a domain, e.g. example.com

Copyright (C) 2020 Shakiba Moshiri
https://github.com/k-five/curly 

Check the dependencies

bash <(curl -sL curl -sL https://raw.githubusercontent.com/k-five/curly/master/curly.sh) --command check

sample out

curl ................ [ OK ]
curlftpfs ........... [ OK ]
perl ................ [ OK ]
nmap ................ [ OK ]
openssl ............. [ OK ]
certbot ............. [ OK ]
dig ................. [ OK ]
grep ................ [ OK ]
sed ................. [ OK ]
shodan .............. [ OK ]
mtr ................. [ OK ]
echo ................ [ OK ]

option: command
action: check
status: OK

Run it

bash <(curl -sL curl -sL https://raw.githubusercontent.com/k-five/curly/master/curly.sh) --http ttfb -d shakiba.net
url_effective       http://shakiba.net/
time_namelookupe    0.510002 | DNS lookup
time_connect        0.651661 | TCP connection
time_appconnect     0.000000 | App connection
time_redirect       0.000000 | Redirection time
time_starttransfer  0.825659 | TTFB
time_total          0.825722

option: http
action: ttfb
status: OK

PreviousContainer encryption using cryptsetupNextftp

Last updated 4 years ago

Was this helpful?