Skip to content
This repository has been archived by the owner on Jul 27, 2024. It is now read-only.

Add an option to ignore user defined packages #65

Conversation

Elyorbe
Copy link
Contributor

@Elyorbe Elyorbe commented Dec 7, 2020

Hi, thanks for the nice work. I would like to contribute to the project.

Problem: Some developer defined classes may need to be ignored when obfuscating. For example, the class needs to be left untouched when it is used for marshalling.

Solution: Adding an option to ignore user defined packages is needed.

Current commit adds an option to take a file, which lists packages to ignore, as a parameter. For example, if the file lists these package names

tech.ibrokhimov.dontobfuscate
tech.ibrokhimov.ignore

Obfuscapk ignores all the classes inside those packages. This is effective for field, class, and method rename options.

@ClaudiuGeorgiu
Copy link
Owner

Hi @Elyorbe, thanks for your interest in this project and for the contribution, I think it will be a useful feature. Please fix the tests and add a brief paragraph in the readme describing how to use this new feature, then I'll review and merge the PR. Thanks!

@codecov
Copy link

codecov bot commented Dec 17, 2020

Codecov Report

Merging #65 (e62aebd) into master (d2f528b) will increase coverage by 0.25%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #65      +/-   ##
==========================================
+ Coverage   77.53%   77.78%   +0.25%     
==========================================
  Files          49       49              
  Lines        2435     2449      +14     
  Branches      485      484       -1     
==========================================
+ Hits         1888     1905      +17     
+ Misses        423      416       -7     
- Partials      124      128       +4     
Impacted Files Coverage Δ
src/obfuscapk/main.py 95.45% <ø> (ø)
src/obfuscapk/obfuscation.py 83.92% <50.00%> (-1.10%) ⬇️
...fuscapk/obfuscators/method_rename/method_rename.py 85.91% <66.66%> (+0.40%) ⬆️
...obfuscapk/obfuscators/field_rename/field_rename.py 81.81% <72.72%> (-1.52%) ⬇️
src/obfuscapk/cli.py 88.37% <100.00%> (-4.13%) ⬇️
...obfuscapk/obfuscators/class_rename/class_rename.py 86.11% <100.00%> (+0.29%) ⬆️
...c/obfuscapk/obfuscators/virus_total/virus_total.py 33.33% <0.00%> (+5.55%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d2f528b...e62aebd. Read the comment docs.

@Elyorbe
Copy link
Contributor Author

Elyorbe commented Dec 17, 2020

Hi @Elyorbe, thanks for your interest in this project and for the contribution, I think it will be a useful feature. Please fix the tests and add a brief paragraph in the readme describing how to use this new feature, then I'll review and merge the PR. Thanks!

I fixed all except Codacy test, couldn't figure out how to make it happy. Failing test case is related to readme. I think you can help me with that part. Please review the changes. Thanks!

@ClaudiuGeorgiu ClaudiuGeorgiu merged commit d2626d8 into ClaudiuGeorgiu:master Dec 17, 2020
@ClaudiuGeorgiu
Copy link
Owner

Thanks for the contribution @Elyorbe!

@Elyorbe
Copy link
Contributor Author

Elyorbe commented Dec 17, 2020

Happy to be a part of the project even with small contribution!

@Elyorbe Elyorbe deleted the add-user-defined-option-to-ignore-packages branch December 18, 2020 02:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants