Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Exploiting https://button.mohsh.com to make the Illuminati the Top Country
#!/usr/bin/env node
const WebSocketClient = require('websocket').client
const attempt = () =>
new Promise((resolve, reject) => {
const client = new WebSocketClient()
client.on('connectFailed', error => {
console.log('Connect Error: ' + error.toString())
resolve()
})
client.on('connect', connection => {
console.log('WebSocket Client Connected')
connection.on('error', error => {
console.log('Connection Error: ' + error.toString())
resolve()
})
connection.on('close', () => {
resolve()
})
connection.on('message', message => {
if (message.type === 'utf8') {
const json = JSON.parse(message.utf8Data)
console.log(json)
}
})
setTimeout(() => {
setInterval(() => {
connection.sendUTF(
JSON.stringify({
user: 'BsePGryA_l7t3mhu~EFU~',
country: 'Illuminati',
flag:
'https://www.shareicon.net/data/128x128/2015/11/29/679740_triangle_512x512.png',
add: 1,
})
)
}, 200)
}, 1000)
})
client.connect('wss://mohsh.com:8999')
})
//
;(async () => {
while (true) await attempt()
})()
{
"name": "ws",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"websocket": "^1.0.28"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.