Skip to content

Commit 3479d87

Browse files
authored
Update README.md
1 parent 95c6781 commit 3479d87

File tree

1 file changed

+6
-27
lines changed

1 file changed

+6
-27
lines changed

README.md

Lines changed: 6 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,30 @@
44
<img width=200px src='.github/logo.png?raw=true'>
55

66
<h1>moduleRaid</h1>
7-
<p>moduleRaid is a utility to get modules and module constructors from <code>webpackJsonp</code> functions embedded on websites by Webpack. It also provides functions to search through returned modules.</p>
7+
<p>moduleRaid is a utility to get modules from <code>webpackChunkbuild</code> functions embedded on WhatsApp Web. It also provides functions to search through returned modules.</p>
88
</div>
99

1010
<h2 align='center'>Installation</h2>
1111

1212
You can get moduleRaid over npm
1313

1414
```
15-
$ npm install moduleraid
15+
$ npm install @pedroslopez/moduleRaid
1616
```
1717

1818
Or if you directly want to use it in the browser
1919

2020
```html
21-
<script src="https://unpkg.com/[email protected]/moduleraid.js"></script>
22-
<!-- minified -->
23-
<script src="https://unpkg.com/[email protected]/moduleraid.min.js"></script>
21+
<script src="https://unpkg.com/@pedroslopez/moduleraid@latest/moduleraid.js"></script>
2422
```
2523

26-
Alternatively, just copy the script from `moduleraid.js` and run it in a devtool console
27-
on the site of your choosing.
24+
Alternatively, just copy the script from `moduleraid.js` and run it in a devtool console.
2825

2926
<h2 align='center'>Usage</h2>
3027

3128
### Preparation
3229

33-
Using `moduleRaid` as a module, simply require and execute it somewhere where it will end up as a public facing script on a page that also
34-
includes a Webpack build!
30+
Using `moduleRaid` as a module, simply require and execute it somewhere where it will end up as a public facing script
3531

3632
```js
3733
const moduleRaid = require('moduleraid')
@@ -63,23 +59,6 @@ If you call moduleRaid with an optional argument `true`, you will enable debug o
6359
In the version that is minified and you can't just add another argument easily, simply run `window.mRdebug = true` before adding the script and you should
6460
be fine!
6561

66-
<h2 align='center'>How it works</h2>
67-
68-
There already was a script basically doing the same as `moduleRaid` some months earlier, called [`webcrack`](https://gist.github.com/no-boot-device/cb63762000e606e50690911cac1bcead) (made by [no-boot-device](https://github.com/no-boot-device)), which was rendered obsolute due to structural changes in how you can access Webpack modules from the outside.
69-
70-
This library is an effort to bring back the ability to inspect all available modules, for debugging or userscript purposes.
71-
72-
As noted above, Webpack exposes a function `webpackJsonp` containing all the code that has been bundled with Webpack. The function takes three
73-
parameters, all of them being an array. The first two don't seem to really matter, the last one is interesting, it seems to directly return
74-
a module given an index.
75-
76-
So, in a brute-forcy manner we simply run a `while` over `webpackJsonp([], [], [i])` until we get an exception from Webpack (trying to run `call`
77-
on `undefined`), and now we have all modules (_or most of them_)!
78-
79-
<h2 align='center'>Known Issues</h2>
80-
81-
* There seem to be a lot of empty modules, I'm not sure if these are _padding_ or something is missing here
82-
8362
<h2 align='center'>License</h2>
8463

85-
moduleRaid is licensed under the MIT License
64+
moduleRaid is licensed under the MIT License

0 commit comments

Comments
 (0)