From e1711379a86679ccb408be799c87010b09a09fed Mon Sep 17 00:00:00 2001 From: Mohamed Tarek Date: Mon, 27 May 2024 20:13:54 +0300 Subject: [PATCH 1/2] update html-comments/cargo.toml --- html-comments/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html-comments/Cargo.toml b/html-comments/Cargo.toml index c0fdba2..4768829 100644 --- a/html-comments/Cargo.toml +++ b/html-comments/Cargo.toml @@ -2,7 +2,7 @@ name = "html-comments" version = "0.1.0" edition = "2021" -authors = ["Mohamed Tarek @0xr00t3d"] +authors = ["Mohamed Tarek @pwnxpl0it"] description = "Pulls out comments from html" repository = "https://github.com/knassar702/hacks" keywords = ["html-comments","htmlcomments","bugbounty"] @@ -18,4 +18,4 @@ panic = "abort" strip = true [dependencies] -html5tokenizer = "0.4.0" +html5tokenizer = "=0.5.2" From 7b7c532de8040ba0c56c779b5979de5b14bd7d17 Mon Sep 17 00:00:00 2001 From: Mohamed Tarek Date: Mon, 27 May 2024 20:19:51 +0300 Subject: [PATCH 2/2] html-comments: Using NaiveParser Instead of deprecated Tokenizer --- html-comments/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html-comments/src/main.rs b/html-comments/src/main.rs index 9814895..bc47f5d 100644 --- a/html-comments/src/main.rs +++ b/html-comments/src/main.rs @@ -1,5 +1,5 @@ use std::io; -use html5tokenizer::{Tokenizer, Token}; +use html5tokenizer::{NaiveParser, Token}; fn main() { let mut html = String::from(""); @@ -14,7 +14,7 @@ fn main() { } } - for token in Tokenizer::new(html.as_str()).infallible(){ + for token in NaiveParser::new(html.as_str()).flatten(){ match token{ Token::Comment(comment) => { println!("{}",comment.replace("\n"," ").trim());