Skip to content

Instantly share code, notes, and snippets.

@vsec7
Created April 7, 2021 04:39
Show Gist options
  • Save vsec7/a945bdf16b887c2569d53003252d2c80 to your computer and use it in GitHub Desktop.
Save vsec7/a945bdf16b887c2569d53003252d2c80 to your computer and use it in GitHub Desktop.
Generate random awb DHL (delivered only)
echo;while :;do d=10;a=$(date +%s);b=$((a*RANDOM));while [ ${#b} -lt 10 ]; do b="${b}$RANDOM";done;g=$(curl -s "https://mydhl.express.dhl/shipmentTracking?AWB=$(echo "${b:0:d}")&countryCode=id&languageCode=en" | jq .results[0]); if [ $(echo $g | jq -r .delivery.status) == "delivered" ]; then printf "%s | %s| ori: %s | dest: %s\n" "$(echo $g | jq -r .id)" "$(echo $g | jq -r .checkpoints[0].date)" "$(echo $g | jq -r .origin.value)" "$(echo $g | jq -r .destination.value)" | tee -a dhlawb.txt;fi;done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment