Coder Social home page Coder Social logo

cap's Introduction

Description

A cross-platform binding for performing packet capturing with node.js.

Build Status Build status

Requirements

Install

npm install cap

Examples

  • Capture and decode all outgoing TCP data packets destined for port 80 on the interface for 192.168.0.10:
var Cap = require('cap').Cap;
var decoders = require('cap').decoders;
var PROTOCOL = decoders.PROTOCOL;

var c = new Cap();
var device = Cap.findDevice('192.168.0.10');
var filter = 'tcp and dst port 80';
var bufSize = 10 * 1024 * 1024;
var buffer = Buffer.alloc(65535);

var linkType = c.open(device, filter, bufSize, buffer);

c.setMinBytes && c.setMinBytes(0);

c.on('packet', function(nbytes, trunc) {
  console.log('packet: length ' + nbytes + ' bytes, truncated? '
              + (trunc ? 'yes' : 'no'));

  // raw packet data === buffer.slice(0, nbytes)

  if (linkType === 'ETHERNET') {
    var ret = decoders.Ethernet(buffer);

    if (ret.info.type === PROTOCOL.ETHERNET.IPV4) {
      console.log('Decoding IPv4 ...');

      ret = decoders.IPV4(buffer, ret.offset);
      console.log('from: ' + ret.info.srcaddr + ' to ' + ret.info.dstaddr);

      if (ret.info.protocol === PROTOCOL.IP.TCP) {
        var datalen = ret.info.totallen - ret.hdrlen;

        console.log('Decoding TCP ...');

        ret = decoders.TCP(buffer, ret.offset);
        console.log(' from port: ' + ret.info.srcport + ' to port: ' + ret.info.dstport);
        datalen -= ret.hdrlen;
        console.log(buffer.toString('binary', ret.offset, ret.offset + datalen));
      } else if (ret.info.protocol === PROTOCOL.IP.UDP) {
        console.log('Decoding UDP ...');

        ret = decoders.UDP(buffer, ret.offset);
        console.log(' from port: ' + ret.info.srcport + ' to port: ' + ret.info.dstport);
        console.log(buffer.toString('binary', ret.offset, ret.offset + ret.info.length));
      } else
        console.log('Unsupported IPv4 protocol: ' + PROTOCOL.IP[ret.info.protocol]);
    } else
      console.log('Unsupported Ethertype: ' + PROTOCOL.ETHERNET[ret.info.type]);
  }
});
  • Send an arbitrary packet: An arp request for example
var Cap = require('cap').Cap;
var c = new Cap();
var device = Cap.findDevice('192.168.1.200');
var filter = 'arp';
var bufSize = 10 * 1024 * 1024;
var buffer = Buffer.alloc(65535);

var linkType = c.open(device, filter, bufSize, buffer);


// To use this example, change Source Mac, Sender Hardware Address (MAC) and Target Protocol address
var buffer = Buffer.from([
    // ETHERNET
    0xff, 0xff, 0xff, 0xff, 0xff,0xff,                  // 0    = Destination MAC
    0x84, 0x8F, 0x69, 0xB7, 0x3D, 0x92,                 // 6    = Source MAC
    0x08, 0x06,                                         // 12   = EtherType = ARP
    // ARP
    0x00, 0x01,                                         // 14/0   = Hardware Type = Ethernet (or wifi)
    0x08, 0x00,                                         // 16/2   = Protocol type = ipv4 (request ipv4 route info)
    0x06, 0x04,                                         // 18/4   = Hardware Addr Len (Ether/MAC = 6), Protocol Addr Len (ipv4 = 4)
    0x00, 0x01,                                         // 20/6   = Operation (ARP, who-has)
    0x84, 0x8f, 0x69, 0xb7, 0x3d, 0x92,                 // 22/8   = Sender Hardware Addr (MAC)
    0xc0, 0xa8, 0x01, 0xc8,                             // 28/14  = Sender Protocol address (ipv4)
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                 // 32/18  = Target Hardware Address (Blank/nulls for who-has)
    0xc0, 0xa8, 0x01, 0xc9                              // 38/24  = Target Protocol address (ipv4)
]);

try {
  // send will not work if pcap_sendpacket is not supported by underlying `device`
  c.send(buffer, buffer.length);
} catch (e) {
  console.log("Error sending packet:", e);
}

// TCPDUMP.  Note: Some values are changed by the network stack when the broadcast arp message is received.
//12:28:33.230319 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.200 tell 192.168.1.199, length 46
//0x0000:  ffff ffff ffff 848f 69b7 3d92 0806 0001  ........i.=.....
//0x0010:  0800 0604 0001 848f 69b7 3d92 c0a8 01c7  ........i.=.....
//0x0020:  0000 0000 0000 c0a8 01c8 0000 0000 0000  ................
//0x0030:  0000 0000 0000 0000 0000 0000            ............
//12:28:33.230336 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.1.200 is-at 74:ea:3a:a3:e6:69, length 28
//0x0000:  848f 69b7 3d92 74ea 3aa3 e669 0806 0001  ..i.=.t.:..i....
//0x0010:  0800 0604 0002 74ea 3aa3 e669 c0a8 01c8  ......t.:..i....
//0x0020:  848f 69b7 3d92 c0a8 01c7                 ..i.=.....
  • List all network devices:
