Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
omegle-node
Advanced tools
omegle-node is an unofficial API for Omegle which can be used to connect and interact with people on omegle without actually going to the website.
##Installation
npm install omegle-node
##Usage
Check out omegle.js
in examples/
folder to get a hang of how this works.
cd examples
node omegle
###List of events
gotID
: emitted when you're connected to Omegle's server (note that you're not connected to a stranger yet).
Argument
: id
- The ID assigned to you by Omegle.
waiting
: emitted when you're looking for strangers to connect to.
connected
: emitted when you're connected to a stranger.
typing
: emitted when the stranger starts typing.
stoppedTyping
: emitted when the stranger stops typing.
gotMessage
: emitted when you receive a message. Argument
: msg
- Received message.
commonLikes
: emitted when you're connected to a stranger with matching interests. Argument
: likes
- Array of matching interests.
disconnected
: emitted when you disconnect from the chat. This will be emitted when you call disconnect()
. If you want to reconnect, call connect()
again only on
disconnected
and strangerDisconnected
event.
strangerDisconnected
: emitted when the stranger disconnects.
connectionDied
: emitted when connection to the server is lost. Results in disconnection.
omegleError
: emitted when there's an error on Omegle's side. Results in disconnection. (Note: this is different from omerror
).Argument
: errorMsg
- Error message.
antinudeBanned
: emitted when you get banned for bad behavior. Bans usually last for 1 to 48 hours. Results in disconnection.
recaptchaRequired
: emitted when you're required to solve a ReCAPTCHA. Argument
: challenge
- Link to the ReCAPTCHA image.
recaptchaRejected
: emitted when your answer to the ReCAPTCHA challenge is rejected. Argument
: challenge
- Link to the new ReCAPTCHA image.
omerror
: emitted when there's an error on client-side. For instance, calling send()
before calling connect()
.Argument
: errorMsg
- Error description. Error messages follow this pattern: functionName(): error message
.
###List of functions
connect([topics])
: Connect to a random stranger. Argument
: topics
- Optional. An array of interests.
updateServer()
: Update the server to which all the requests are made. This is called every time connect()
is called.
send(msg)
: Send a message to the stranger. Argument
: msg
- Message to send.
startTyping()
: Set your status to typing
.
stopTyping()
: Set your status to stoppedTyping
.
stopLookingForCommonLikes()
: Pretty self explanatory - Stop looking for common likes. If you hate long ungodly function names, you can use slfcl()
, which does the same thing too.
disconnect()
: Disconnect from the chat.
solveReCAPTCHA(answer)
: Send the answer to the ReCAPTCHA challenge to Omegle. Argument
: answer
- Answer to the challenge.
connected()
: Returns a boolean value specifying whether you're currently connected to a stranger.
reloadReCAPTCHA()
: It seems like Omegle has gotten rid of recaptchaRejected
, so the only way to know whether your ReCAPTCHA answer has been rejected is if you don't get connected to a stranger within a few seconds of submitting your answer. Use this function to reload ReCAPTCHA.
###List of variables
useragent
: Set or get the useragent.
language
: Set or get the language you speak. Default is en
.
###Example
var Omegle = require('omegle-node');
var om = new Omegle(); //create an instance of `Omegle`
//This will print any errors that might get thrown by functions
om.on('omerror',function(err){
console.log('error: ' + err);
});
//gotID is emitted when you're connected to Omegle
om.on('gotID',function(id){
console.log('connected to the server as: ' + id);
});
//waiting is emitted when you're waiting to connect to a stranger
om.on('waiting', function(){
console.log('waiting for a stranger.');
});
//emitted when you're connected to a stranger
om.on('connected',function(){
console.log('connected');
});
//emitted when you get a message
om.on('gotMessage',function(msg){
console.log('Stranger: ' + msg);
om.send('Hi'); //used to send a message to the stranger
});
//emitted when the stranger disconnects
om.on('strangerDisconnected',function(){
console.log('stranger disconnected.');
});
//Once you're subscribed to all the events that you wish to listen to,
//call connect() to connect to Omegle and start looking for a stranger.
om.connect();
##Example scripts
The examples/
folder contains three scripts:
omegle.js
- A full-fledged script to demonstrate how the module works.mitm.js
- Script showcasing the MITM attack to eavesdrop on two strangers' conversation.reverse-bot.js
- An Omegle bot that reverses the received messages and sends them back to the stranger.##Please do not use this to create spam bots, there are already enough of those on Omegle.
FAQs
Node.js API for Omegle
The npm package omegle-node receives a total of 9 weekly downloads. As such, omegle-node popularity was classified as not popular.
We found that omegle-node 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
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.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.