realm icon indicating copy to clipboard operation
realm copied to clipboard

Add built-in methods to bytes type

Open nullmonk opened this issue 7 months ago โ€ข 3 comments

Implemented a full set of Python-like built-in methods for the bytes type in eldritch-core. This includes:

  • split, rsplit, splitlines
  • strip, lstrip, rstrip
  • startswith, endswith
  • removeprefix, removesuffix
  • find, index, rfind, rindex
  • count, replace, join, partition, rpartition

All methods were implemented in implants/lib/eldritch/eldritch-core/src/interpreter/methods/bytes.rs and registered in mod.rs. A new test file implants/lib/eldritch/eldritch-core/tests/bytes_methods.rs was added to verify the functionality and ensure no regressions or panics on edge cases.


PR created automatically by Jules for task 15367603936580828145 started by @nullmonk

nullmonk avatar Apr 27 '26 18:04 nullmonk

๐Ÿ‘‹ Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a ๐Ÿ‘€ emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules[bot] avatar Apr 27 '26 18:04 google-labs-jules[bot]

Summary

Tests ๐Ÿ“ Passed โœ… Failed โŒ Skipped โญ๏ธ Other โ“ Flaky ๐Ÿ‚ Duration โฑ๏ธ
3198 3198 0 0 0 0 1ms

Previous Results

Build ๐Ÿ—๏ธ Result ๐Ÿงช Tests ๐Ÿ“ Passed โœ… Failed โŒ Skipped โญ๏ธ Other โ“ Flaky ๐Ÿ‚ Duration โฑ๏ธ
#2308 โœ… 3198 3198 0 0 0 0 1m 12s

Insights

Average Tests per Run Total Flaky Tests Total Failed Slowest Test (p95)
3198 0 0 6m 48s

Test Changes

0 test added, 0 removed

Slowest Tests

Test ๐Ÿ“ Results ๐Ÿ“Š Duration (avg) โฑ๏ธ Duration (p95) โฑ๏ธ
eldritch-libfile: std::list_recent_impl::tests::test_list_recent_default_args 3 4m 45s 6m 48s
eldritch-libfile: std::list_recent_impl::tests::test_list_recent_default_args 3 4m 45s 6m 48s
eldritch-libfile: std::list_recent_impl::tests::test_list_recent_default_args 3 4m 45s 6m 48s
TestPortalDowngrade 1 6.0s 6.0s
TestDockerExecutor_Build_ContextCancellation 1 5.6s 5.6s
eldritch-libsys: std::dll_inject_impl::tests::test_dll_inject_simple 1 5.2s 5.2s
TestInteractiveShell 1 5.0s 5.0s
TestOtherStreamOutput 1 5.0s 5.0s
TestPTYOutputOrdering 1 3.3s 3.3s
TestPTYOutputDelivery 1 3.2s 3.2s

๐ŸŽ‰ No failed tests in this run. | ๐Ÿ‚ No flaky tests in this run.

Github Test Reporter by CTRF ๐Ÿ’š

github-actions[bot] avatar Apr 27 '26 19:04 github-actions[bot]

I think we should add bytes native ways to do these. I ran into this during NCCDC and had to do this weird workaround since I wanted to split on a byte not a string or char.

image

hulto avatar May 01 '26 15:05 hulto