Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
battleoverflow committed Apr 15, 2024
1 parent 3e7e557 commit 0aa7f37
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow is for production builds, main branch builds, etc.

# Project: Mercy (https://github.com/azazelm3dj3d/mercy)
# Author(s): azazelm3dj3d (https://github.com/azazelm3dj3d)
# Project: Mercy (https://github.com/battleoverflow/mercy)
# Author(s): battleoverflow (https://github.com/battleoverflow)
# License: BSD 2-Clause

name: Mercy
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "mercy"
description = "Mercy is an open-source Rust crate and CLI for building cybersecurity tools, assessment projects, and testing infrastructure."
version = "2.0.1"
version = "2.0.2"
edition = "2021"
author = "azazelm3dj3d"
author = "battleoverflow"
license = "BSD-2-Clause"
categories = ["cryptography", "command-line-utilities", "encoding"]
keywords = ["cybersecurity", "decode", "encode", "cracking"]
repository = "https://github.com/azazelm3dj3d/mercy"
repository = "https://github.com/battleoverflow/mercy"

[dependencies]
base64 = "0.13.0"
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 2-Clause License

Copyright (c) 2022, azazelm3dj3d
Copyright (c) 2022-2024, battleoverflow
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<h1 align="center">
<img src="https://raw.githubusercontent.com/azazelm3dj3d/mercy/main/assets/mercy_icon.png" width="40%" />
<img src="https://raw.githubusercontent.com/battleoverflow/mercy/main/assets/mercy_icon.png" width="40%" />
</h1>

