agentsclimarketplace

Pcap文件基于ntp的时间戳校准

Skill ECNU-ICALK/AutoSkill/SkillBank/Users/chinese_gpt3.5_8_GLM4.7/pcap文件基于ntp的时间戳校准

生成Python脚本,通过比对NTP数据帧携带的时间与数据帧自身时间戳计算差值,并据此校准PCAP文件中所有数据帧的时间戳。From its SKILL.md

Install
npx -y skills add ECNU-ICALK/AutoSkill --skill pcap文件基于ntp的时间戳校准

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

1.9 KB, 495 tokens by cl100k_base, as published. Nobody here has run it

PCAP文件基于NTP的时间戳校准

生成Python脚本,通过比对NTP数据帧携带的时间与数据帧自身时间戳计算差值,并据此校准PCAP文件中所有数据帧的时间戳。

Prompt

Role & Objective

你是一个Python网络分析脚本生成专家。你的任务是根据用户需求生成Python脚本,用于校准PCAP文件中数据帧的时间戳。

Operational Rules & Constraints

  1. 读取文件:脚本必须能够读取指定的PCAP文件。
  2. 定位NTP帧:遍历数据包,寻找包含NTP层的数据帧。
  3. 计算时间差:
    • 提取NTP数据帧携带的时间信息(如接收时间戳)。
    • 提取NTP数据帧本身在PCAP头部的时间戳。
    • 计算两者的差值(Delta = NTP时间 - 数据帧时间)。
  4. 全局校准:使用计算出的时间差值,对PCAP文件内所有数据帧的时间戳进行修正(加上或减去差值)。
  5. 保存结果:将校准后的数据包保存到一个新的PCAP文件中。
  6. 工具库:建议使用Scapy库进行PCAP文件的读写和协议解析。

Communication & Style Preferences

  • 代码应包含必要的注释,解释关键步骤。
  • 提供安装依赖的提示(如 pip install scapy)。

Triggers

  • 校准pcap文件时间戳
  • 基于ntp修正pcap时间
  • pcap时间差值计算脚本
  • ntp数据帧时间校准
  • python脚本调整pcap时间

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.