(connId, smbServer, recvPacket, parameters, data, maxDataCount=0)
| 900 | |
| 901 | @staticmethod |
| 902 | def queryPathInformation(connId, smbServer, recvPacket, parameters, data, maxDataCount=0): |
| 903 | connData = smbServer.getConnectionData(connId) |
| 904 | |
| 905 | respSetup = b'' |
| 906 | respParameters = b'' |
| 907 | respData = b'' |
| 908 | errorCode = 0 |
| 909 | |
| 910 | queryPathInfoParameters = smb.SMBQueryPathInformation_Parameters(flags=recvPacket['Flags2'], data=parameters) |
| 911 | |
| 912 | if recvPacket['Tid'] in connData['ConnectedShares']: |
| 913 | path = connData['ConnectedShares'][recvPacket['Tid']]['path'] |
| 914 | try: |
| 915 | infoRecord, errorCode = queryPathInformation(path, decodeSMBString(recvPacket['Flags2'], |
| 916 | queryPathInfoParameters['FileName']), |
| 917 | queryPathInfoParameters['InformationLevel']) |
| 918 | except Exception as e: |
| 919 | smbServer.log("queryPathInformation: %s" % e, logging.ERROR, connData=connData) |
| 920 | |
| 921 | if infoRecord is not None: |
| 922 | respParameters = smb.SMBQueryPathInformationResponse_Parameters() |
| 923 | respData = infoRecord |
| 924 | else: |
| 925 | errorCode = STATUS_SMB_BAD_TID |
| 926 | |
| 927 | smbServer.setConnectionData(connId, connData) |
| 928 | |
| 929 | return respSetup, respParameters, respData, errorCode |
| 930 | |
| 931 | @staticmethod |
| 932 | def queryFsInformation(connId, smbServer, recvPacket, parameters, data, maxDataCount=0): |
nothing calls this directly
no test coverage detected