Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maierfelix/Iroh
Dynamic code analysis tool - Exploit, record and analyze running JavaScript
https://github.com/maierfelix/Iroh
Last synced: about 1 month ago
JSON representation
Dynamic code analysis tool - Exploit, record and analyze running JavaScript
- Host: GitHub
- URL: https://github.com/maierfelix/Iroh
- Owner: maierfelix
- License: mit
- Created: 2017-08-09T01:00:44.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-17T15:03:48.000Z (over 6 years ago)
- Last Synced: 2024-10-30T01:37:48.129Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://maierfelix.github.io/Iroh/
- Size: 4.88 MB
- Stars: 926
- Watchers: 33
- Forks: 45
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-github-star - Iroh - Exploit, record and analyze running JavaScript | maierfelix | 915 | (JavaScript)
- dynamic-analysis - Iroh.js
README
☕ Dynamic code analysis for JavaScript
#### Description
Iroh is a dynamic code analysis tool for JavaScript.
Iroh allows to record your code flow in realtime, intercept runtime informations and manipulate program behaviour on the fly.#### What is Dynamic analysis?
Dynamic analysis is in contrast to static analysis (e.g. used in [Babel](//github.com/babel/babel) and [ESlint](//github.com/eslint/eslint)). It allows to collect data which is only available at runtime. Iroh makes it possible to collect type informations of your running program, analyze it's behaviour, capture and manipulate runtime values like parameters or variables - and all this while your code is actually running!
### Getting started
You can learn how to use Iroh [here](//github.com/maierfelix/Iroh/blob/master/GETTING_STARTED.md).
A summary of Iroh's API can be found [here](//github.com/maierfelix/Iroh/blob/master/API.md).
### Installation
````
npm install iroh
````
or alternatively the browser distribution from [here](//cdn.rawgit.com/maierfelix/Iroh/master/dist/iroh-browser.js).### Examples
You can play with some live examples [here](//maierfelix.github.io/Iroh/examples/) and you can clone them from [here](//github.com/maierfelix/Iroh/tree/gh-pages/examples).
Below you can see an example of visualizing captured runtime data. While the code below is running, Iroh feeds us a stream of runtime informations, which we can then visualize within any kind of model. In this case we are using a simple textual model to visualize all ``Iroh.CALLS`` (*function calls*) and ``Iroh.IF`` (*if statements*) of the input code. The code indentation in the output is automatically generated by Iroh too.
#### Input
````js
function factorial(n) {
if (n === 0) return 1;
return n * factorial(n - 1);
};
factorial(3);
````
#### Output
````js
call factorial ( [3] )
call factorial ( [2] )
call factorial ( [1] )
call factorial ( [0] )
if
if end
call factorial end -> [1]
call factorial end -> [1]
call factorial end -> [2]
call factorial end -> [6]
````