jaenudinmaulana69

JET

Apr 16th, 2021 (edited)
976
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.99 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. NC='\033[0m'
  4. RED='\e[38;5;196m'
  5. GRN='\e[38;5;82m'
  6.  
  7. tot(){
  8. local get=$(curl -s "https://jet.co.id/index/router/index.html" \
  9. -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:87.0) Gecko/20100101 Firefox/87.0" \
  10. -H "Accept: application/json, text/javascript, */*; q=0.01" -H "Accept-Language: en-US,en;q=0.5" \
  11. --compressed -H "Content-Type: application/x-www-form-urlencoded; charset=UTF-8" \
  12. -H "X-SimplyPost-Id: a3017b834b8a01635eef705de28c8e4b" \
  13. -H "X-SimplyPost-Signature: 45590e8b6a9f8bfd9ac87b7807285a0b" \
  14. -H "X-Requested-With: XMLHttpRequest" -H "Origin: https://jet.co.id" \
  15. -H "Connection: keep-alive" -H "Referer: https://jet.co.id/track?bills=JO0055224872" \
  16. -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" \
  17. -H "TE: Trailers" --data-raw "method=app.findTrack&data"%"5Bbillcode"%"5D=JT630$(cat /dev/urandom | tr -dc 0-9 | fold -w 7 | head -1)&data"%"5Blang"%"5D=en&data"%"5Bsource"%"5D=3&pId=a3017b834b8a01635eef705de28c8e4b&pst=45590e8b6a9f8bfd9ac87b7807285a0b")
  18.  
  19. local time=$(echo -e "${get}" | grep -Po '(?<=scantime)(\\+\":\\+\").*?(?=\\)' | tr -d '\\\":"')
  20. local type=$(echo -e "${get}" | grep -Po '(?<=scantype)(\\+\":\\+\").*?(?=\\)' | tr -d '\\\":"')
  21. local code=$(echo -e "${get}" | grep -Po '(?<=billcode)(\\+\":\\+\").*?(?=\\)' | tr -d '\\\":"')
  22. local signer=$(echo -e "${get}" | grep -Po '(?<=signer)(\\+\":\\+\").*?(?=\\)' | tr -d '\\\":"')
  23. local city=$(echo -e "${get}" | grep -Po '(?<=city)(\\+\":\\+\").*?(?=\\)' | tr -d '\\\":"')
  24. local return=$(paste <(echo "${code}") <(echo "${type}") <(echo "${signer}") <(echo "${city}") <(echo "${time}") --delimiters='|')
  25. local retfail=$(paste <(echo "${code}"))
  26. if [[ "$get" =~ "scantype" ]]
  27. then
  28.     echo -e "${GRN}${return}${NC}"
  29.     echo -e "${code}" >> jet.txt
  30. else
  31.     echo -e "${RED}${retfail}${NC}"
  32. #   echo -e "${return}" >> jet.txt
  33. fi
  34. }
  35.  
  36. for (( c=1; c<=100; c++ ))
  37. do  
  38.    tot
  39. done
  40.  
Add Comment
Please, Sign In to add comment