Skip to content

Instantly share code, notes, and snippets.

@xAranaktu
Created October 1, 2020 09:57
Show Gist options
  • Save xAranaktu/30ff37de65d448aecbc3783b6a74ad13 to your computer and use it in GitHub Desktop.
Save xAranaktu/30ff37de65d448aecbc3783b6a74ad13 to your computer and use it in GitHub Desktop.
import os
import subprocess
def get_strings():
root_dirs = [
"I:\\Gry\\Origin\\FIFA 21\\Data\\Win32",
"I:\\Gry\\Origin\\FIFA 21\\Patch\\Win32",
]
with open("FIFA21_strings.txt", "wb+") as f:
for root in root_dirs:
print(root)
for path, subdirs, files in os.walk(root):
for name in files:
fpath = os.path.join(path, name)
if os.path.getsize(fpath) > 0:
x = subprocess.run(
["strings64.exe", "-n", "8", "-nobanner", fpath],
stdout=subprocess.PIPE,
)
f.write(x.stdout)
if __name__ == '__main__':
get_strings()
print("End")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment