English 中文(简体)
过滤器: 在过滤器之前寄送的包装
原标题:Wireshark Filters: Getting the packet that was sent before the filtered one

我正试图在电线上安装一个过滤器,以接收所有SMB的回复,这些回复是“Error:STATUS_NO_SUCH_FILE”。 我也要能够在过滤器之前 gr碎包装。 例如:

No. Time        Source      Destination Proto.  Length  Info
26482   24.832997   192.168.1.62    192.168.1.4 SMB 288 Trans2 Request, QUERY_PATH_INFO, Query File Basic Info, Path: 1_CLIENTSCLIENTSACME INC
26483   24.833122   192.168.1.4 192.168.1.62    SMB 158 Trans2 Response, QUERY_PATH_INFO
26484   24.833232   192.168.1.62    192.168.1.4 SMB 306 Trans2 Request, FIND_FIRST2, Pattern: 1_CLIENTSCLIENTSACME INC<.AC_
26485   24.833909   192.168.1.4 192.168.1.62    SMB 126 Trans2 Response, FIND_FIRST2, Error: STATUS_NO_SUCH_FILE

The followingfil grabs the "STATUS_NO_SUCH_FILE' Packets:

((ip.src == 192.168.1.4) && (ip.dst == 192.168.1.62)) || ((ip.src == 192.168.1.62) && (ip.dst == 192.168.1.4)) && (smb.nt_status == 0xC000000F)

But I would also like to get the packet previous to that one as well so I know which file path wasn t found.

问题回答

You can use TShark, part of the Wireshark distribution, to get an overview.
Run the following command:
$ tshark -r FS01-Test.pcap -R smb.nt_status==0xc000000f -T fields -e frame.number -e smb.nt_status -e smb.response_to -E header=y -E separator=, > smb.csv

Output:
frame.number,smb.nt_status,smb.response_to
6242,0xc000000f,6238
6247,0xc000000f,6246
6331,0xc000000f,6269
6338,0xc000000f,6336

Another example:
$ tshark -r FS01-Test.pcap -R smb.nt_status==0xc000000f -T fields -e frame.number -e smb.nt_status -e smb.response_to -e smb.search_pattern -E header=y -E separator=, > smb02.csv

Output:
frame.number,smb.nt_status,smb.response_to,smb.search_pattern
6242,0xc000000f,6238,\B\Di\folder.jpg
6247,0xc000000f,6246,\B\Di\folder.gif
6331,0xc000000f,6269,\B\Ex\folder.jpg
6338,0xc000000f,6336,\B\Ex\folder.gif





相关问题
Is There a Windows SMB Client Opened Implement

There was a smbmrx sample code using RDBSS in WDK Vista. But since WDK 7600 has been released, the sample was removed. -Do you know why? I m finding a nice sample code to learn RDBSS. Is there a ...

XSendFile can t stat file if on windows samba share?

I am having trouble getting apache to serve a file through the XSendFile when it is in a directory mounted with samba. To give a little background: I have a Ruby on Rails app that is slowly replacing ...

cifs/samba client library in C#

I am looking for cifs/smb client library in C# for accessing a SMB share from windows cifs client. Any code snippet is highly appreciated.

Copy files to network path or drive using python on OSX

I have a similar question like the one asked here but I need it to work on OSX. How to copy files to network path or drive using Python So i want to save a file on a SMB network share. Can this be ...

cygwin s expect doesn t work with net use?

I need to automate the net use command on cygwin. The command is net use /user:"name" somewhere . And Enter the password for name to connect to prosseek : is expected to enter the password. ...

Ant Task To Copy To Windows Share (SMB)

Is there an ant task (similar to ftp or scp tasks) that would allow me to copy a set of files to a windows (smb) share? Edit: I had to create a task using jcifs for this. If anyone needs it, here is ...

Reading file over network slow due to extra reads

I m reading a file and I either read a row of data (1600 sequential reads of 17 bytes) or a column of data (1600 reads of 17 bytes separated by 1600*17=27,200 bytes). The file is either on a local ...

热门标签