From a0c2c3df6963899f62257f273e5243b339005eea Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Fri, 12 Jun 2026 08:27:20 +0000 Subject: [PATCH] [AI] Fix Typos Co-authored-by: KCarretto <16250309+KCarretto@users.noreply.github.com> --- bin/reflective_loader/Cargo.toml | 2 +- bin/reflective_loader/src/loader.rs | 6 +++--- implants/Cargo.toml | 2 +- implants/golem/src/main.rs | 2 +- implants/golem/tests/cli.rs | 2 +- .../eldritch/eldritch-core/src/interpreter/introspection.rs | 2 +- .../lib/eldritch/stdlib/eldritch-libassets/src/std/mod.rs | 2 +- .../eldritch/stdlib/eldritch-libpivot/src/std/ncat_impl.rs | 2 +- .../stdlib/eldritch-libpivot/src/std/port_scan_impl.rs | 2 +- .../stdlib/eldritch-libpivot/src/std/ssh_copy_impl.rs | 2 +- implants/lib/transport/Cargo.toml | 2 +- tavern/app.go | 2 +- tavern/internal/c2/api_claim_tasks.go | 1 - tavern/internal/cdn/download_screenshot_test.go | 4 ++-- tavern/internal/ent/enttest/testdb.go | 2 +- tavern/internal/http/shell/websocket.go | 2 +- tavern/internal/redirectors/quic/quic_test.go | 2 +- tavern/test_data_test.go | 2 +- tavern/tomes/file_tree/main.eldritch | 4 ++-- tavern/tomes/git.go | 2 +- tavern/tomes/netstat/main.eldritch | 2 +- 21 files changed, 24 insertions(+), 25 deletions(-) diff --git a/bin/reflective_loader/Cargo.toml b/bin/reflective_loader/Cargo.toml index e9911187b..36a261f7e 100644 --- a/bin/reflective_loader/Cargo.toml +++ b/bin/reflective_loader/Cargo.toml @@ -17,7 +17,7 @@ edition = "2021" crate-type = ["cdylib"] [profile.dev] -opt-level = "z" # This reduces the numebr of symbols not found. +opt-level = "z" # This reduces the number of symbols not found. lto = true codegen-units = 1 panic = "abort" diff --git a/bin/reflective_loader/src/loader.rs b/bin/reflective_loader/src/loader.rs index 90c387674..953051905 100644 --- a/bin/reflective_loader/src/loader.rs +++ b/bin/reflective_loader/src/loader.rs @@ -160,7 +160,7 @@ struct PeFileHeaders64 { section_headers: [IMAGE_SECTION_HEADER; MAX_PE_SECTIONS], } -// Pares the PE file from a series of bytes +// Parses the PE file from a series of bytes #[cfg(target_arch = "x86_64")] impl PeFileHeaders64 { fn new(dll_bytes_ptr: *mut c_void) -> Self { @@ -390,7 +390,7 @@ fn process_import_address_tables( function_ordinal_ptr, ) as _; } else { - // Calculate a refernce to the function name by adding the dll_base and name's RVA. + // Calculate a reference to the function name by adding the dll_base and name's RVA. let image_import_ptr: *mut IMAGE_IMPORT_BY_NAME = (new_dll_base as usize + unsafe { library_thunk.u1.AddressOfData } as usize) as *mut IMAGE_IMPORT_BY_NAME; @@ -819,7 +819,7 @@ mod tests { assert_eq!(base_reloc_entry.reloc_type, 0xa); } - // PE Headers change everytime create file dll is built + // PE Headers change every time create file dll is built // #[test] // fn test_reflective_loader_parse_pe_headers() -> () { diff --git a/implants/Cargo.toml b/implants/Cargo.toml index 7d2c67013..7c7de1dd3 100644 --- a/implants/Cargo.toml +++ b/implants/Cargo.toml @@ -119,7 +119,7 @@ rand_chacha = { version = "0.3.1", default-features = false, features = ["std"]} regex = { version = "1.5.5", default-features = false} reqwest = { version = "0.12.15", default-features = false } russh = "0.37.1" -russh-sftp = "=2.0.8" # `thiserror` dependcy in older versions causes downstream issues in other libraries. +russh-sftp = "=2.0.8" # `thiserror` dependency in older versions causes downstream issues in other libraries. russh-keys = "0.37.1" rustls = "0.23" quinn = { version = "0.11", default-features = false, features = ["ring", "runtime-tokio"] } diff --git a/implants/golem/src/main.rs b/implants/golem/src/main.rs index b2f41503f..d7ec07839 100644 --- a/implants/golem/src/main.rs +++ b/implants/golem/src/main.rs @@ -143,7 +143,7 @@ fn main() -> anyhow::Result<()> { }); } } - // If we havent specified tomes in INPUT, we need to look through the asset locker for tomes to run + // If we haven't specified tomes in INPUT, we need to look through the asset locker for tomes to run if parsed_tomes.is_empty() { match locker.list() { Ok(assets) => { diff --git a/implants/golem/tests/cli.rs b/implants/golem/tests/cli.rs index 4d0cb8ac4..6bdcc2af6 100644 --- a/implants/golem/tests/cli.rs +++ b/implants/golem/tests/cli.rs @@ -70,7 +70,7 @@ fn test_golem_main_loaded_files() -> anyhow::Result<()> { // Test running `./golem -a ../../bin/golem_cli_test/ -e` // NOTE: Depending on how this test is run, the commands may not actually be run -// therefor we only test the output of eldritch and not the stdlib +// therefore we only test the output of eldritch and not the stdlib #[test] fn test_golem_main_loaded_and_embdedded_files() -> anyhow::Result<()> { let mut cmd = Command::new(cargo_bin!("golem")); diff --git a/implants/lib/eldritch/eldritch-core/src/interpreter/introspection.rs b/implants/lib/eldritch/eldritch-core/src/interpreter/introspection.rs index 9b4547ea7..8161a7aec 100644 --- a/implants/lib/eldritch/eldritch-core/src/interpreter/introspection.rs +++ b/implants/lib/eldritch/eldritch-core/src/interpreter/introspection.rs @@ -126,7 +126,7 @@ pub fn find_best_match(target: &str, candidates: &[String]) -> Option { // Threshold logic: // Allow a distance of up to 4, or half the string length + 1. // This allows "config" (6) -> "get_config" (10) (dist 4, threshold 4) - // "apend" (5) -> "append" (6) (dist 1, threshold 3) + // "append" (5) -> "append" (6) (dist 1, threshold 3) let threshold = (target.len() / 2 + 1).clamp(1, 4); for candidate in candidates { diff --git a/implants/lib/eldritch/stdlib/eldritch-libassets/src/std/mod.rs b/implants/lib/eldritch/stdlib/eldritch-libassets/src/std/mod.rs index c99e0cf0b..a4e6cc62f 100644 --- a/implants/lib/eldritch/stdlib/eldritch-libassets/src/std/mod.rs +++ b/implants/lib/eldritch/stdlib/eldritch-libassets/src/std/mod.rs @@ -148,7 +148,7 @@ impl StdAssetsLibrary { // Make a hashset of the new asset names let new_assets: HashSet = backend.assets().into_iter().map(Cow::into_owned).collect(); - // See if any name overlap with existin assets + // See if any name overlap with existing assets let colliding_names: Vec<&str> = self .asset_names .intersection(&new_assets) diff --git a/implants/lib/eldritch/stdlib/eldritch-libpivot/src/std/ncat_impl.rs b/implants/lib/eldritch/stdlib/eldritch-libpivot/src/std/ncat_impl.rs index 2d29ed646..94d45ccfc 100644 --- a/implants/lib/eldritch/stdlib/eldritch-libpivot/src/std/ncat_impl.rs +++ b/implants/lib/eldritch/stdlib/eldritch-libpivot/src/std/ncat_impl.rs @@ -19,7 +19,7 @@ async fn handle_ncat(address: String, port: i32, data: String, protocol: String) // Connect to remote host let mut connection = TcpStream::connect(&address_and_port).await?; - // Write our meessage + // Write our message connection.write_all(data.as_bytes()).await?; // Read server response diff --git a/implants/lib/eldritch/stdlib/eldritch-libpivot/src/std/port_scan_impl.rs b/implants/lib/eldritch/stdlib/eldritch-libpivot/src/std/port_scan_impl.rs index 38d9241cc..572a43b57 100644 --- a/implants/lib/eldritch/stdlib/eldritch-libpivot/src/std/port_scan_impl.rs +++ b/implants/lib/eldritch/stdlib/eldritch-libpivot/src/std/port_scan_impl.rs @@ -402,7 +402,7 @@ async fn handle_port_scan( let mut result: Vec<(String, i32, String, String)> = vec![]; // Await results of each job. - // We are not acting on scan results indepently so it's okay to loop through each and only return when all have finished. + // We are not acting on scan results independently so it's okay to loop through each and only return when all have finished. for task in all_scan_futures { match task.await? { Ok(res) => { diff --git a/implants/lib/eldritch/stdlib/eldritch-libpivot/src/std/ssh_copy_impl.rs b/implants/lib/eldritch/stdlib/eldritch-libpivot/src/std/ssh_copy_impl.rs index 2d884e69c..834550988 100644 --- a/implants/lib/eldritch/stdlib/eldritch-libpivot/src/std/ssh_copy_impl.rs +++ b/implants/lib/eldritch/stdlib/eldritch-libpivot/src/std/ssh_copy_impl.rs @@ -244,7 +244,7 @@ mod tests { offset: u64, data: Vec, ) -> Result { - //Warning this will only write one chunk - subsequesnt chunks will overwirte the old ones. + //Warning this will only write one chunk - subsequesnt chunks will overwrite the old ones. // Tests over the size of the chunk will fail let tmp_data = String::from_utf8(data).unwrap(); fs::write(handle, tmp_data.trim_end_matches(char::from(0))).unwrap(); diff --git a/implants/lib/transport/Cargo.toml b/implants/lib/transport/Cargo.toml index 361a8dd0c..d00c02f86 100644 --- a/implants/lib/transport/Cargo.toml +++ b/implants/lib/transport/Cargo.toml @@ -34,7 +34,7 @@ http = { workspace = true } tower = { workspace = true } # Use hyper 1.x for grpc hyper = { workspace = true, features = ["client"] } -# These crates are kinda funky gonna keep them in just transprot for now. +# These crates are kinda funky gonna keep them in just transport for now. hyper_legacy = { package = "hyper", version = "0.14", features = ["client", "http1", "http2", "stream"] } hyper-util = { version = "0.1", features = ["client", "client-legacy", "http1", "http2"] } hyper-rustls = { version = "0.27", default-features = false, features = ["webpki-tokio", "http2"] } diff --git a/tavern/app.go b/tavern/app.go index 7508fac9c..793ceb2dd 100644 --- a/tavern/app.go +++ b/tavern/app.go @@ -45,8 +45,8 @@ import ( tavernmcp "realm.pub/tavern/internal/mcp" "realm.pub/tavern/internal/portals" "realm.pub/tavern/internal/portals/mux" - "realm.pub/tavern/internal/portals/ssh" "realm.pub/tavern/internal/portals/pty" + "realm.pub/tavern/internal/portals/ssh" "realm.pub/tavern/internal/redirectors" "realm.pub/tavern/internal/scheduler" "realm.pub/tavern/internal/secrets" diff --git a/tavern/internal/c2/api_claim_tasks.go b/tavern/internal/c2/api_claim_tasks.go index 849ea2841..d82014fc0 100644 --- a/tavern/internal/c2/api_claim_tasks.go +++ b/tavern/internal/c2/api_claim_tasks.go @@ -494,4 +494,3 @@ func (srv *Server) ClaimTasks(ctx context.Context, req *c2pb.ClaimTasksRequest) // Return claimed tasks return &resp, nil } - diff --git a/tavern/internal/cdn/download_screenshot_test.go b/tavern/internal/cdn/download_screenshot_test.go index 12256728d..e36202438 100644 --- a/tavern/internal/cdn/download_screenshot_test.go +++ b/tavern/internal/cdn/download_screenshot_test.go @@ -67,8 +67,8 @@ func TestDownloadScreenshot(t *testing.T) { wantBody: []byte(fmt.Sprintf("%s\n", cdn.ErrInvalidFileID.Error())), }, { - name: "Cached", - reqURL: fmt.Sprintf("/download/%d", existingScreenshot.ID), + name: "Cached", + reqURL: fmt.Sprintf("/download/%d", existingScreenshot.ID), wantStatus: cdn.ErrFileNotModified.StatusCode, wantBody: []byte(fmt.Sprintf("%s\n", cdn.ErrFileNotModified.Error())), }, diff --git a/tavern/internal/ent/enttest/testdb.go b/tavern/internal/ent/enttest/testdb.go index c764cb2fe..9410d8c1f 100644 --- a/tavern/internal/ent/enttest/testdb.go +++ b/tavern/internal/ent/enttest/testdb.go @@ -5,8 +5,8 @@ import ( "os" "testing" - "realm.pub/tavern/internal/ent" entsql "entgo.io/ent/dialect/sql" + "realm.pub/tavern/internal/ent" // The mattn driver _ "github.com/mattn/go-sqlite3" diff --git a/tavern/internal/http/shell/websocket.go b/tavern/internal/http/shell/websocket.go index c27bdf9be..9da688ed0 100644 --- a/tavern/internal/http/shell/websocket.go +++ b/tavern/internal/http/shell/websocket.go @@ -39,7 +39,7 @@ const ( type WebsocketControlFlowSignal string // WebsocketControlFlowSignalPortalUpgrade indicates that the connection has been upgraded to use a portal for interactivity. -// WebsocketControlFlowSignalPortalDowngrade indicates that the connection has been downgraded to a non-interactive polling model, indicating that the portal has closed or is unuseable. +// WebsocketControlFlowSignalPortalDowngrade indicates that the connection has been downgraded to a non-interactive polling model, indicating that the portal has closed or is unusable. const ( WebsocketControlFlowSignalPortalUpgrade = "PORTAL_UPGRADE" WebsocketControlFlowSignalPortalDowngrade = "PORTAL_DOWNGRADE" diff --git a/tavern/internal/redirectors/quic/quic_test.go b/tavern/internal/redirectors/quic/quic_test.go index 736071402..208e24395 100644 --- a/tavern/internal/redirectors/quic/quic_test.go +++ b/tavern/internal/redirectors/quic/quic_test.go @@ -113,7 +113,7 @@ func TestRedirector_QUIC_UnaryAndStreaming(t *testing.T) { // 2. Setup the QUIC redirector redirecter := &quicRedirector.Redirector{} - + // Create UDP listener to find a free port conn, err := net.ListenUDP("udp", &net.UDPAddr{IP: net.ParseIP("127.0.0.1"), Port: 0}) require.NoError(t, err) diff --git a/tavern/test_data_test.go b/tavern/test_data_test.go index dae4cec2e..f8181dcc0 100644 --- a/tavern/test_data_test.go +++ b/tavern/test_data_test.go @@ -14,7 +14,7 @@ import ( // TestCreateTestData ensures createTestData runs without error and creates at least one beacon. func TestCreateTestData(t *testing.T) { var ( - ctx = context.Background() + ctx = context.Background() ) graph := enttest.OpenTempDB(t) defer graph.Close() diff --git a/tavern/tomes/file_tree/main.eldritch b/tavern/tomes/file_tree/main.eldritch index 3d2f236e5..b7280c420 100644 --- a/tavern/tomes/file_tree/main.eldritch +++ b/tavern/tomes/file_tree/main.eldritch @@ -22,14 +22,14 @@ def can_read(f): # Are we root? root = usernfo["euid"]["uid"] == 0 - # If the user isnt root and the user doesnt own the file, clear the user byte + # If the user isn't root and the user doesn't own the file, clear the user byte if not root and f["owner"] not in (usernfo["euid"]["name"], usernfo["uid"]["name"]): f_user = 0 # TODO: https://github.com/spellshift/realm/issues/570 # Will NOT match any group other than primary until #570 is fixed - # If the user isnt root and the group doesnt own the file, clear the group byte + # If the user isn't root and the group doesn't own the file, clear the group byte if not root and f["group"] not in (str(usernfo["egid"]), str(usernfo["gid"])): f_group = 0 diff --git a/tavern/tomes/git.go b/tavern/tomes/git.go index 852060ff8..5908c3797 100644 --- a/tavern/tomes/git.go +++ b/tavern/tomes/git.go @@ -286,7 +286,7 @@ func findTomePaths(tree *object.Tree) ([]string, error) { return tomePaths, nil } -// parseNamespaceFromGit attempts to return a shortend namespace for the tome based on the git URL. +// parseNamespaceFromGit attempts to return a shortened namespace for the tome based on the git URL. // If it cannot or something goes wrong, this will return the provided git URL as the namespace. func parseNamespaceFromGit(gitURLStr string) string { gitURL, err := url.Parse(gitURLStr) diff --git a/tavern/tomes/netstat/main.eldritch b/tavern/tomes/netstat/main.eldritch index b1a456534..e5d5c65bd 100644 --- a/tavern/tomes/netstat/main.eldritch +++ b/tavern/tomes/netstat/main.eldritch @@ -23,7 +23,7 @@ def netstat(): for p in process.list(): pids[p['pid']] = p['name'] - # Counts for dynamic column formating + # Counts for dynamic column formatting counts = [6, 6, 7, 6, 8] rows = [["PROTO", "LOCAL", "REMOTE", "STATE", "PROCESS"]] # Loop through each net result and format the columns