首页 \ 问答 \ 获取tcpstream - wireshark vs tshark(Get tcpstream - wireshark vs tshark)

获取tcpstream - wireshark vs tshark(Get tcpstream - wireshark vs tshark)

我试图从捕获中获取TCPStream,大小为24M。 我可以通过wireshark获得它,但我需要一个没有接口的命令来获得它。

我开始尝试在不到1M的捕获中使用TShark,并且我能够在相同的捕获中使tcpstream等于wireshark。 在24M的捕捉中,我做不到。 wireshark中的TCPStream很大,与TShark中给出的不匹配。

我无法理解问题所在。

我正在使用以下命令: tshark -r cap.pcapng -T fields -e data

知道问题可能是什么吗? 或者它与什么有关?

我也可以使用其他可以解决我问题的解决方案。

谢谢。


I'm trying to get the TCPStream from a capture, with size 24M. I can get it with wireshark but I need a command without interface to get this.

I started by trying the TShark in captures of less than 1M, and I was able to get tcpstream equal to wireshark in the same capture. In the capture with 24M, I can't. The TCPStream in wireshark is large and does not match what is given in TShark.

I can not understand what the problem is.

I'm using the following command: tshark -r cap.pcapng -T fields -e data

Any idea what the problem might be? Or what is it related to?

I'm available also for other solutions that can solve my problem.

Thanks.


原文:https://stackoverflow.com/questions/45467414
更新时间:2022-02-02 08:02

最满意答案

如果脚本彼此依赖,则需要确保首先加载依赖项。 您可以像这样嵌套脚本加载:

var jqueryElement = document.createElement("script");
jqueryElement.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js";

var mainElement = document.createElement("script");
mainElement.src = "/resources/js/main.js";

var indexElement = document.createElement("script");
indexElement.src = "/resources/js/index.js";

var googleApiElement = document.createElement("script");
googleApiElement.src = "https://maps.googleapis.com/maps/api/js?key=***mysecetrkey**&callback=initMap";

// add the first script element
document.body.appendChild(jqueryElement);

jqueryElementElement.onload = function () {
  document.body.appendChild(googleApiElement);
}

googleApiElement.onload = function () {
  document.body.appendChild(mainElement);
  document.body.appendChild(indexElement)
}

我只是在猜你的依赖顺序。


If the scripts have dependencies towards each other you need to make sure that the dependencies loads first. You can nest the script loading like so:

var jqueryElement = document.createElement("script");
jqueryElement.src = "https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js";

var mainElement = document.createElement("script");
mainElement.src = "/resources/js/main.js";

var indexElement = document.createElement("script");
indexElement.src = "/resources/js/index.js";

var googleApiElement = document.createElement("script");
googleApiElement.src = "https://maps.googleapis.com/maps/api/js?key=***mysecetrkey**&callback=initMap";

// add the first script element
document.body.appendChild(jqueryElement);

jqueryElementElement.onload = function () {
  document.body.appendChild(googleApiElement);
}

googleApiElement.onload = function () {
  document.body.appendChild(mainElement);
  document.body.appendChild(indexElement)
}

I'm just guessing your dependency order.

相关问答

更多
  • 您可以为每个JS脚本编写自定义指令,并在模板中包含创建的标记名称。 class BladeServiceProvider extends ServiceProvider { public function boot() { Blade::directive('chartsjs', function($expression) { return "...
  • 这个问题真的有两个部分: 如何获取客户端JavaScript的服务器端文件列表? 简短的回答是你没有可以返回该列表的服务器端api。 根据您使用的后端,编写一个方法,返回目标目录中文件的JSON数组。 你首先调用它,得到响应然后用队列处理它们: d3.json('/get/list/of/xml/files', function(error, fileArray){ var q = d3.queue(); fileArray.forEach(function(d){ q = q.defer( ...
  • 此代码将在页面加载时随机加载JavaScript文件。 它将在JSFiles列表中随机选择一个文件, 并将JS文件附加到head部分。 Load Random JS file