In this paper, a new approach called HDNA (HTML DNA) is introduced for analyzing and comparing Document Object Model (DOM) trees in order to detect differences in HTML pages. This method assigns an identifier to each HTML page based on its structure, which proves to be particularly useful for detecting variations caused by server-side updates, user interactions or potential security risks. The process involves preprocessing the HTML content generating a DOM tree and calculating the disparities between two or more trees. By assigning weights to the nodes valuable insights about their hierarchical importance are obtained. The effectiveness of the HDNA approach has been demonstrated in identifying changes in DOM trees even when dynamically generated content is involved. Not does this method benefit web developers, testers, and security analysts by offering a deeper understanding of how web pages evolve. It also helps ensure the functionality and performance of web applications. Additionally, it enables detection and response to vulnerabilities that may arise from modifications in DOM structures. As the web ecosystem continues to evolve HDNA proves to be a tool, for individuals engaged in web development, testing, or security analysis.
翻译:本文提出了一种名为HDNA(HTML DNA)的新方法,用于分析和比较文档对象模型(DOM)树,以检测HTML页面中的差异。该方法基于HTML页面的结构为其分配唯一标识符,在检测由服务器端更新、用户交互或潜在安全风险引起的页面变化方面具有显著优势。其处理流程包括:预处理HTML内容、生成DOM树,以及计算两棵或多棵DOM树之间的差异。通过对节点赋予权重,可获得关于其层级重要性的有价值信息。实验表明,即使面对动态生成的内容,HDNA仍能有效识别DOM树的变化。该方法不仅通过提供对网页演化过程的深层理解,帮助Web开发人员、测试人员和安全分析师提升工作效率,还能确保Web应用的功能性与性能表现。此外,它还能实现对DOM结构变更所引发漏洞的及时检测与响应。随着Web生态系统的持续演进,HDNA将成为从事Web开发、测试或安全分析工作的专业人员的得力工具。