Guest User

Untitled

a guest
Jul 23rd, 2018
1,255
0
Never
10
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.43 KB | None | 0 0
  1. # -*- coding: utf-8 -*-
  2.  
  3. import os
  4.  
  5. import google.oauth2.credentials
  6.  
  7. import google_auth_oauthlib.flow
  8. from googleapiclient.discovery import build
  9. from googleapiclient.errors import HttpError
  10. from google_auth_oauthlib.flow import InstalledAppFlow
  11.  
  12. # The CLIENT_SECRETS_FILE variable specifies the name of a file that contains
  13. # the OAuth 2.0 information for this application, including its client_id and
  14. # client_secret.
  15. CLIENT_SECRETS_FILE = "client_secret.json"
  16.  
  17. # This OAuth 2.0 access scope allows for full read/write access to the
  18. # authenticated user's account and requires requests to use an SSL connection.
  19. SCOPES = ['https://www.googleapis.com/auth/youtube.force-ssl']
  20. API_SERVICE_NAME = 'youtube'
  21. API_VERSION = 'v3'
  22.  
  23. def get_authenticated_service():
  24.   flow = InstalledAppFlow.from_client_secrets_file(CLIENT_SECRETS_FILE, SCOPES)
  25.   credentials = flow.run_console()
  26.   return build(API_SERVICE_NAME, API_VERSION, credentials = credentials)
  27.  
  28. def print_response(response):
  29.   print(response)
  30.  
  31. # Build a resource based on a list of properties given as key-value pairs.
  32. # Leave properties with empty values out of the inserted resource.
  33. def build_resource(properties):
  34.   resource = {}
  35.   for p in properties:
  36.     # Given a key like "snippet.title", split into "snippet" and "title", where
  37.     # "snippet" will be an object and "title" will be a property in that object.
  38.     prop_array = p.split('.')
  39.     ref = resource
  40.     for pa in range(0, len(prop_array)):
  41.       is_array = False
  42.       key = prop_array[pa]
  43.  
  44.       # For properties that have array values, convert a name like
  45.       # "snippet.tags[]" to snippet.tags, and set a flag to handle
  46.       # the value as an array.
  47.       if key[-2:] == '[]':
  48.         key = key[0:len(key)-2:]
  49.         is_array = True
  50.  
  51.       if pa == (len(prop_array) - 1):
  52.         # Leave properties without values out of inserted resource.
  53.         if properties[p]:
  54.           if is_array:
  55.             ref[key] = properties[p].split(',')
  56.           else:
  57.             ref[key] = properties[p]
  58.       elif key not in ref:
  59.         # For example, the property is "snippet.title", but the resource does
  60.         # not yet have a "snippet" object. Create the snippet object here.
  61.         # Setting "ref = ref[key]" means that in the next time through the
  62.         # "for pa in range ..." loop, we will be setting a property in the
  63.         # resource's "snippet" object.
  64.         ref[key] = {}
  65.         ref = ref[key]
  66.       else:
  67.         # For example, the property is "snippet.description", and the resource
  68.         # already has a "snippet" object.
  69.         ref = ref[key]
  70.   return resource
  71.  
  72. # Remove keyword arguments that are not set
  73. def remove_empty_kwargs(**kwargs):
  74.   good_kwargs = {}
  75.   if kwargs is not None:
  76.     for key, value in kwargs.items():
  77.       if value:
  78.         good_kwargs[key] = value
  79.   return good_kwargs
  80.  
  81. def search_list_by_keyword(client, **kwargs):
  82.   # See full sample for function
  83.   kwargs = remove_empty_kwargs(**kwargs)
  84.  
  85.   response = client.search().list(
  86.     **kwargs
  87.   ).execute()
  88.  
  89.   return print_response(response)
  90.  
  91.  
  92. if __name__ == '__main__':
  93.   # When running locally, disable OAuthlib's HTTPs verification. When
  94.   # running in production *do not* leave this option enabled.
  95.   os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1'
  96.   client = get_authenticated_service()
  97.  
  98.   search_list_by_keyword(client,
  99.     part='snippet',
  100.     maxResults=25,
  101.     q='surfing',
  102.     type='')
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Exosiitoz
    122 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • User was banned
Add Comment
Please, Sign In to add comment