Coder Social home page Coder Social logo

m3kh / frontghostinspector Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 16.48 MB

Front~End resources scrambler and inspector.

JavaScript 73.85% ActionScript 0.14% CSS 0.45% Shell 0.60% Python 0.01% HTML 16.94% Makefile 0.18% Batchfile 0.01% Groff 7.84%

frontghostinspector's People

Contributors

m3kh avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

frontghostinspector's Issues

UI

The UI strategy needs to be planed.
I think I will use React.js because I'm familiar with it.

Would be nice even to implement even data binding and so on BackBone and Socket.io.

Once the first prototype is defined we should deploy the

Todo:

Strategies

  • Define strategies for the front and create the first prototype.
  • Create a Backbone.js structure for models and collections and prepare it for the data binding.
  • Create a Socket.io bridge

User Interfaces

  • Create the page for manage website
    • Add website
    • Run the scrambler
  • Prepare an analysis page for the website
  • Prepare to do analysis for single page to website
    • Create analysis for time execution
    • Create analysis for links
    • Create analysis for resources (internals)
    • Create analysis for resources (external)

worker/Ghost.js - The CasperJS

This file is the bridge with the working machine made in javascript.
Basically after a request handled in a controller, we spawn a casperjs. Then from there we comunicate trough ajax call (from now maded inside the PhantomJS).


Api/SomeController/SomeMethod ---- Spawn ---- worker/Ghost.js (CasperJS)

I know sounds wired a Sails.js (node) -> CasperJS -> PhantomJS.
And I know there could be alternatives (jsdom) for extract the data I'm looking for, but I'm preserving the eventuality possibility to inject code to test inside the page. But for a "easy" approach I just taking Caper.js who already dose some of them, Maybe the next clean up would be switch from Casper to some PhantomJs node library.

_Todo:_

  • Decide and consolidate the parameter to pass into the casted CasperJS
  • Decide an approach to manage logins (priority)
  • Define a list of information we want extract from a page and modify the api if is needed (priority)
  • Define better ajax call for save the data and parameters for each steep (priority)
  • Consequential ultimate better model and model relationship and try to fill with query has much sails.js don't allow to. (Try to define a list of cases) (priority)

Scrambler steps and login integration

This is a priority feature should be develop for start to prototype a JS injection in the CasperJS.

Basically the idea is describe the login has a common step has could be for any else action in one of the steps of the scrambler running mode.

So when you start the scrambler in a specific domain he would follow the designed step:

  1. Ask for scan the full site
  2. Get the page
  3. Generate HAR based on load resources
  4. Parse the link and save in the db
  5. Grab <script> tags and save the db
  6. Make the screenshot
  7. Ask to run the scrambler for the next script

So on for create a better designed approach in the full flow would be nice:

  • Define a better and definitive list of action the Scrambler should do.
  • Create a Configuration Model for each website/page/resource or even steps.
    Important: Is really important to define a design with the properties of polymorphism and inheritance for get a solution is good for any kind of action.
  • Create a Configuration panel for fill the js actions should be done in the scrambler
  • Create a first prototype of step has a login, this configuration should be default for all the website and should be just enabled from UI. Indeed we should reserve the possibility to overwrite instruction there.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.