Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NodeJS snippets that *should* work #91

Closed
4 tasks
radare opened this issue Oct 23, 2015 · 1 comment
Closed
4 tasks

NodeJS snippets that *should* work #91

radare opened this issue Oct 23, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@radare
Copy link
Collaborator

radare commented Oct 23, 2015

There are some code constructions that can result in failed attempts, when the code looks good.

  • openSync() with 1 parameter
var r2pipe = require ('r2pipe');
r2pipe.openSync(function(r2) {
   console.log(r2.cmd('?e hello world'));
});
// TypeError: First argument must be file descriptor
  • openSync() with no parameters
var r2pipe = require ('r2pipe');
var r2 = r2pipe.openSync();
console.log(r2.cmd('?e hello world'));
// TypeError: First argument must be file descriptor
  • open() with 1 parameter
var r2pipe = require ('r2pipe');
r2pipe.open(function(r2) {
   r2.cmd('?e hello world', console.log);
});
// TypeError: First argument must be file descriptor
  • open() with no parameters
var r2pipe = require ('r2pipe');
var r2 = r2pipe.open(); // XXX if no parameters we should connect in sync but continue async
r2.cmd('?e hello world', console.log);
// TypeError: First argument must be file descriptor
@radare radare added the nodejs label Oct 23, 2015
@radare radare added this to the 0.10 milestone Oct 23, 2015
@radare
Copy link
Collaborator Author

radare commented Oct 7, 2016

Moved to radareorg/radare2-r2pipe#2

@radare radare closed this as completed Oct 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants