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

~/.polymorph dir //WIP #3

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open

Conversation

XaviTorello
Copy link

@XaviTorello XaviTorello commented Oct 5, 2018

Use ~/.polymorph dir

// Do not merge, the idea is to integrate it into a devel branch and keep working on it, but I can just PR to master.

This improves Polymorph to be able to store all files (conditions, templates, temps, ...) inside a $home based polymorph directory.

By default this points to ~/.polymorph, and at init time it ensures that the needed structure exists

In this case, we validate:

- ~/.polymorph
- ~/.polymorph/conditions
- ~/.polymorph/templates
- ~/.polymorph/conditions/executions
- ~/.polymorph/conditions/postconditions
- ~/.polymorph/conditions/preconditions

New settings class supports us to set library based properties and prerequisites.

It adapts all IO operations to use new settings.paths

It also provides a new way to perform hot module loading based on the imp library, see new method utils.import_file

Additionally, templates save process ensures that .json extension is included, and dumps the template to the templates folder ~/.polymorph/templates.


WIP, some things to do

  • validate and test using all support py versions (2.7, 3.4, 3.6, 3.7, ...)
  • review pcap creation and loading
  • analyze other possible IO
  • test Windows, MacOS, ...
  • manage lack of permisions to write on home
    • go to /tmp?

Will fix #2

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.

Register / inject external conditions
1 participant