Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. //ключ парсится так
  2. let key = $("*").html().match("(?<=key\'\ \:\ \').*?(?=\')")[0];
  3. console.log(key);
  4.  
  5.  
  6. // в боди подставь свои данные логина пароля
  7. recapchaSolve(url: string, key: string, proxy: Object = {}): Promise<any> {
  8. let headers ={
  9. "User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0",
  10. "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
  11. "Accept-Language": "en-US,en;q=0.5",
  12. "Accept-Encoding": "gzip, deflate",
  13. "Referer": "https://www.leon.ru/login",
  14. "Content-Type": "application/x-www-form-urlencoded"
  15. };
  16.  
  17. api.send(GET_CAPTCHA_VALUE, {type: 'recaptcha', url: url, key, proxy}).then((response) => {
  18. console.log(response);
  19. fetch(url, {
  20. method: "post",
  21. headers: headers,
  22. credentials: 'include',
  23. body: "do=login&doaction=1&trg=&favMatchId=null&cs=%2Flogin&qs=&sport=&sportTournament=&league=&oid=&brid=&toto_id=&odd=&sbm=&ang=&match=&oddstype=&outcome=&ssoLoginTicket=&login=adsasdasd%40gmail.com&password=desi123412&g-recaptcha-response="+ response +""
  24. })
  25. .then((resp) => console.log(resp))
  26. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement