Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
bas-remote-node
Advanced tools
NodeJS library, which allows you to automate Google Chrome browser.
bas-remote-node - NodeJS library, which allows you to automate Google Chrome browser.
In order to make it possible, BrowserAutomationStudio application is used. bas-remote-node allows you to call and control execution of functions created in BAS. Consider following example, you have a BAS function, which executes specified Google search query and returns result as a list of urls. Using this library, you can call that function in any NodeJS application and obtain result. You can distribute applications written with bas-remote-node library as well.
BAS - is application that allows you to automate any activities in Google Chrome browser with a help of visual programming and without knowing of any programming language. You can think of it as IDE created especially for browser automation:
Check following link for more info:
https://bablosoft.com/shop/BrowserAutomationStudio
npm install --save bas-remote-node
Following code will search for cats query in Google and output result into console. You can just copy paste this code and run it.
const BasRemoteClient = require('bas-remote-node');
async function main() {
//Set script name, and optionally auth details (login, password)
const options = {
scriptName: 'TestRemoteControl' /* or 'YourScriptName' */,
};
//Create client
const scriptClient = new BasRemoteClient(options);
//Start application, this may take some time
await scriptClient.start();
//Set parameters for function
const scriptParams = {
Query: 'cats',
};
//Run function and wait for result
//Following function will return list of strings
const result = await scriptClient.runFunction('GoogleSearch' /* or 'YourFunctionName' */, scriptParams);
//Iterate and output results
result.forEach(link => {
console.log(link);
});
await scriptClient.close();
}
main();
Checkout wiki for more examples.
Previous example used TestRemoteControl project and GoogleSearch function defined in it. In most cases you want to use your own projects and functions. In order to do it:
After project with function is prepared, you can use it from NodeJS. In order to do that, change script and function name in example above.
Following diagram will explain project architecture:
Running custom code section explains how to prepare your project and upload it into the cloud. Portable BAS instance is downloaded and started automatically, it is also closed automatically when BasRemoteClient
gets closed. Folder, where portable BAS instance is located by default is data folder relative to executable. It can be customized by using options.workingDir
setting.
You can use TestRemoteControl project in order to test bas-remote-node library. It is already uploaded into the cloud and can be used without authentication. List of available functions:
Add(X,Y)
- adds two numbers and return their sum.SetProxy(Proxy,IsSocks5)
- sets proxy for current thread. Proxy param is proxy string, IsSocks5 is string("true", "false") value indicates if proxy type is socks5. No return value.CheckIp()
- returns remote IP of current thread. Uses ip.bablosoft.com service to test. Can be combined with SetProxy function.GoogleSearch(Query)
- performs Google query, returns result as a list of urls.Project source code can be downloaded here
bas-remote-node has MIT license.
You can distribute applications using bas-remote-node library, including commercial, to user, who don't have BAS premium subscription without any fees.
In order to create project with custom functions you need to have a BAS premium subscription.
In other words, only developers must have BAS premium subscription, not users.
FAQs
NodeJS library, which allows you to automate Google Chrome browser.
The npm package bas-remote-node receives a total of 76 weekly downloads. As such, bas-remote-node popularity was classified as not popular.
We found that bas-remote-node demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.