def searchObfuscatedFunctions(jsCode, function):
 obfuscatedFunctionsInfo = []
 if (jsCode != None):
  match = re.findall((('\\W(' + function) + '\\s{0,5}?\\((.*?)\\)\\s{0,5}?;)'), jsCode, re.DOTALL)
  if (match != []):
   for m in match:
    if (re.findall('return', m[1], re.IGNORECASE) != []):
     obfuscatedFunctionsInfo.append([function, m, True])
    else:
     obfuscatedFunctionsInfo.append([function, m, False])
  obfuscatedFunctions = re.findall((('\\s*?((\\w*?)\\s*?=\\s*?' + function) + ')\\s*?;'), jsCode, re.DOTALL)
  for obfuscatedFunction in obfuscatedFunctions:
   obfuscatedElement = obfuscatedFunction[1]
   obfuscatedFunctionsInfo += searchObfuscatedFunctions(jsCode, obfuscatedElement)
 return obfuscatedFunctionsInfo

def searchObfuscatedFunctions ( jsCode , function ) : obfuscatedFunctionsInfo = [ ] if ( jsCode != None ) : match = re . findall ( ( ( '\\W(' + function ) + '\\s{0,5}?\\((.*?)\\)\\s{0,5}?;)' ) , jsCode , re . DOTALL ) if ( match != [ ] ) : for m in match : if ( re . findall ( 'return' , m [ 1 ] , re . IGNORECASE ) != [ ] ) : obfuscatedFunctionsInfo . append ( [ function , m , True ] ) else : obfuscatedFunctionsInfo . append ( [ function , m , False ] ) obfuscatedFunctions = re . findall ( ( ( '\\s*?((\\w*?)\\s*?=\\s*?' + function ) + ')\\s*?;' ) , jsCode , re . DOTALL ) for obfuscatedFunction in obfuscatedFunctions : obfuscatedElement = obfuscatedFunction [ 1 ] obfuscatedFunctionsInfo += searchObfuscatedFunctions ( jsCode , obfuscatedElement ) return obfuscatedFunctionsInfo
search for obfuscated functions in the javascript code .