From 5482b46a6137e1e1e3f320ea04bfbefbc081eb95 Mon Sep 17 00:00:00 2001 From: Kerim Can Karaduman <96576479+KcanCurly@users.noreply.github.com> Date: Thu, 14 Nov 2024 23:05:35 +0300 Subject: [PATCH] setup.py --- requirements.txt | 1 - setup.py | 28 ++++++++++++++++++++++++++ DumpSMBShare.py => src/DumpSMBShare.py | 7 +++++-- src/__init__.py | 0 4 files changed, 33 insertions(+), 3 deletions(-) delete mode 100644 requirements.txt create mode 100644 setup.py rename DumpSMBShare.py => src/DumpSMBShare.py (99%) mode change 100755 => 100644 create mode 100644 src/__init__.py diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index d83b134..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -impacket \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..cb574bb --- /dev/null +++ b/setup.py @@ -0,0 +1,28 @@ +from setuptools import setup, find_packages + +setup( + name="DumpSMBShare", + version="1.0.0", + author="KcanCurly", + description="A script to dump files and folders remotely from a Windows SMB share.", + long_description=open("README.md").read(), + long_description_content_type="text/markdown", + url="https://github.com/KcanCurly/FindUncommonShares", + packages=find_packages(), + install_requires=[ + "impacket", + ], + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Intended Audience :: Information Technology", + "Topic :: Security", + ], + python_requires=">=3.8", + entry_points={ + "console_scripts": [ + "DumpSMBShare=src.DumpSMBShare:main", + ], + }, +) \ No newline at end of file diff --git a/DumpSMBShare.py b/src/DumpSMBShare.py old mode 100755 new mode 100644 similarity index 99% rename from DumpSMBShare.py rename to src/DumpSMBShare.py index b233984..104b0d5 --- a/DumpSMBShare.py +++ b/src/DumpSMBShare.py @@ -193,8 +193,7 @@ def init_smb_session(args, domain, username, password, address, lmhash, nthash): print("[>] USER Session Granted") return smbClient - -if __name__ == "__main__": +def main(): args = parse_args() args.extensions = [e.strip() for e in args.extensions.strip().split(",") if len(e.strip()) != 0] @@ -228,3 +227,7 @@ def init_smb_session(args, domain, username, password, address, lmhash, nthash): print("[>] Cannot find share '%s'" % args.share) except Exception as e: raise e + + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/src/__init__.py b/src/__init__.py new file mode 100644 index 0000000..e69de29