Community discussions

MikroTik App
 
moveik
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Tue Nov 24, 2020 1:16 am

WebFig packet sniffer - Missing ip addresses

Tue Dec 22, 2020 12:22 am

Hey,

I just got my hEx and powered it on.
I upgraded it to latest version and also tweaked it a little bit.

From WebFig, I went to "Tools -> Packet Sniffer" and initially could see the IP addresses and ports etc.
But now, all I see is only the remaining (without the IP addresses/ports) - see image:
Image

How do I get the full info for every record?
 
moveik
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 54
Joined: Tue Nov 24, 2020 1:16 am

Re: WebFig packet sniffer - Missing ip addresses

Wed Dec 23, 2020 12:57 am

I think that there's a bug:

The Raw Data of each record/packet contains the IP address, but it isn't being shown in the record.
I followed the Javascript code and noticed that the following method:
types.number.get = function (attrs, obj) {
  var val = obj[attrs.id || 0];
  return val instanceof Array ? val[0] : val;
};
Fails to interpret the Raw Data for IP address / Port, because that the "attrs.id" of the specific data (either IP address or port) doesn't exist in the "obj".
Both of these ("attrs.id" and "obj") are being retrieved from the web server.

For example - for the column "Src. Port":

The variable "attr" shows this data:
id: "u14"
name: "Src. Port"
opt: 1
owner: {…}
type: "number"
width: 50
<prototype>: {…}
Therefore, attrs.id = "u14".

But:
_owner: {…}
_type: {…}
b1a: 0
r10: (6) […]
r11: (6) […]
s28: "0000: RawBytesRow1              ASCIIofRow1\n0010: RawBytesRow2              ASCIIofRow2\n0020: RawBytesRow3              ASCIIofRow3\n0030: RawBytesRow4              ASCIIofRow4"
u1: 1
u13: 0
u19: 1
u2: 2048
u3: 70
uf: 1097591
ufe0001: 3006
<prototype>: {…}
(I censored the content of the attribute "s28" - this is the string of the Raw Data.)

As you can see, the attrs.id = "u14" doesn't exist in the "obj" attributes above.

Therefore, the variable "var" is undefined which causes the caller function (i.e. "Table.prototype.updateCells") to insert empty string.

The relevant code in method "Table.prototype.updateCells" is:
  var first = idx;
  for (var i in this.columns) {
    if (!this.columns[i]) continue;
    var attrs = type.columns[i];
    var val = ftype(attrs).get(attrs, obj);
 
RouterOS v6.47.8.

Could you please fix this?
 
gsauthof
just joined
Posts: 9
Joined: Fri May 28, 2021 8:00 pm
Contact:

Re: WebFig packet sniffer - Missing ip addresses

Sat Sep 11, 2021 11:12 am

I can confirm this issue on RouterOS 6.48.3.

Currently, the web UI of the packet sniffer is simply unusable due to the missing fields.

Fortunately, it works on the console. That means my workaround is to invoke
/tool sniffer packet
there.
 
basicmonkey
just joined
Posts: 4
Joined: Tue Aug 24, 2021 2:10 pm

Re: WebFig packet sniffer - Missing ip addresses

Wed Dec 01, 2021 4:28 pm

Same issue here in 7.1rc4. First time I've used the sniffer. Works fine in console.

Who is online

Users browsing this forum: devnull0 and 49 guests