Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add sys.write_reg() function to eldritch #387

Merged
merged 22 commits into from
Jan 4, 2024
Merged

add sys.write_reg() function to eldritch #387

merged 22 commits into from
Jan 4, 2024

Conversation

adm1nPanda
Copy link
Collaborator

What type of PR is this?

/kind feature
/kind eldritch-function

What this PR does / why we need it:

Added sys.get_reg() function to eldritch. only installs on windows systems.

$> sys.write_reg("HKEY_CURRENT_USER","SOFTWARE\TEST1","FOO1","REG_SZ","BAR1")
"A new key has been created"
$> sys.write_reg("HKEY_CURRENT_USER","SOFTWARE\TEST1","FOO1","REG_BINARY","DEADBEEF")
"An existing key has been modified"

Which issue(s) this PR fixes:

Fixes #

Copy link
Collaborator

@hulto hulto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple changes.

Copy link

codecov bot commented Dec 17, 2023

Codecov Report

Attention: 113 lines in your changes are missing coverage. Please review.

Comparison is base (4ddf982) 71.13% compared to head (f2447a3) 71.95%.

Files Patch % Lines
...mplants/lib/eldritch/src/sys/write_reg_int_impl.rs 82.69% 36 Missing ⚠️
...mplants/lib/eldritch/src/sys/write_reg_str_impl.rs 82.85% 36 Missing ⚠️
...mplants/lib/eldritch/src/sys/write_reg_hex_impl.rs 83.56% 35 Missing ⚠️
implants/lib/eldritch/src/sys.rs 50.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #387      +/-   ##
==========================================
+ Coverage   71.13%   71.95%   +0.82%     
==========================================
  Files         109      112       +3     
  Lines        8089     8729     +640     
==========================================
+ Hits         5754     6281     +527     
- Misses       2226     2339     +113     
  Partials      109      109              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@hulto hulto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking really good.
Few changes.

@adm1nPanda adm1nPanda requested a review from hulto January 4, 2024 03:15
Copy link
Collaborator

@hulto hulto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!
One note on docs but after that ship it! 🫡

@adm1nPanda adm1nPanda merged commit 4a19ccd into spellshift:main Jan 4, 2024
6 checks passed
KCarretto pushed a commit that referenced this pull request Feb 1, 2024
 
add sys.write_reg() function to eldritch (#387)

* add reg_write function

* clean test function and add docs for write_reg

* implement write_reg function

* write_reg accepts different registry types

* adding more examples for sys.write_reg()

* fix errors from merge conflicts

* add missing import in get_reg

* cleanup and made recommended changes

* fix eldritch docs

* adding write_reg_str, write_reg_int and write_reg_hex functions

* fix missing exposed functions in lib.rs

* split write_reg functions into multiple pages

* change funcs to alphabetical order

* clean up docs for new functions

* fix typo in docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants