Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- NC='\033[0m'
- RED='\e[38;5;196m'
- GRN='\e[38;5;82m'
- tot(){
- local get=$(curl -s "https://jet.co.id/index/router/index.html" \
- -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0" \
- -H "Accept: application/json, text/javascript, */*; q=0.01" -H "Accept-Language: en-US,en;q=0.5" \
- --compressed -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" \
- -H "X-SimplyPost-Id: a3017b834b8a01635eef705de28c8e4b" \
- -H "X-SimplyPost-Signature: 45590e8b6a9f8bfd9ac87b7807285a0b" \
- -H "X-Requested-With: XMLHttpRequest" -H "Origin: https://jet.co.id" \
- -H "Connection: keep-alive" -H "Referer: https://jet.co.id/track?bills=JO0055224872" \
- -H "Cookie: think_var=en-us; _ga=GA1.3.811620944.1616303056; _gid=GA1.3.1206707288.1617791616; itime=JTEXPRESS; PHPSESSID=5k0jris3aajut0al4sv6b4csg0; _gat_gtag_UA_158512495_1=1" \
- -H "TE: Trailers" --data-raw "method=app.findTrack&data"%"5Bbillcode"%"5D=JT6308529$(cat /dev/urandom | tr -dc 0-9 | fold -w 3 | head -1)&data"%"5Blang"%"5D=en&data"%"5Bsource"%"5D=3&pId=a3017b834b8a01635eef705de28c8e4b&pst=45590e8b6a9f8bfd9ac87b7807285a0b")
- local time=$(echo -e "${get}" | grep -Po '(?<=scantime)(\\+\":\\+\").*?(?=\\)' | tr -d '\\\":"')
- local type=$(echo -e "${get}" | grep -Po '(?<=scantype)(\\+\":\\+\").*?(?=\\)' | tr -d '\\\":"')
- local code=$(echo -e "${get}" | grep -Po '(?<=billcode)(\\+\":\\+\").*?(?=\\)' | tr -d '\\\":"')
- local signer=$(echo -e "${get}" | grep -Po '(?<=signer)(\\+\":\\+\").*?(?=\\)' | tr -d '\\\":"')
- local city=$(echo -e "${get}" | grep -Po '(?<=city)(\\+\":\\+\").*?(?=\\)' | tr -d '\\\":"')
- local return=$(paste <(echo "${code}") <(echo "${type}") <(echo "${signer}") <(echo "${city}") <(echo "${time}") --delimiters='|')
- local retfail=$(paste <(echo "${code}"))
- if [[ "$get" =~ "scantype" ]]
- then
- echo -e "${GRN}${return}${NC}"
- echo -e "${code}" >> jet.txt
- else
- echo -e "${RED}${retfail}${NC}"
- # echo -e "${return}" >> jet.txt
- fi
- }
- for (( c=1; c<=999; c++ ))
- do
- tot
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement