-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Marco
committed
Jul 28, 2023
0 parents
commit 2bcd413
Showing
8 changed files
with
1,546 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Rust | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build | ||
run: cargo build --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
debug/ | ||
target/ | ||
files/ | ||
|
||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries | ||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html | ||
Cargo.lock | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
|
||
# MSVC Windows builds of rustc generate these, which store debugging information | ||
*.pdb | ||
|
||
# Visual Studio 2015/2017 cache/options directory | ||
.vs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[package] | ||
name = "qualysx" | ||
version= "2.0.0" | ||
edition = "2021" | ||
authors = ["abut0n"] | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
atty = "0.2.14" | ||
chrono = "0.4.22" | ||
colored = "2.0.0" | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = "1.0.93" | ||
serde-xml-rs = "0.6.0" | ||
reqwest = { version = "0.11", features = ["blocking", "json"] } | ||
tokio = { version = "1", features = ["full"] } |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# qualysx | ||
Fast and reliable rust implementation of xml to json parser for qualys scans. | ||
|
||
:arrow_right: [ddt file](https://qualysguard.qg2.apps.qualys.eu/scan-1.dtd) | ||
|
||
## How to use it | ||
|
||
```bash | ||
qualysx -x qualys_report.xml > out.json | ||
[WRN] Use with caution. You are responsible for your actions. | ||
[WRN] Developers assume no liability and are not responsible for any misuse or damage. | ||
``` | ||
|
||
## ... or use qualysx in your projects | ||
|
||
```rust | ||
use qualysx::from_str; | ||
|
||
fn main() { | ||
|
||
let file: String = std::fs::read_to_string(xml).unwrap(); | ||
let scan: qualysx::Scan = qualysx::from_str(&file).unwrap(); | ||
let j = serde_json::to_string(&scan).unwrap(); | ||
|
||
println!("{}", j); | ||
} | ||
```` | ||
# Contribute | ||
|
||
Contributions are always welcome! Please create a PR to add Github Profile. | ||
|
||
## :pencil: License | ||
|
||
This project is licensed under [GPL-3.0](https://opensource.org/license/gpl-3-0/) license. | ||
|
||
## :man_astronaut: Show your support | ||
|
||
Give a ⭐️ if this project helped you! |
Oops, something went wrong.