Skip to main content

curl

 curl http://example.com
curl -L http://example.com #follow redirects like google.com > www.google.com
curl -o output_file.html http://example.com
curl -O http://example.com/file.txt #auto name , without name will error
curl -i http://example.com #include headers

example header      
HTTP/1.1 200 OK
Accept-Ranges: bytes
Age: 560592
Cache-Control: max-age=604800
Content-Type: text/html; charset=UTF-8
Date: Thu, 20 Jun 2024 06:26:01 GMT
Etag: "3147526947"
Expires: Thu, 27 Jun 2024 06:26:01 GMT
Last-Modified: Thu, 17 Oct 2019 07:18:26 GMT
Server: ECAcc (lac/55A0)
Vary: Accept-Encoding
X-Cache: HIT
Content-Length: 1256

curl http://example.com?param1=value1&param2=value2 #send get request with query parameter

curl -X POST -d "param1=value1&param2=value2" http://example.com #send post request

curl -X POST -H "Content-Type: application/json" -d '{"key1":"value1", "key2":"value2"}' http://example.com #json post

curl -H "Authorization: Bearer token" http://example.com # send request with custom header

curl -C - -O http://example.com/file.zip #resume broken downoad

curl --limit-rate 100K -O http://example.com/largefile.zip

curl -T file.txt ftp://example.com/remote/path/ #upload

curl -F "name=user" -F "[email protected]" http://example.com/upload #form data

curl -A "Mozilla/5.0" http://example.com #user agent set

curl -s http://example.com #silent mode

curl -b "name=value" http://example.com #include cookie in qequest

curl -c cookies.txt http://example.com #store cookies from response

curl -b cookies.txt http://example.com #use stored cookies.txt

curl --max-time 10 http://example.com

curl -O http://example.com/file1.txt -O http://example.com/file2.txt

curl -u username:password http://example.com

curl -X PUT -d "param1=value1" http://example.com/resource #put request

curl -X DELETE http://example.com/resource #delete request

curl -x http://proxy.example.com:8080 http://example.com #use proxy curl -x http://proxy.example.com:8080 -O http://example.com/file.zip

curl -I http://example.com #get response header

curl -w "@curl-format.txt" -o /dev/null -s http://example.com #get timing info

curl parrot.live
curl wttr.in
curl wttr.in/London
curl wttr.in?3

curl https://zenquotes.io/api/random
curl https://icanhazdadjoke.com/
curl ifconfig.me
curl ifconfig.co
 curl ip.sb
 curl ipinfo.io
 curl icanhazip.com
 curl ipv4.icanhazip.com
 curl 4.icanhazip.com
 curl ip.me

curl qrenco.de/this  

 printf "two\nlines" | curl -F-=\<- qrenco.de

curl  transfer.sh

curl ascii.live/forrest
curl ascii.live/nyan
curl 'dict.org/d:word'

 
curl https://omdbapi.com/?t=The+Matrix&apikey=your_api_key
curl http://api.open-notify.org/iss-now.json
curl https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY
curl https://api.coindesk.com/v1/bpi/currentprice/BTC.json
curl time.jsontest.com
https://uselessfacts.jsph.pl/api/v2/facts/random?language=en
curl https://api.chucknorris.io/jokes/random
curl rate.sx
curl rate.sx/btc
curl https://dog-api.kinduff.com/api/facts
curl https://api.kanye.rest
curl https://catfact.ninja/fact
curl http://numbersapi.com/random/trivia
curl https://baconipsum.com/api/?type=all-meat&paras=2
curl https://api.adviceslip.com/advice
curl https://opentdb.com/api.php?amount=1
curl https://v2.jokeapi.dev/joke/Any
curl https://fdo.rocketlaunch.live/json/launches/next/1
curl https://randomuser.me/api/
curl https://randomfox.ca/floof/
curl https://pokeapi.co/api/v2/pokemon/ditto
curl http://artscene.textfiles.com/vt100/fireworks.vt
curl https://dog.ceo/api/breeds/image/random
curl "http://api.openweathermap.org/data/2.5/weather?q=London&appid=YOUR_API_KEY"
curl https://api.adviceslip.com/advice
curl https://status.digitalocean.com/api/v2/status.json
curl cheat.sh
curl "https://www.random.org/integers/?num=1&min=1&max=100&col=1&base=10&format=plain&rnd=new"
curl givemeguid.com
curl 'https://api.hackertarget.com/subnetcalc/?q=192.168.1.0/24'
curl hkkr.in
curl getnews.tech/world+cup
curl https://tgftp.nws.noaa.gov/data/observations/metar/stations/KAAO.TX
curl ping.gl
curl https://status.plaintext.sh/t

https://github.com/chubin/awesome-console-services


Comments

Popular posts from this blog

xdm linux merge incomplete download parts

 some download stuck at 99.99% , merge them regardless got to ~/.xdm-app-data/Data/*.state cat dec.py import os import re # Define the pattern to extract the segment number pattern = re.compile(r'seg-(\d+)-v1-a1\.ts') # Get the current working directory current_directory = os.getcwd() # List to hold tuples of (segment_number, filename) files_with_segments = [] # Iterate through files in the current directory for filename in os.listdir(current_directory): match = pattern.search(filename) if match: # Extract the segment number as an integer segment_number = int(match.group(1)) # Add the tuple (segment_number, filename) to the list files_with_segments.append((segment_number, filename)) # Sort the list by the segment number (numerical sort) files_with_segments.sort(key=lambda x: x[0]) # Open the filelist.txt for writing with open('filelist.txt', 'w') as filelist: for _, filename in files_with_segments: file...

kde on debian

https://wiki.debian.org/KDE sudo apt install   xserver-xorg-input-libinput xserver-xorg-video-intel  sudo apt install plasma-desktop plasma-workspace-wayland  sddm  issue  file:///usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/ui/Kickoff.qml:157:34: Type FullRepresentat ion unavailable file:///usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/ui/FullRepresentation.qml:80:22: Type Norma lPage unavailable file:///usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/ui/NormalPage.qml:43:13: Type Footer unavai lable file:///usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/ui/Footer.qml:155:5: Type LeaveButtons unav ailable file:///usr/share/plasma/plasmoids/org.kde.plasma.kickoff/contents/ui/LeaveButtons.qml:14:1: module "org.kde.k itemmodels" is not installed # upower , it is installed by powerdevil though sudo apt install kde-config-gtk-style  kde-config-gtk-style-preview   breeze-gtk-theme  sudo apt i...

rsa encryption

 choose two large  prime number p (prime 1) and q (prime 2)   n = p x q , where n is called the modulus for encryption and decryption   φ = ( p - 1) x ( q -1) is called Euler's totient function for n= pq For a given positive integer n, Euler's totient function ϕ(n) is defined as the number of positive integers less than or equal to n that are coprime (i.e., share no common factors) with n. ϕ( n ) = n ∏ p ∣ n ( 1 − 1 p )     \phi(n) = n \prod_{p \mid n} \left(1 - \frac{1}{p}\right)   p ∣ n means that p p divides n , and is a prime factor greater than 1  i  n    example , n=2*3=6 with factors f=1 , 2 , 3 , 4 , 5,6 factors Two numbers are coprime if their greatest common divisor (GCD) is 1 here find gcd(f,n)=1  only 1 and 5 are coprime with 6  φ =1*2 =2   choose e less  than φ , such that  e is co prime with φ , ie  e has no common factor with φ except 1 mathematically : gcd ( e , φ ...