Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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