{"id":17469758,"url":"https://github.com/shellrow/webscan","last_synced_at":"2025-04-10T03:21:53.412Z","repository":{"id":43368973,"uuid":"356305467","full_name":"shellrow/webscan","owner":"shellrow","description":"Cross-platform web scan library","archived":false,"fork":false,"pushed_at":"2022-06-11T12:07:49.000Z","size":40,"stargazers_count":1,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T04:37:29.487Z","etag":null,"topics":["rust","rust-crate","rust-library","scanner","security","web"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shellrow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-09T14:50:42.000Z","updated_at":"2024-03-22T06:49:01.000Z","dependencies_parsed_at":"2022-08-20T13:21:01.112Z","dependency_job_id":null,"html_url":"https://github.com/shellrow/webscan","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellrow%2Fwebscan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellrow%2Fwebscan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellrow%2Fwebscan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shellrow%2Fwebscan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shellrow","download_url":"https://codeload.github.com/shellrow/webscan/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248148703,"owners_count":21055638,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rust","rust-crate","rust-library","scanner","security","web"],"created_at":"2024-10-18T15:43:42.742Z","updated_at":"2025-04-10T03:21:53.386Z","avatar_url":"https://github.com/shellrow.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[crates-badge]: https://img.shields.io/crates/v/webscan.svg\n[crates-url]: https://crates.io/crates/webscan\n[license-badge]: https://img.shields.io/crates/l/webscan.svg\n[examples-url]: https://github.com/shellrow/webscan/tree/main/examples\n\n# webscan [![Crates.io][crates-badge]][crates-url] ![License][license-badge]\nCross-platform web scan library  \nwith the aim of being lightweight and fast. \n\n## Features\n- URI SCAN\n- DOMAIN SCAN\n\n## Usage\nAdd `webscan` to your dependencies  \n```toml:Cargo.toml\n[dependencies]\nwebscan = \"0.4.0\"\n```\n\n## Example\nURI Scan Example\n```rust\nextern crate webscan;\nuse webscan::{UriScanner, ScanStatus, RequestMethod};\nuse tokio;\nuse std::fs::{read_to_string, read};\nuse std::time::Duration;\n\n#[tokio::main]\nasync fn main(){\n    let mut uri_scanner = match UriScanner::new(){\n        Ok(scanner) =\u003e (scanner),\n        Err(e) =\u003e panic!(\"Error creating scanner: {}\", e),\n    };\n    let base_uri = String::from(\"http://localhost:8000/\");\n    uri_scanner.set_base_uri(base_uri);\n    let data = read_to_string(\"uris.txt\");\n    let text = match data {\n        Ok(content) =\u003e content,\n        Err(e) =\u003e {panic!(\"Could not open or find uris.txt file: {}\", e);}\n    };\n    let word_list: Vec\u003c\u0026str\u003e = text.trim().split(\"\\n\").collect();\n    for word in word_list {\n        uri_scanner.add_word(word.to_string());\n    }\n    match read(\"content.txt\") {\n        Ok(ct) =\u003e {\n            let sep = b'\\n';\n            ct.split(|b| b == \u0026sep )\n                .for_each(|c| uri_scanner.add_content(c.to_vec()));\n        },\n        Err(e) =\u003e {panic!(\"Could not open or find content.txt file: {}\", e);}\n    }\n    uri_scanner.set_request_method(RequestMethod::Get);\n    uri_scanner.set_timeout(Duration::from_millis(20000));\n    uri_scanner.set_accept_invalid_certs(false);\n    uri_scanner.run_scan().await;\n    let result = uri_scanner.get_result();\n    print!(\"Status: \");\n    match result.scan_status {\n        ScanStatus::Done =\u003e {println!(\"Normal end\")},\n        ScanStatus::Timeout =\u003e {println!(\"Timed out\")},\n        _ =\u003e {println!(\"Error\")},\n    }\n    println!(\"URI Scan Result:\");\n    for (uri, status) in result.responses {\n        println!(\"{} {}\", uri, status);\n    }\n    println!(\"Scan Time: {:?}\", result.scan_time);\n}\n```\n\nFor more details see [Examples][examples-url]\n\n## Supported platform\n- Linux\n- macOS(OS X)\n- Windows\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellrow%2Fwebscan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshellrow%2Fwebscan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshellrow%2Fwebscan/lists"}