This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var discoverPorts = function (callback) { | |
| var ports = []; | |
| if (os == 'darwin') { | |
| var output = exec(LSOF_CMD, {silent: true}).output; | |
| var regex = /^b2g[-bin]?.*[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:([0-9]*)/; | |
| var lines = output.split('\n'); | |
| for (var line=0; line < lines.length; line++) { | |
| var matches = regex.exec(lines[line]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Find open FirefoxOS connection open and listening for remote debugging | |
| import psutil | |
| def get_connections(p): | |
| try: | |
| return p.get_connections() | |
| except: | |
| return [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import psutil | |
| def get_connections(p): | |
| try: | |
| return p.get_connections() | |
| except: | |
| return [] | |
NewerOlder