Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
bing-chat-module
Advanced tools
This module is a Node.js client for the unofficial Bing Chat API. This module allows you to interact with Bing Chat using Node.js.
Before using this module, make sure you have installed Node.js on your computer. To install the module, use the following command:
npm install bing-chat
Make sure you use node >= 18
so that fetch
is available.
You need access to Bing Chat OR a valid cookie from someone who has access.
The cookie you need from Bing is the _U
cookie (or just all of the cookies concatenated together; both will work).
const { BingChat } = require('bing-chat-module');
const bingChatInstance = new BingChat({ cookie: 'your_bing_cookie_here' });
bingChatInstance.sendMessage('Hello, Bing Chat!')
.then(response => console.log(response))
.catch(error => console.error(error));
bingChatInstance.createConversation()
.then(result => console.log(result))
.catch(error => console.error(error));
Open a browser and go to Bing.com
Open a browser and visit Bing.com. -> Login to your Microsoft Account
Login to your Microsoft account. Make sure you are logged in before continuing. -> Open Developer Tools (Ctrl + Shift + I or F12)
Open Developer Tools in your browser. This can be done by pressing Ctrl + Shift + I or F12. -> Go to Network Tab
Select the "Network" tab in Developer Tools. -> Search Request to www.bing.com
Reload the Bing.com page and observe the request on the Network tab. -> Look for Cookies in the Request Header
Select the request to www.bing.com and see the "Headers" section. Look for the "Cookie" section in the request header. -> Copy Cookies
Copy the cookie value from the request header. This is what you will use as the cookie value when creating the BingChat object.
Thanks to KimzzDev
MIT © Travis Fischer
If you found this project interesting, please consider sponsoring me or following me on twitter
FAQs
Node.js client for the unofficial Bing Chat API.
We found that bing-chat-module demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.