var Cap = require('cap').Cap;

console.dir(Cap.deviceList());

// example output on Linux:
// [ { name: 'eth0',
//     addresses:
//      [ { addr: '192.168.0.10',
//          netmask: '255.255.255.0',
//          broadaddr: '192.168.0.255' } ] },
//   { name: 'nflog',
//     description: 'Linux netfilter log (NFLOG) interface',
//     addresses: [] },
//   { name: 'any',
//     description: 'Pseudo-device that captures on all interfaces',
//     addresses: [] },
//   { name: 'lo',
//     addresses:
//      [ { addr: '127.0.0.1', netmask: '255.0.0.0' },
//        { addr: '::1',
//          netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff' } ],
//     flags: 'PCAP_IF_LOOPBACK' } ]

API

Cap events

  • packet(< integer >nbytes, < boolean >truncated) - A packet nbytes in size was captured. truncated indicates if the entire packet did not fit inside the Buffer supplied to open().

Cap methods

  • (constructor)() - Creates and returns a new Cap instance.

  • open(< string >device, < string >filter, < integer >bufSize, < Buffer >buffer) - (void) - Opens device and starts capturing packets using filter. To see the syntax for filter check pcap-filter man page. bufSize is the size of the internal buffer that libpcap uses to temporarily store packets until they are emitted. buffer is a Buffer large enough to store one packet. If open() is called again without a previous call to close(), an implicit close() will occur first.

  • close() - (void) - Stops capturing.

  • setMinBytes(< integer >nBytes) - (void) - (Windows ONLY) This sets the minimum number of packet bytes that must be captured before the full packet data is made available. If this value is set too high, you may not receive any packets until WinPCap's internal buffer fills up. Therefore it's generally best to pass in 0 to this function after calling open(), despite it resulting in more syscalls.

  • send(< Buffer >buffer[, < integer >nBytes]) - (void) - Sends an arbitrary, raw packet on the opened device. nBytes is the number of bytes in buffer to send (starting from position 0) and defaults to buffer.length.

Cap static methods

  • findDevice([< string >ip]) - mixed - If ip is given, the (first) device name associated with ip, or undefined is returned if not found. If ip is not given, the device name of the first non-loopback device is returned.

  • deviceList() - array - Returns a list of available devices and related information.

Decoders static methods

The following methods are available off of require('cap').decoders. They parse the relevant protocol header and return an object containing the parsed information:

  • Link Layer Protocols

    • Ethernet(< Buffer buf[, < integer >bufOffset=0])
  • Internet Layer Protocols

    • IPV4(< Buffer buf[, < integer >bufOffset=0])

    • IPV6(< Buffer buf[, < integer >bufOffset=0])

    • ICMPV4(< Buffer buf, < integer >nbytes[, < integer >bufOffset=0])

  • Transport Layer Protocols

    • TCP(< Buffer buf[, < integer >bufOffset=0])

    • UDP(< Buffer buf[, < integer >bufOffset=0])

    • SCTP(< Buffer buf, < integer >nbytes[, < integer >bufOffset=0])

cap's People

Contributors

alfred-nsh avatar fragsalat avatar mscdex avatar mwittig avatar pauldorn avatar pratham2003 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cap's Issues

CPU Leak

Hello dear admins ,

There are an issue with CPU . if you handle with the script a big amount of packets , the cpu of the node process start to be fucked . and stay fucked . It should be back to ~ 1 / 3 % of cpu usage , but when a lot of packet come it's come back to like 30% even if no more lot of paquet come. then if receive again a lot of packet = 100% cpu . and stay at 100% even if no more packet come . If you need a test , just handle a DDoS with the node running and look how the process is working ... . It's strange because it's a cpu leak .

Cap with node-weblit

I have some problem with it:

Uncaught node.js Error
Error: Module version mismatch. Expected 13, got 11.
at Module.load (module.js:352:32)
at Function.Module._load (module.js:308:12)
at Module.require (module.js:360:17)
at require (module.js:376:17)
at Object.eval (D:\node\cap\node_modules\cap\lib\Cap.js:3:13)
at Module._compile (module.js:452:26)
at Object.Module._extensions..js (module.js:470:10)
at Module.load (module.js:352:32)
at Function.Module._load (module.js:308:12)
at Module.require (module.js:360:17)

OS : win7 64bit
nodejs: v0.10.25 ia32
python: 2.7.5 32bit

Does this module can't use with node-webkit?
Thanks.

Question: use bufSize or setMinBytes ?

I don't quite understand the difference between the two. Isn't it the same if I set bufSize to 0 and no longer use setMinBytes ?

From the readme:

bufSize is the size of the internal buffer that libpcap uses to temporarily store packets until they are emitted

