diff --git a/osrframework/wrappers/facebook.py b/osrframework/wrappers/facebook.py index d34a6db1..1fc6aa34 100644 --- a/osrframework/wrappers/facebook.py +++ b/osrframework/wrappers/facebook.py @@ -30,11 +30,11 @@ from osrframework.utils.platforms import Platform class Facebook(Platform): - """ + """ A object for Facebook. """ def __init__(self): - """ + """ Constructor... """ self.platformName = "Facebook" @@ -42,32 +42,32 @@ def __init__(self): # Base URL self.baseURL = "http://facebook.com/" - + ######################## # Defining valid modes # ######################## - self.isValidMode = {} + self.isValidMode = {} self.isValidMode["phonefy"] = False self.isValidMode["usufy"] = True - self.isValidMode["searchfy"] = True - + self.isValidMode["searchfy"] = True + ###################################### # Search URL for the different modes # ###################################### # Strings with the URL for each and every mode - self.url = {} + self.url = {} #self.url["phonefy"] = "http://anyurl.com//phone/" + "" - self.url["usufy"] = "https://www.facebook.com/" + "" - self.url["searchfy"] = "https://www.facebook.com/public?query=" + "" + self.url["usufy"] = "https://www.facebook.com/" + "" + self.url["searchfy"] = "https://www.facebook.com/public?query=" + "" ###################################### # Whether the user needs credentials # ###################################### - self.needsCredentials = {} + self.needsCredentials = {} #self.needsCredentials["phonefy"] = False self.needsCredentials["usufy"] = False - self.needsCredentials["searchfy"] = False - + self.needsCredentials["searchfy"] = False + ################# # Valid queries # ################# @@ -77,7 +77,7 @@ def __init__(self): #self.validQuery["phonefy"] = ".*" self.validQuery["usufy"] = ".+" self.validQuery["searchfy"] = ".+" - + ################### # Not_found clues # ################### @@ -85,32 +85,30 @@ def __init__(self): self.notFoundText = {} #self.notFoundText["phonefy"] = [] self.notFoundText["usufy"] = ["Esta página no está disponible", "This content is currently unavailable", "Sorry, this page isn't available"] - self.notFoundText["searchfy"] = [] - + self.notFoundText["searchfy"] = [] + ######################### # Fields to be searched # ######################### self.fieldsRegExp = {} - + # Definition of regular expressions to be searched in phonefy mode #self.fieldsRegExp["phonefy"] = {} # Example of fields: #self.fieldsRegExp["phonefy"]["i3visio.location"] = "" - + # Definition of regular expressions to be searched in usufy mode self.fieldsRegExp["usufy"] = {} # Example of fields: #self.fieldsRegExp["usufy"]["i3visio.location"] = "" # Definition of regular expressions to be searched in searchfy mode self.fieldsRegExp["searchfy"] = {} - self.searchfyAliasRegexp = "lfloat _ohe\" href=\"https://www.facebook.com/([^\"]+)\" aria-hidden=\"true\"" + self.searchfyAliasRegexp = "tabindex=\"-1\" href=\"https://www.facebook.com/([^\"]+)\">" # Example of fields: - #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" - + #self.fieldsRegExp["searchfy"]["i3visio.location"] = "" + ################ # Fields found # ################ # This attribute will be feeded when running the program. self.foundFields = {} - -