[Notepad 1]
NtReadFile
SetFilePointer
NtClose
NtCreateFile
GetFileType
[Notepad 2]
NtCreateFile
GetFileType
NtAllocateVirtualMemory
GetFileInformationByHandle
RegOpenKeyExA
I read two notepads like this, and there are two overlapping words, so I want to return two 1 I don't know how to do it. Help me
python
Please keep that in mind.
>>> f1 = open('/home/allinux/memo1.txt').read()splitlines()# Save list by line
['NtReadFile', 'SetFilePointer', 'NtClose', 'NtCreateFile', 'GetFileType']
>>> f2 = open('/home/allinux/memo2.txt').read().splitlines()
['NtCreateFile', 'GetFileType', 'NtAllocateVirtualMemory', 'GetFileInformationByHandle', 'RegOpenKeyExA']
>>> set(f1) & set(f2) # Intersection. Extract only the same ones
{'NtCreateFile', 'GetFileType'}
>>> len(set(f1) & set(f2))
2
>>> tuple(map(lambda i:1, set(f1) & set(f2)))
(1, 1)
1287 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
783 GDB gets version error when attempting to debug with the Presense SDK (IDE)
793 Error in x, y, and format string must not be None
882 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2025 OneMinuteCode. All rights reserved.