setMinBytes(< integer >nBytes) - (void) - (Windows ONLY) This sets the minimum number of packet bytes that must be captured before the full packet data is made available. If this value is set too high, you may not receive any packets until WinPCap's internal buffer fills up.

Can you explain a little bit better what they do ?

Thanks for your help

listDevices() - display wifi network

the static listDevices() method currently do not display any wi fi related networks, is it intended behavior or there is any way to show wi-fi connections as well?

Assertion Failed

when i try to run the program system gets crack giving ASSERTION FAILED
capture

About deps/winpcap

On README we can see: For Windows: WinPcap

So, deps/winpcap its just a "layer" to use a "winpcap dll" previously installed on host system?

On windows, do i must to have "winpcap" previously installed? Or "deps/winpcap" should manage it for me?

npm install cap fails

npm

npm ERR! cb() never called!
npm ERR! not ok code 0

npm log

[email protected] install: `node-gyp rebuild`
npm ERR! `sh "-c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is most likely a problem with the cap package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild

Node 0.11 build failure

Build fails targeting node 0.11.13:

gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | darwin | x64
gyp info spawn python
gyp info spawn args [ '/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/dominic/test/cap/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/local/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/dominic/.node-gyp/0.11.13/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/dominic/.node-gyp/0.11.13',
gyp info spawn args   '-Dmodule_root_dir=/Users/dominic/test/cap',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/cap/src/binding.o
../src/binding.cc:65:28: error: no member named 'New' in 'v8::String'
      Address->Set(String::New(key), Undefined());
                   ~~~~~~~~^
../src/binding.cc:67:28: error: no member named 'New' in 'v8::String'
      Address->Set(String::New(key), String::New(address));
                   ~~~~~~~~^
../src/binding.cc:71:21: error: expected class name
class Pcap : public ObjectWrap {
                    ^
../src/binding.cc:80:5: error: unknown type name 'uv_poll_t'
    uv_poll_t poll_handle;
    ^
../src/binding.cc:180:28: error: unknown type name 'uv_poll_t'
    static void cb_packets(uv_poll_t* handle, int status, int events) {
                           ^
../src/binding.cc:194:36: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
    static Handle<Value> New(const Arguments& args) {
                                   ^~~~~~~~~
                                   v8::internal::Arguments
/Users/dominic/.node-gyp/0.11.13/deps/v8/include/v8.h:149:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/binding.cc:213:37: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
    static Handle<Value> Send(const Arguments& args) {
                                    ^~~~~~~~~
                                    v8::internal::Arguments
/Users/dominic/.node-gyp/0.11.13/deps/v8/include/v8.h:149:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/binding.cc:271:37: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
    static Handle<Value> Open(const Arguments& args) {
                                    ^~~~~~~~~
                                    v8::internal::Arguments
/Users/dominic/.node-gyp/0.11.13/deps/v8/include/v8.h:149:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/binding.cc:508:38: error: unknown type name 'Arguments'; did you mean 'v8::internal::Arguments'?
    static Handle<Value> Close(const Arguments& args) {
                                     ^~~~~~~~~
                                     v8::internal::Arguments
/Users/dominic/.node-gyp/0.11.13/deps/v8/include/v8.h:149:7: note: 'v8::internal::Arguments' declared here
class Arguments;
      ^
../src/binding.cc:99:12: error: no member named 'Dispose' in 'v8::Persistent<v8::Function, v8::NonCopyablePersistentTraits<v8::Function> >'
      Emit.Dispose();
      ~~~~ ^
../src/binding.cc:100:12: error: no member named 'Clear' in 'v8::Persistent<v8::Function, v8::NonCopyablePersistentTraits<v8::Function> >'
      Emit.Clear();
      ~~~~ ^
../src/binding.cc:119:9: error: use of undeclared identifier 'Unref'
        Unref();
        ^
../src/binding.cc:128:19: error: calling a protected constructor of class 'v8::HandleScope'
      HandleScope scope;
                  ^
/Users/dominic/.node-gyp/0.11.13/deps/v8/include/v8.h:845:13: note: declared protected here
  V8_INLINE HandleScope() {}
            ^
../src/binding.cc:142:9: error: too few arguments to function call, expected 2, have 1; did you mean '::Pcap::New'?
        Number::New(copy_len),
        ^~~~~~~~~~~
        ::Pcap::New
../src/binding.cc:194:26: note: '::Pcap::New' declared here
    static Handle<Value> New(const Arguments& args) {
                         ^
../src/binding.cc:143:9: error: too few arguments to function call, expected 2, have 1; did you mean '::Pcap::New'?
        Boolean::New(truncated)
        ^~~~~~~~~~~~
        ::Pcap::New
../src/binding.cc:194:26: note: '::Pcap::New' declared here
    static Handle<Value> New(const Arguments& args) {
                         ^
../src/binding.cc:145:16: error: member reference type 'Persistent<v8::Function>' is not a pointer; maybe you meant to use '.'?
      obj->Emit->Call(obj->handle_, 3, emit_argv);
      ~~~~~~~~~^~
               .
../src/binding.cc:145:18: error: no member named 'Call' in 'v8::Persistent<v8::Function, v8::NonCopyablePersistentTraits<v8::Function> >'
      obj->Emit->Call(obj->handle_, 3, emit_argv);
      ~~~~~~~~~  ^
../src/binding.cc:145:28: error: no member named 'handle_' in 'Pcap'
      obj->Emit->Call(obj->handle_, 3, emit_argv);
                      ~~~  ^
../src/binding.cc:184:20: error: use of undeclared identifier 'UV_READABLE'
      if (events & UV_READABLE) {
                   ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/cap/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 13.3.0
gyp ERR! command "node" "/usr/local/bin/node-gyp" "rebuild" "--target=0.11.13"
gyp ERR! cwd /Users/dominic/test/cap
gyp ERR! node -v v0.10.31
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok

Any chance of this module being updated?

Missing instructions for libpcap and libpcap-dev

libpcap was easy to find and install but I can't libpcap-dev, this causes npm install cap to fail on node-gyp.
Can you please add some instructions or links to stable versions of libpcap-dev, I only found versions that failed installation.

Library worked great on Windows, can't wait to run a proper server with it!

Thanks,
Roee

Track Response Time

hey is it possible to get the time when a "connection" is answered? as i see in your samples its just possible to get the time when a packet arrives... but can i also get the time or event when an connection is answered? is this possible somehow? so for example... i want the time between the request of a browser and the reponse from the server.

Trying to sniff ARP packets using cap

Its not an issue . I know u didnt made a code to sniff ARP packets. But actually looking at your decoder file I just made some piece of code to sniff ARP packets but i didn't got output . I will attach code below. please help me if you found any errors.

// Internet Layer Protocols ====================================================
exports.ARP = function(b, offset) {
  offset || (offset = 0);   
  var origoffset = offset, i;
  var ret = {
    info: {
      hardwareAddr: undefined,
      protocol: undefined,
      hdrlen: undefined,
      protlen: undefined,
      opcode: undefined,
      senderMac: undefined,
      senderIp: undefined,
      targetMac: undefined,
      targetIp: undefined,
    },
    hdrlen: undefined,
    offset: undefined
  };
  ret.info.hardwareAddr = b.readUInt16BE(offset, true);
  offset += 2;
  ret.info.protocol = b.readUInt16BE(offset, true);
  offset += 2;
  ret.info.hdrlen = b.readUInt16BE(offset, true);
  offset += 1;
  ret.info.protlen = b.readUInt16BE(offset, true);
  offset += 1;
  ret.info.opcode = b.readUInt16BE(offset, true);
  offset += 2;
  ret.info.senderMac = b.toString('hex', offset, offset + 6);
  offset += 6;
  ret.info.senderIp = b.toString('hex', offset, offset + 4);
  offset += 4;
  ret.info.targetMac = b.toString('hex', offset, offset + 6);
  offset += 6;
  ret.info.targetIp = b.toString('hex', offset, offset + 4);
  offset += 4;
  ret.offset = offset;
  return ret;
};  

Error: %1 is not a valid Win32 application.

D:\nodep\work>node server

module.js:356
  Module._extensions[extension](this, filename);
                               ^
Error: %1 is not a valid Win32 application.
D:\nodep\node_modules\cap\build\Release\cap.node
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (D:\nodep\node_modules\cap\lib\Cap.js:3:13)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)

Compile failure on Windows7 vs 2010

Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
binding.cc
..\src\binding.cc(249): warning C4267: '=' : conversion from 'size_t' to 'unsig
ned int', possible loss of data [c:\Users\Paul Dorn\Workspace\cap\build\cap.vcx
proj]
..\src\binding.cc(336): warning C4353: nonstandard extension used: constant 0 a
s function expression. Use '__noop' function intrinsic instead [c:\Users\Paul
Dorn\Workspace\cap\build\cap.vcxproj]
..\src\binding.cc(387): warning C4344: behavior change: use of explicit templat
e arguments results in call to 'v8::Local NanNewv8::String,char*(A0)' [c:
Users\Paul Dorn\Workspace\cap\build\cap.vcxproj]
with
[
T=v8::String,
A0=char *
]
but the regular function 'v8::Local NanNew(const char *)' is a bet
ter match
with
[
T=v8::String
]
if you expect 'v8::Local NanNew(const char *)' to be called then y
ou need to make it an explicit specialization
with
[
T=v8::String
]
..\src\binding.cc(393): error C2664: 'uv_async_init' : cannot convert parameter
3 from 'void (__cdecl *)(uv_async_t *,int)' to 'uv_async_cb' [c:\Users\Paul Do
rn\Workspace\cap\build\cap.vcxproj]
None of the functions with this name in scope match the target type
gyp ERR! build error
gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (c:\Users\Paul Dorn\AppData\Roaming\np
m\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:110:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1067
:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "c:\Program Files\nodejs\node.exe" "c:\Users\Paul Dorn\Ap
pData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd c:\Users\Paul Dorn\Workspace\cap
gyp ERR! node -v v0.12.0
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok

I'm looking at what might have caused this but it will take some time since I need to wrap my head around NAN.

Error on tests

When i executed your tests or your exampled i get this error. And the build in https://ci.appveyor.com/project/mscdex/cap fail too

TypeError: device must be a string
at TypeError (native)
at Object. (D:\Mis Cosas\Sistema\perfil\Escritorio\sniff\main.js:
11:18)
at Module._compile (module.js:398:26)
at Object.Module._extensions..js (module.js:405:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Function.Module.runMain (module.js:430:10)
at startup (node.js:141:18)
at node.js:980:3

i use windows and the last winpcap installed today and use nodejs v5.3.0

thanks!! very usefull lib

Decoding Long TCP Packets

Firstly thanks for the great library, very helpful!

I'm feeding in data captured from Wireshark, and I've found that large packets (in this case over 60,000 bytes) aren't being decoded correctly. Small packets work as expected.

In the example below, the return value from decoders.IPV4() gives info.totallen as zero:
https://gist.github.com/karldd/7892a8dd08543e99e954

Ideally all TCP packets are below 1500 bytes, but apparently some configurations go well over this.

[Question] buffer reuse issue?

Maybe a dump question here:

In the usage example in README:

var linkType = c.open(device, filter, bufSize, buffer);

open takes only one buffer. And when it emits the event, only nbytes and trunc are returned in the event. The data is in the buffer.

Question: when I read the buffer and do some processing, will the next incoming packet write the buffer so that maybe I will read the wrong data? And what's the best practice to read the buffer, shall I always slice the buffer with nbytes?

Thanks a lot!

how it ll work from port to interface

Capture and decode all outgoing TCP data packets destined for port 80 on the interface for 192.168.0.10: but i want to capture and decode all TCP packets from Port 80 to the interface 192.168.0.10 i.e it should capture and decode the packets in both ways...

deviceList() return nothing

if i comment this line:
Address->Set(String::New(key), String::New(address));
then (after rebuilding) deviceList() retun something

problem here:

Address->Set(String::New(key), String::New(address));

right here:

String::New(address)

it fails when 'address' equal NULL

so, this code works fine:

if( address == NULL ) {
    Address->Set(String::New(key), String::New("null"));
} else {
    Address->Set(String::New(key), String::New(address));
}

Buffered packet

Is there any way to make the event on('packet') buffered?

Some times a packet should be buffered before returning the full payload.

Cannot open include file: 'nan.h': No such file or directory

Trying to npm install cap on windows 10, gets the following error:

c:\xampp\htdocs\node-project>npm install cap --save

> [email protected] install c:\xampp\htdocs\node-project\node_modules\cap
> node-gyp rebuild


c:\xampp\htdocs\node-project\node_modules\cap>if not defined npm_config_node_gyp (node "C:\Users\home\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" reb
uild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  binding.cc
  win_delay_load_hook.cc
..\src\binding.cc(3): fatal error C1083: Cannot open include file: 'nan.h': No such file or directory [c:\xampp\htdocs\node-project\node_modules\cap\build\cap.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\home\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\home\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd c:\xampp\htdocs\node-project\node_modules\cap
gyp ERR! node -v v6.10.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\home\AppData\Roaming\npm-cache\_logs\2017-08-12T16_32_07_401Z-debug.log

Any idea what could have gone wrong?

TypeError: device must be a string

I just copy-pasted code from the example and I get that error. Why though? I can ping it just fine.

var Cap = require('cap').Cap,
    decoders = require('cap').decoders,
    PROTOCOL = decoders.PROTOCOL;

var c = new Cap(),
    device = Cap.findDevice('192.168.1.131'),
    filter = 'tcp and dst port 80',
    bufSize = 10 * 1024 * 1024,
    buffer = new Buffer(65535);

var linkType = c.open(device, filter, bufSize, buffer);

c.setMinBytes && c.setMinBytes(0);

c.on('packet', function(nbytes, trunc) {
  console.log('Potential Dash Button Press?!?!?!');
});

Compile issue while installing cap v0.0.4 on Debian 7

Hi mscdex,

When npm install cap, i've got

make: entrant dans le répertoire « /home/franck/cidr/node_modules/cap/build »
  CXX(target) Release/obj.target/cap/src/binding.o
../src/binding.cc: In static member function ‘static void Pcap::EmitPacket(u_char*, const pcap_pkthdr*, const u_char*)’:
../src/binding.cc:120:50: error: ‘memcpy’ was not declared in this scope
../src/binding.cc: In function ‘v8::Handle<v8::Value> FindDevice(const v8::Arguments&)’:
../src/binding.cc:542:22: error: ‘strcpy’ was not declared in this scope
../src/binding.cc:558:35: error: ‘strcmp’ was not declared in this scope
../src/binding.cc:564:35: error: ‘strcmp’ was not declared in this scope
make: *** [Release/obj.target/cap/src/binding.o] Erreur 1
make: quittant le répertoire « /home/franck/cidr/node_modules/cap/build »

Linux debian 3.8-trunk-amd64 #1 SMP Debian 3.8.3-1~experimental.1 x86_64 GNU/Linux

node v0.10.0

gcc (Debian 4.7.2-5) 4.7.2

libpcap-dev 1.3.0-1 (package libpcap0.8-dev)

Thanks

assertion failed!

if i go to this line and delete it and rebuild it, all works fine!
aasd

Cannot find module '../build/Release/cap'

In \Lib\Cap.js there is a line that throws an uncaught exception: Cannot find module '../build/Release/cap'
The line is --> var addon = require('../build/Release/cap');
There is no build\release\cap folder.

How can I solve this?

Thanks in advance

Running cap under electron

I'm trying to integrate this great library in one desktop application I'm working on. I'm using electron to build the desktop app.

Because electron uses a different version of node.js, Cap needs to be recompiled for it (instructions http://electron.atom.io/docs/v0.31.0/tutorial/using-native-node-modules/). When I try to do so I get this error:

> [email protected] install /Users/bkolobara/Development/starcraftbuildorder/node_modules/cap
> node-gyp rebuild

  CXX(target) Release/obj.target/cap/src/binding.o

In file included from ../src/binding.cc:3:
../node_modules/nan/nan.h:324:27: error: redefinition of 'NanEnsureHandleOrPersistent'
  NAN_INLINE v8::Local<T> NanEnsureHandleOrPersistent(const v8::Local<T> &val) {
                          ^
../node_modules/nan/nan.h:319:17: note: previous definition is here
  v8::Handle<T> NanEnsureHandleOrPersistent(const v8::Handle<T> &val) {
                ^
../node_modules/nan/nan.h:344:27: error: redefinition of 'NanEnsureLocal'
  NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Handle<T> &val) {
                          ^
../node_modules/nan/nan.h:334:27: note: previous definition is here
  NAN_INLINE v8::Local<T> NanEnsureLocal(const v8::Local<T> &val) {
                          ^
../node_modules/nan/nan.h:757:13: error: no member named 'smalloc' in namespace 'node'
    , node::smalloc::FreeCallback callback
      ~~~~~~^
../node_modules/nan/nan.h:768:12: error: no matching function for call to 'New'
    return node::Buffer::New(v8::Isolate::GetCurrent(), data, size);
           ^~~~~~~~~~~~~~~~~

.... removed ...

10 errors generated.
make: *** [Release/obj.target/cap/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2

... removed ...

Compile failure on Windows7 vs 2010

Finally had a chance to run this. The previous correction gets it to compile but the root cause is not addressed.

The callback signature has changed for windows and no longer includes an (int) status.
Once the callback signature is fixed the cast is not longer required and the code runs properly.

In its current condition it generates a failed assertion.

bind to 127.0.0.1

I cannot bind to the loopback adaptor. Is there anything I need to do to be able to?

Saw on your examples that when you did

 console.dir(Cap.deviceList());

It returned

 //   { name: 'lo',
 //     addresses:
 //      [ { addr: '127.0.0.1', netmask: '255.0.0.0' },
 //        { addr: '::1',
 //          netmask: 'ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff' } ],
 //     flags: 'PCAP_IF_LOOPBACK' } ]

I don't think mine does, its on windows XP. I installed the winpcap libs.

dll could not be initialized in module.js

Hi,

I am using node v6.11.0 together with nw.js. I have installed cap successfully, and am now wanting to use it to send AVDECC ethernet packets. When I try to initialize with c = new Cap(); I get an error message indicating that a dll cannot be initialized in module.js.

I have used cap successfully on the Mac and am now porting the same code to Windows. I have Visual Studio 2015 enterprise edition installed.

Any idea what might be causing this run time message?

Thanks!

Cap.findDevice issue

I am using nwjs from the command line of a Mac.
For some time I have been using the command:
device = findDevice(selectedIP);
and then using the device string in an open command. It has worked fine.
Recently, the device value has been undefined.
When I use sudo to run nwjs, the device string en0 is returned and I can open and send packets.
Any idea why this might be happening?
Thanks!!

failing at building on windows

PS C:\xampp\htdocs\npcap> npm install cap

[email protected] install C:\xampp\htdocs\node_modules\cap
node-gyp rebuild

C:\xampp\htdocs\node_modules\cap>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin
node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
binding.cc
win_delay_load_hook.cc
c:\users\asus.node-gyp\9.2.0\include\node\v8.h(2455): error C2144: syntax error : 'int' should be preceded by ';' (..
src\binding.cc) [C:\xampp\htdocs\node_modules\cap\build\cap.vcxproj]
c:\users\asus.node-gyp\9.2.0\include\node\v8.h(2455): error C4430: missing type specifier - int assumed. Note: C++ doe
s not support default-int (..\src\binding.cc) [C:\xampp\htdocs\node_modules\cap\build\cap.vcxproj]
c:\users\asus.node-gyp\9.2.0\include\node\v8.h(4122): error C2610: 'v8::WasmCompiledModule::TransferrableModule::Trans
ferrableModule(v8::WasmCompiledModule::TransferrableModule &&)' : is not a special member function which can be default
ed (..\src\binding.cc) [C:\xampp\htdocs\node_modules\cap\build\cap.vcxproj]
c:\users\asus.node-gyp\9.2.0\include\node\v8.h(4125): error C2610: 'v8::WasmCompiledModule::TransferrableModule &v8::W
asmCompiledModule::TransferrableModule::operator =(v8::WasmCompiledModule::TransferrableModule &&)' : is not a special
member function which can be defaulted (..\src\binding.cc) [C:\xampp\htdocs\node_modules\cap\build\cap.vcxproj]
c:\users\asus.node-gyp\9.2.0\include\node\v8.h(4200): error C2610: 'v8::WasmModuleObjectBuilderStreaming::WasmModuleOb
jectBuilderStreaming(v8::WasmModuleObjectBuilderStreaming &&)' : is not a special member function which can be defaulte
d (..\src\binding.cc) [C:\xampp\htdocs\node_modules\cap\build\cap.vcxproj]
c:\users\asus.node-gyp\9.2.0\include\node\v8.h(4205): error C2610: 'v8::WasmModuleObjectBuilderStreaming &v8::WasmModu
leObjectBuilderStreaming::operator =(v8::WasmModuleObjectBuilderStreaming &&)' : is not a special member function which
can be defaulted (..\src\binding.cc) [C:\xampp\htdocs\node_modules\cap\build\cap.vcxproj]
c:\users\asus.node-gyp\9.2.0\include\node\v8.h(4238): error C2610: 'v8::WasmModuleObjectBuilder::WasmModuleObjectBuild
er(v8::WasmModuleObjectBuilder &&)' : is not a special member function which can be defaulted (..\src\binding.cc) [C:\x
ampp\htdocs\node_modules\cap\build\cap.vcxproj]
c:\users\asus.node-gyp\9.2.0\include\node\v8.h(4240): error C2610: 'v8::WasmModuleObjectBuilder &v8::WasmModuleObjectB
uilder::operator =(v8::WasmModuleObjectBuilder &&)' : is not a special member function which can be defaulted (..\src\b
inding.cc) [C:\xampp\htdocs\node_modules\cap\build\cap.vcxproj]
c:\users\asus.node-gyp\9.2.0\include\node\v8.h(4516): error C2146: syntax error : missing ';' before identifier 'size_
t' (..\src\binding.cc) [C:\xampp\htdocs\node_modules\cap\build\cap.vcxproj]
c:\users\asus.node-gyp\9.2.0\include\node\v8.h(4516): error C4430: missing type specifier - int assumed. Note: C++ doe
s not support default-int (..\src\binding.cc) [C:\xampp\htdocs\node_modules\cap\build\cap.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:2
58:23)
gyp ERR! stack at ChildProcess.emit (events.js:159:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\xampp\htdocs\node_modules\cap
gyp ERR! node -v v9.2.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open 'C:\xampp\htdocs\package.json'
npm WARN htdocs No description
npm WARN htdocs No repository field.
npm WARN htdocs No README data
npm WARN htdocs No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\asus\AppData\Roaming\npm-cache_logs\2018-02-26T07_12_01_572Z-debug.log
PS C:\xampp\htdocs\npcap>

Win 10 install error

Hey there. Is this still maintained somehow?

I tried to install the package with npm i cap.
I installed already wireshark and winpcap.

I'm getting following error

D:\Data\projects\ff14-trading-tracker>npm i cap

> [email protected] install D:\Data\projects\ff14-trading-tracker\node_modules\cap
> node-gyp rebuild


D:\Data\projects\ff14-trading-tracker\node_modules\cap>if not defined npm_config_node_gyp (node "D:\Programme\Entwicklung\NodeJS\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "D:\Programme\Entwicklung\NodeJS\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu ermöglichen, müssen Sie den Schalter "/m" hinzufügen.
  binding.cc
  win_delay_load_hook.cc
..\src\binding.cc(52): error C2666: 'inet_ntop': 2 overloads have similar conversions [D:\Data\projects\ff14-trading-tracker\node_modules\cap\build\cap.vcxproj]
  d:\data\projects\ff14-trading-tracker\node_modules\cap\src\windows_polyfills.h(116): note: could be 'char *inet_ntop(int,const void *,char *,socklen_t)' (compiling source file ..\src\binding.cc)
  C:\Program Files (x86)\Windows Kits\8.1\Include\um\ws2tcpip.h(576): note: or       'PCSTR inet_ntop(INT,PVOID,PSTR,std::size_t)' (compiling source file ..\src\binding.cc)
  ..\src\binding.cc(52): note: while trying to match the argument list '(ADDRESS_FAMILY, char *, char [66], socklen_t)'
..\src\binding.cc(584): error C2666: 'inet_ntop': 2 overloads have similar conversions [D:\Data\projects\ff14-trading-tracker\node_modules\cap\build\cap.vcxproj]
  d:\data\projects\ff14-trading-tracker\node_modules\cap\src\windows_polyfills.h(116): note: could be 'char *inet_ntop(int,const void *,char *,socklen_t)' (compiling source file ..\src\binding.cc)
  C:\Program Files (x86)\Windows Kits\8.1\Include\um\ws2tcpip.h(576): note: or       'PCSTR inet_ntop(INT,PVOID,PSTR,std::size_t)' (compiling source file ..\src\binding.cc)
  ..\src\binding.cc(584): note: while trying to match the argument list '(int, char *, char [22], int)'
..\src\binding.cc(592): error C2666: 'inet_ntop': 2 overloads have similar conversions [D:\Data\projects\ff14-trading-tracker\node_modules\cap\build\cap.vcxproj]
  d:\data\projects\ff14-trading-tracker\node_modules\cap\src\windows_polyfills.h(116): note: could be 'char *inet_ntop(int,const void *,char *,socklen_t)' (compiling source file ..\src\binding.cc)
  C:\Program Files (x86)\Windows Kits\8.1\Include\um\ws2tcpip.h(576): note: or       'PCSTR inet_ntop(INT,PVOID,PSTR,std::size_t)' (compiling source file ..\src\binding.cc)
  ..\src\binding.cc(592): note: while trying to match the argument list '(int, char *, char [65], int)'
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (D:\Programme\Entwicklung\NodeJS\node_modules\npm\node_modules\node-gyp\lib\build.js:258:23)
gyp ERR! stack     at ChildProcess.emit (events.js:160:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)
gyp ERR! System Windows_NT 10.0.16299
gyp ERR! command "D:\\Programme\\Entwicklung\\NodeJS\\node.exe" "D:\\Programme\\Entwicklung\\NodeJS\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\Data\projects\ff14-trading-tracker\node_modules\cap
gyp ERR! node -v v9.5.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Do you have a idea why this happens?

Question: Installing on Windows

Hi,

I'm not able to install cap on Windows. I receive the following error:

one
two
three

I have installed:

  • Winpcap
  • NodeJS ( with npm )
  • Python 2.7
  • VisualStudio Community ( I received a previous warning saying that I need to install VisualStudio in order to install cap )

To install cap I used npm install cap --save

I installed without any problems cap on my OS X machine. Is there a problem if I copy it from my OS X machine into my Windows machine ? Or do I need to run npm install cap on my Windows machine ?

What am I doing wrong ?

Thanks

question: example for sending packet with right addresses

i want to send a udp packet in windows. the source port i needed is using by another program so i can't use normal dgram.

i'm using raw-socket (https://www.npmjs.com/package/raw-socket) to do it now, it works well but will trigger UAC each time. and i find wireshark can run as normal user after install winpcap as service. then i'm trying to use cap to send this packet.

the "Send an arbitrary packet" example writes MAC address and source IP address directly in program, which can't work in real world. and i can't find how it can be automatically detected.

could you add a example for sending a udp packet with detected addresses that will works in real-world?

Module did not self-register since nodejs 0.12

module.js:339
  Module._extensions[extension](this, filename);
                               ^
Error: Module did not self-register.
    at Error (native)
    at Module.load (module.js:339:32)
    at Function.Module._load (module.js:294:12)
    at Module.require (module.js:349:17)
    at require (module.js:368:17)
    at Object.<anonymous> (C:\Users\Eric Range\Documents\GitHub\xyz\node_modules\cap\lib\Cap.
js:3:13)
    at Module._compile (module.js:444:26)
    at Object.Module._extensions..js (module.js:462:10)
    at Module.load (module.js:339:32)
    at Function.Module._load (module.js:294:12)

read pcap file

Hello, i use your package but i need to read pcap trace file instead of real time capture. Is it possible?

Packets through port 443

Hi,
I'm trying to view packets through port 443 using the following filter:

filter = 'tcp and dst port 443',

I'm using the same code as in the example:

c.on('packet', function (nbytes, trunc) {
    if (linkType === 'ETHERNET') {
      var ret = decoders.Ethernet(buffer);
      if (ret.info.type === PROTOCOL.ETHERNET.IPV4) {
        ret = decoders.IPV4(buffer, ret.offset);
        if (ret.info.protocol === PROTOCOL.IP.TCP) {
          var datalen = ret.info.totallen - ret.hdrlen;
          ret = decoders.TCP(buffer, ret.offset);
          datalen -= ret.hdrlen;
          const offset = buffer.toString('binary', ret.offset, ret.offset + datalen);

the problem is that offset echos very strange output, see this:

image

Is there something I'm missing with the decoder?

Thanks

'Cannot open BPF device' error on c.open()

I'm working on an Electron App that broadcasts UDP to find specific devices connected to the network and it is throwing an error on this line:

var linkType = c.open(device, filter, bufSize, buffer);

This is the error on the console: Uncaught Error: (cannot open BPF device) /dev/bpf0: Permission denied

It works fine on my local environment, but when running the App on another Mac it's failing as described. Do I have to grant permissions to the App in order to be able to open the Cap object (c)? I've tried using the sudo-prompt module but it is not working.

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.