sxiii

Get a certificate details from Intuit.ru - bash batch script

Dec 11th, 2013
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.35 KB | None | 0 0
  1. # Loads a INTUIT.ru certificate by given ID number (warning: russian windows-1251 encoding!)
  2. # This will load a of intuit certificate receiver's name
  3. curl http://old.intuit.ru/diplom/ektpAz0vnA0q/P00000029 | grep "fio" | awk -F">" '{ print $4 }' | awk -F"<" '{ print $1 }'
  4.  
  5. # This will load full certificate details
  6. curl http://old.intuit.ru/diplom/ektpAz0vnA0q/P00266505 |  html2text
  7.  
  8. # NOTE! Start of the certificate numbers: P00000029; end number - P00266505
  9.  
  10. # The following is BASH script which loads all certificates into certs/$certnum
  11. # according files. After this you can just use "cat ./* | grep "Name"" to find person
  12.  
  13. #!/bin/bash
  14. mkdir certs
  15.  
  16. for certnum in $(seq -f "%06g" 29 266505)
  17. do
  18. echo $certnum
  19. curl "http://old.intuit.ru/diplom/ektpAz0vnA0q/P00$certnum" > certs/$certnum
  20. done
  21.  
  22. # Certificates starts with http://old.intuit.ru/diplom/ektpAz0vnA0q/P00000029
  23. # Certificates end with http://old.intuit.ru/diplom/ektpAz0vnA0q/P00266505
  24. # Other links
  25. # http://old.intuit.ru/diplom/Xb3udMkfHJ4h/A00046531/
  26. # http://old.intuit.ru/diploma/Xb3udMkfHJ4h/P00046531/
  27. # http://old.intuit.ru/diploma/aPvmPQL85ojB/P00134757/
  28. # http://old.intuit.ru/diploma/Rr5xJxjm57J2/P00031652
  29. # http://old.intuit.ru/diploma/Rr5xJxjm57J2/P00031781
  30. # Important: old.intuit.ru; diplom -> certificate; diploma -> dipoma;
  31. # A - English diploma, P - Russian diploma
Advertisement
Add Comment
Please, Sign In to add comment