3 ms·
Not just SharePoint. Crawling a machine for special files is pretty simple. Here is a little script I used for a while. Could be modified to look for file heade
by woodall 15y ago
Not just SharePoint. Crawling a machine for special files is pretty simple. Here is a little script I used for a while. Could be modified to look for file headers(more specific) but who is going to change a .doc to a .pdf for security reasons?
#!/usr/bin/python
import os,shutil
exts = [".txt",".doc",".docx",".xls",".xlsx",".ppt",".pptx"]
startpath = os.environ['HOMEDRIVE']
def find(none, directory, filenames):
for file in filenames:
for ext in exts:
if file.endswith(ext):
fullfile = os.path.join(directory,file)
try:
shutil.copy(fullfile,file)
except IOError:
pass # access denied
os.path.walk(startpath,find, None)
- mikle 15y agoSo how many law enforcement agencies have the Python interpreter installed on their machine? Of course you can always py2exe this, write it in C/C++ (/C#). Hacking is easy, it just takes time and dedication.
- woodall 15y ago>you can always py2exe That's exactly what I did! You can do the same through cmd, but most machines do not have permissions for that.