Python Forum
How to run a file with smb.py!!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to run a file with smb.py!!
#1
Hi. how i can use smb.py and smbConnection.py from impacket to run a file?
I'm looking for something like:
dir = smbConn.connectTree('C$')
smbConn.openFile(dir,  '/picture.jpg')
when i use help show me this:

Help on method openFile in module impacket.smbconnection:

openFile(self, treeId, pathName, desiredAccess=3, shareMode=1, creationOption=64, creationDisposition=1, fileAttributes=128, impersonationLevel=2, securityFlags=0, oplockLevel=0, createContexts=None) method of impacket.smbconnection.SMBConnection instance
opens a remote file

:param HANDLE treeId: a valid handle for the share where the file is to be opened
:param string pathName: the path name to open
:return: a valid file descriptor, if not raises a SessionError exception.

please explain with example. Rolleyes
Reply
#2
Sad Sad Sad So how you can explain this Help?!!!!

Help on method openFile in module impacket.smbconnection:

openFile(self, treeId, pathName, desiredAccess=3, shareMode=1, creationOption=64, creationDisposition=1, fileAttributes=128, impersonationLevel=2, securityFlags=0, oplockLevel=0, createContexts=None) method of impacket.smbconnection.SMBConnection instance
opens a remote file

:param HANDLE treeId: a valid handle for the share where the file is to be opened
:param string pathName: the path name to open
:return: a valid file descriptor, if not raises a SessionError exception.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020