undergroundwires / privacy.sexy

Open-source tool to enforce privacy & security best-practices on Windows, macOS and Linux, because privacy is sexy
https://privacy.sexy
GNU Affero General Public License v3.0
4.19k stars 176 forks source link

Ideas for cleaner code #143

Open couleurm opened 2 years ago

couleurm commented 2 years ago

Problem description

Repetitive and very long code for disabling services with PowerShell

Proposed solution

Additional information

This is not a clear feature request, I'm just sharing some of my thoughts that you may find useful

undergroundwires commented 2 years ago

Thank you for your feedback. These discussions have real value. Here are my opinions, but do not take my opinions as any decision made or objective truth, but more like my subjective points that can guide the ideas.

Sophia script is a great project that probably does what privacy.sexy is not doing on this matter. We're just solving different problems using different approaches.

couleurm commented 2 years ago

computers that do not allow running PowerShell scripts directly.

Execution policy only annoys you when running .ps1 files, I don't think I need to mention the countless ways to bypass it

I consider offline functions a requirement.

As I said, you can add them up to a single file with CI

Sophia script is a great project

Love farag's project, made this to import it's functions easily


As I'm working on TweakList I asked a friend of mine (@RichardDorian) to make a web-ui similar to privacy.sexy so people can use my module's functions without having to dive into the docs to learn all the syntax,

My functions will have lots of parameters to tune for the user, so I made a second CI script to generate manifests for the documented functions for all the parameters and their quirks.

To generate the GUI my friend places where the JSON values will be put. Then it loops over all manifest values to generate a page for each of them. When the user selects it it'll build up function call with parameters

When exporting it'll have the option to either make a very small online script or to have all the required functions declared in a much longer but offline file

Sharing this since we do something similar, we might give eachother good ideas 👍