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

Update README.md #26

Merged
merged 1 commit into from
Sep 4, 2021
Merged

Update README.md #26

merged 1 commit into from
Sep 4, 2021

Conversation

EONRaider
Copy link
Contributor

Add instructions for usage with Docker image

Add instructions for usage with Docker image
@nikitastupin
Copy link
Owner

Perfect! Thanks! 🎊

@nikitastupin nikitastupin merged commit 33da27e into nikitastupin:main Sep 4, 2021
@EONRaider
Copy link
Contributor Author

Glad it worked. Is the project open to contributions to the code base itself?

I think there may be a thing or two I can help with.

In fact, this tool could do more than just mapping the scheme but also proceed to exploitation.

@nikitastupin
Copy link
Owner

nikitastupin commented Sep 4, 2021

It's a privilege for me to receive your contributions and suggestions. Let's discuss your ideas! We can do it in a new issue, in Twitter (@_nikitastupin) / Telegram (@nikitastupin) DMs or even right here!

I personally favor "do one thing and do it well" approach in programming. In this way a program becomes a building block for users. Users can then use a combination of programs that fits their needs the best, without a need to implement the same thing. There are other pros as well as cons to this approach.

It was an approach I've chosen for clairvoyance (at least "do one thing" part). One can use clairvoyance for the case when Introspection is disabled, obtain a schema and then use this schema with any other tool you want.

So I see at least three options here:

  • To split clairvoyance to importable module and CLI. Thus any other project can import clairvoyance as a module and benefit from not implementing the same thing from scratch. Specifically, you may start a project that combines your ideas and clairvoyance.
  • Change the approach for clairvoyance and make it more general tool.
  • There are other great tools (e.g. InQL), may be your ideas will fit better in them.

Anyways I suggest to discuss your ideas and then make a decision 😃

@EONRaider
Copy link
Contributor Author

That's nice. I think this one is a good approach:

* To split clairvoyance to importable module and CLI. Thus any other project can import clairvoyance as a module and benefit from not implementing the same thing from scratch.  Specifically, you may start a project that combines your ideas and clairvoyance.

It would be necessary to somehow structure the application to allow it to be pushed to PyPI as a library. With that all one would need to do is to pip install clairvoyance and use it.

This presents a challenge in architecture, though. From what I could get from the code I noticed that it doesn't have an entry point yet and it couples quite heavily the use case of the CLI to the code itself. I'll find a way around this. It's been some time since I wrote a library but I can manage it.

I'll read the code thoroughly and do a first PR just fixing formatting and maybe adding more specific function and class signatures. It's not a refactoring as it won't be intended to modify any functionality. This way I can understand each line before trying to modify anything.

In the long run, after having this tool zeroed in, we can maybe start another project that expands into exploitation too.

@nikitastupin
Copy link
Owner

Great! Let's try it 😄

If you'll have any questions regarding the code you can ask me and I'll do my best to provide an answer. There is also https://github.com/nikitastupin/clairvoyance/wiki/Development page that describes the project a little bit (mostly theoretical though).

I suppose there is also a quick-and-dirty way to decouple CLI and the code: we can wrap (with some modifications) this https://github.com/nikitastupin/clairvoyance/blob/main/clairvoyance/__main__.py#L77-L113 code to a function and this function together with oracle.py and clairvoyance.py will become a library. However, I'm not sure that it'll work. Moreover, it'll be really great to give my spaghetti code a better shape because it is a major obstacle to improvements (e.g. #15 was really hard to do and not yet finished).

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