Skip to content

Commit

Permalink
chore(colors): removed color printings
Browse files Browse the repository at this point in the history
  • Loading branch information
pwnwriter committed Sep 2, 2023
1 parent 2924ce4 commit c5ca551
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 28 deletions.
8 changes: 5 additions & 3 deletions src/cli/ascii.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use colored::Colorize;
// pub const BAR: &str = r"
// ────────────────────────────────
// ";
pub const BAR: &str = r"
────────────────────────────────
";

pub const RESET: &str = "\x1B[0m"; //( resets the text color to the default)

pub fn splash() -> String {
let logo = r"
Expand Down
18 changes: 8 additions & 10 deletions src/cli/screenshot.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::colors::*;
use crate::cli::ascii::{BAR, RESET};
use crate::log::error;
use chromiumoxide::browser::{Browser, BrowserConfig};
use chromiumoxide::handler::viewport::Viewport;
Expand Down Expand Up @@ -70,7 +70,7 @@ pub async fn run(
fs::create_dir(&outdir).await?;
}

let urls: Vec<String>; // Define the 'urls' variable outside the match statement
let urls: Vec<String>;

#[allow(unreachable_patterns)]
match stdin {
Expand Down Expand Up @@ -156,16 +156,14 @@ async fn take_screenshots(
)
.await?;

#[allow(clippy::useless_format)]
let _info = Columns::from(vec![
format!("{RESET}").split('\n').collect::<Vec<&str>>(),
vec![
&format!("{BLUE}"),
&format!("{GREEN}[{CYAN}  {GREEN}] URL={GREEN}{}", url),
&format!(
"{BLUE}[{CYAN}  {YELLOW}] Title={GREEN}{}",
page.get_title().await?.unwrap_or_default()
),
&format!("{BLUE}[{CYAN} ﯜ {YELLOW}] Status={GREEN}{}", _res.status()),
&format!("{BAR}"),
&format!(" URL = {}", url),
&format!("Title = {}", page.get_title().await?.unwrap_or_default()),
&format!("Status = {}", _res.status()),
],
])
.set_tabsize(0)
Expand All @@ -174,7 +172,7 @@ async fn take_screenshots(
println!("{_info}");
}
} else {
println!("{RED}[-] Timed out URL = {YELLOW}{}", url);
println!("[-] Timed out URL = {}", url);
}
}

Expand Down
14 changes: 0 additions & 14 deletions src/colors.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
mod cli;
mod log;
use cli::args;
mod colors;
use clap::Parser;

#[tokio::main]
Expand Down

0 comments on commit c5ca551

Please sign in to comment.