Advertisement
Guest User

Untitled

a guest
Jan 28th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. curl -k https://url.retail.publishedprices.co.il/login > 01.txt
  2.  
  3. sfk xed 01.txt "_[start][0.10000 bytes]csrftoken__" +xed "_/>**__" +xed "_q id=qcsrftokenq value=q__" +xed "_q __" -tofile 02.txt
  4.  
  5. set /p csrf=<02.txt
  6.  
  7. curl -k -d "username=retalix&password=12345&csrftoken=%csrf%" https://url.retail.publishedprices.co.il/file/d/RamiLevi/ > RL.txt
  8.  
  9. $path = "c:test"
  10. $filename = "website.txt"
  11.  
  12. $url = "https://url.retail.publishedprices.co.il/login"
  13. $url2 = "https://url.retail.publishedprices.co.il/file/d/RamiLevi/"
  14.  
  15. $ie = New-Object -com InternetExplorer.Application
  16.  
  17. $ie.visible = $true
  18. $ie.silent = $false
  19.  
  20. $ie.navigate("$url")
  21.  
  22. while($ie.ReadyState -ne 4) {start-sleep -m 100}
  23. if ($ie.document.url -Match "invalidcert"){
  24. $sslbypass=$ie.Document.getElementsByTagName("a") | where-object {$_.id -eq "overridelink"}
  25. $sslbypass.click()
  26. start-sleep -s 5
  27. };
  28.  
  29. $ie.Document.IHTMLDocument3_getElementById("username").click()
  30. $ie.Document.IHTMLDocument3_getElementById("username").value ='retalix'
  31. $ie.Document.IHTMLDocument3_getElementById("password").click()
  32. $ie.Document.IHTMLDocument3_getElementById("password").value ='12345'
  33. $ie.Document.IHTMLDocument3_getElementById("submit").click()
  34.  
  35. start-sleep 5
  36.  
  37. $ie.navigate($url2)
  38.  
  39. start-sleep 10
  40.  
  41. $ie.Document.body.outerHTML | Out-File -FilePath $path$filename
  42.  
  43. $ie.visible = $true
  44.  
  45. $ie.visible = $false
  46.  
  47. $ie.quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement