def get_shell_code(extension, command, force_extension=False):
 result = []
 shellcodes = _get_file_list('code', extension, force_extension)
 for (file_content, real_extension) in shellcodes:
  custom_replacer = functools.partial(cmd_replace, file_content)
  this_shellcode = custom_replacer(command)
  result.append((this_shellcode, real_extension, custom_replacer))
 return result

def get_shell_code ( extension , command , force_extension = False ) : result = [ ] shellcodes = _get_file_list ( 'code' , extension , force_extension ) for ( file_content , real_extension ) in shellcodes : custom_replacer = functools . partial ( cmd_replace , file_content ) this_shellcode = custom_replacer ( command ) result . append ( ( this_shellcode , real_extension , custom_replacer ) ) return result
similar to get_webshells but returns a code that when it is evaluated runs command in the operating system .