📚 [Documentation](https://docs.rs/mercy/latest/mercy/)

![Workflow](https://github.com/azazelm3dj3d/mercy/actions/workflows/workflow.yml/badge.svg?branch=main)
![Workflow](https://github.com/battleoverflow/mercy/actions/workflows/workflow.yml/badge.svg?branch=main)

Mercy is an open source Rust crate and CLI designed for building cybersecurity tools, assessment projects, and testing. The goal of the project is to make creating security tools in Rust more accessible and sustainable without complex algorithms.

## Usage
Since Mercy is a standard crate, it can easily be used in any project already initialized with Cargo. Simply add the following line to your `Cargo.toml` file:

```toml
mercy = "2.0.1"
mercy = "2.0.2"
```

Once the `Cargo.toml` file is updated, you can import the crate and use the provided methods by running `cargo run`. There are lots of different examples available below.
Expand All @@ -24,8 +24,8 @@ Here's a quick example of decoding and encoding using the base64 protocol:
use mercy::{ decode, encode };

fn main() {
// Encode string "azazelm3dj3d"
encode("base64", "azazelm3dj3d");
// Encode string "battleoverflow"
encode("base64", "battleoverflow");

// Decode string "YXphemVsbGFicw=="
decode("base64", "YXphemVsbGFicw==");
Expand All @@ -44,13 +44,13 @@ fn main() {
```

### Malware/Malicious Detection
You can check if a domain (i.e. azazelm3dj3d.com) is currently classified as malicious using the InQuest API:
You can check if a domain (i.e. example.com) is currently classified as malicious using the InQuest API:

```rust
use mercy::malicious;

fn main() {
malicious("status", "azazelm3dj3d.com");
malicious("status", "example.com");
}
```

Expand All @@ -69,10 +69,10 @@ fn main() {
extra("system_info", "all");

// Defang an ip address or domain
extra("defang", "azazelm3dj3d.com");
extra("defang", "example.com");

// Run a WHOIS lookup on a domain
extra("whois", "azazelm3dj3d.com");
extra("whois", "example.com");

// Attempt to identify an unknown string
extra("identify", "UCrlEbqe4ppk5dVIHzdxtC7g");
Expand Down Expand Up @@ -175,15 +175,15 @@ mercy -m ip -p internal_ip

Quickly check if a domain is malicious.
```bash
mercy -m mal -p status -i "azazelm3dj3d.com"
mercy -m mal -p status -i "example.com"
```

Extract a zip file.
```bash
mercy -m zip_e -p zip -i "/Users/name/Downloads/archive.zip"
```

If you're stuck, you can use this option to learn every command at your disposal from [Mercy](https://github.com/azazelm3dj3d/mercy):
If you're stuck, you can use this option to learn every command at your disposal from [Mercy](https://github.com/battleoverflow/mercy):
```bash
mercy -e
```
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
//!
/*
Project: Mercy (https://github.com/azazelm3dj3d/mercy)
Author(s): azazelm3dj3d (https://github.com/azazelm3dj3d)
Project: Mercy (https://github.com/battleoverflow/mercy)
Author(s): battleoverflow (https://github.com/battleoverflow)
License: BSD 2-Clause
*/

Expand Down Expand Up @@ -65,8 +65,8 @@ use mailparse::*;

/// Learn more about the crate
pub fn source() -> String {
const VERSION: &str = "2.0.1";
const AUTHOR: &str = "azazelm3dj3d (https://github.com/azazelm3dj3d)";
const VERSION: &str = "2.0.2";
const AUTHOR: &str = "battleoverflow (https://github.com/battleoverflow)";
return format!("Author: {}\nVersion: {}\nDocumentation: https://docs.rs/crate/mercy/latest", AUTHOR, VERSION);
}

Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
//!
/*
Project: Mercy (https://github.com/azazelm3dj3d/mercy)
Author(s): azazelm3dj3d (https://github.com/azazelm3dj3d)
Project: Mercy (https://github.com/battleoverflow/mercy)
Author(s): battleoverflow (https://github.com/battleoverflow)
License: BSD 2-Clause
*/

Expand Down
2 changes: 1 addition & 1 deletion tests/assets/test.hex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
azazelm3dj3d
battleoverflow
16 changes: 8 additions & 8 deletions tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ use mercy;

#[test]
fn decodes_values() {
assert_eq!(mercy::decode("base64", "YXphemVsbTNkajNk"), "azazelm3dj3d");
assert_eq!(mercy::decode("rot13", "nmnmryz3qw3q"), "azazelm3dj3d");
assert_eq!(mercy::decode("base64", "YmF0dGxlb3ZlcmZsb3c="), "battleoverflow");
assert_eq!(mercy::decode("rot13", "onggyrbiresybj"), "battleoverflow");
}

#[test]
fn encodes_values() {
assert_eq!(mercy::encode("base64", "azazelm3dj3d"), "YXphemVsbTNkajNk");
assert_eq!(mercy::encode("base64", "battleoverflow"), "YmF0dGxlb3ZlcmZsb3c=");
}

#[test]
fn hashes_values() {
assert_eq!(mercy::hash("sha256", "azazelm3dj3d"), "88172dfbf2e8c6aa00bdbd9611ffc72b3910be1fac0ef2c43196502022df8cfa");
assert_eq!(mercy::hash("md5", "azazelm3dj3d"), "4f85ebc7ef03bf7de13dd609f7b6a637");
assert_eq!(mercy::hash("sha256", "battleoverflow"), "504543ca9f14824a934f7a6e76fac178cbf6652d2589edf664baf6479295a637");
assert_eq!(mercy::hash("md5", "battleoverflow"), "4ce35faf1f8881ef6bfcedbd07e82fd2");
}

/*
Expand All @@ -37,7 +37,7 @@ fn dumps_hex_values() {

#[test]
fn malicious_status_test() {
assert_eq!(mercy::malicious("status", "https://azazelm3dj3d.com"), "No classification available");
assert_eq!(mercy::malicious("status", "https://example.com"), "No classification available");
}

/*
Expand All @@ -46,5 +46,5 @@ fn malicious_status_test() {

#[test]
fn extra_and_experimental_tests() {
assert_eq!(mercy::extra("defang", "https://azazelm3dj3d.com"), "https://azazelm3dj3d[.]com");
}
assert_eq!(mercy::extra("defang", "https://example.com"), "https://example[.]com");
}

0 comments on commit 0aa7f37

Please sign in to comment.