headers and binary discoveries
This commit is contained in:
parent
234f3c4c93
commit
e13723ca68
74
howto.md
74
howto.md
|
@ -1,4 +1,4 @@
|
|||
header
|
||||
mDNS howto Documentation
|
||||
=====
|
||||
|
||||
How to create a JSON file with information about your project:
|
||||
|
@ -10,7 +10,7 @@ How to duplicate DNS crash:
|
|||
|
||||
```
|
||||
>> cd ~/dns_test
|
||||
>> node listen.js
|
||||
>> node listen.jss
|
||||
```
|
||||
Then in another terminal enter:
|
||||
|
||||
|
@ -64,12 +64,70 @@ RangeError: Index out of range
|
|||
which is located in the node.js buffer module. The API is [here](https://nodejs.org/api/buffer.html).
|
||||
|
||||
However, the error we are working with will most likely be dealt with by parsing through the binary
|
||||
and putting it in a format that is acceptable to a custom buffer, since the current buffer.js does
|
||||
doesn't seem to do the trick.
|
||||
and putting it in a format that is acceptable to a custom buffer, since the current buffer.js does doesn't seem to do the trick.
|
||||
|
||||
Binary
|
||||
Using
|
||||
|
||||
When can a Buffer overflow problem occur in js?
|
||||
```javascript
|
||||
function pad(str, len, ch) {
|
||||
|
||||
while (str.length < len) {
|
||||
str = ch + str;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
```
|
||||
the binary output comes out as:
|
||||
|
||||
```
|
||||
11100001
|
||||
10001000
|
||||
00000001
|
||||
00100000
|
||||
00000000
|
||||
00000001
|
||||
00000000
|
||||
00000000
|
||||
00000000
|
||||
00000000
|
||||
00000000
|
||||
00000001
|
||||
00000110
|
||||
01011111
|
||||
01100011
|
||||
01101100
|
||||
01101111
|
||||
01110101
|
||||
01100100
|
||||
00000100
|
||||
01011111
|
||||
01110100
|
||||
01100011
|
||||
01110000
|
||||
00000101
|
||||
01101100
|
||||
01101111
|
||||
01100011
|
||||
01100001
|
||||
01101100
|
||||
00000000
|
||||
00000000
|
||||
00001100
|
||||
00000000
|
||||
00000001
|
||||
00000000
|
||||
00000000
|
||||
00101001
|
||||
00010000
|
||||
00000000
|
||||
00000000
|
||||
00000000
|
||||
00000000
|
||||
00000000
|
||||
00000000
|
||||
00000000
|
||||
```
|
||||
|
||||
|
||||
What are the possible problems?
|
||||
|
@ -84,4 +142,6 @@ socket.on('message', function (message, rinfo) {
|
|||
//console.log(msg.toString('utf8'));
|
||||
|
||||
console.log(message.toString('hex'));
|
||||
```
|
||||
```
|
||||
|
||||
###Objective
|
||||
|
|
Loading…
Reference in New Issue