
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
hqtrivia-api
Advanced tools
This is a Node.JS wrapper for HQ Trivia
npm i hqtrivia-api
hq.getUserData()
- Get the authenticated user datahq.getShows()
- Get the game schedulehq.getLeaderboard()
- Get the game leaderboardhq.getUserById()
- Get user by IDhq.searchUsers()
- Search usershq.getFriends()
- Get all friendshq.acceptFriendRequest(userId)
- Accept friend requesthq.addFriend(userId)
- Add friendhq.getIncomingFriendRequests()
- Get incoming friend requestshq.connectToGame()
- Connect to the gamehq.disconnectFromGame()
- Disconnect from the gamehq.getUpcomingSchedule()
- Get upcoming games schedulehq.setToken(token)
- Sets token for requestshq.changeUsername(username)
- Change usernamehq.checkUsername(username)
- Check usernamehq.makePayout(email)
- Make payouthq.sendCode(phone, [method])
- Sends the code to the specified phonehq.confirmCode(code, [verificationId])
- Confirm codehq.register(username, [referral], [verificationId])
- Register an account if it is not registeredhq.sendAnswer(answerID, questionId)
- Send answer to HQhq.sendSurveyAnswer(answerID, questionId)
- Send survey answer to HQhq.useExtralive(questionId)
- Use extra livehq.sendEraser(questionId)
- Use eraserhq.getErasers(friendIds)
- Get erasershq.sendLetter(roundId, showId, letter)
- Send letter to HQhq.sendWord(roundId, showId, word)
- Send word to HQconnected
- Called when successfully connected to the game (Words, Trivia)disconnected
- Called when disconnected from the game (Words, Trivia)question
- Called when a question is received from the server (Trivia)questionClosed
- Called when a question is closed (Trivia)questionSummary
- Called when the summary of a question is received from the server (Trivia)questionFinished
- Called when question is finished (Trivia)gameStatus
- Called when the game status is received from the server (Words, Trivia)startRound
- Called when the round starts (Words)letterReveal
- Called when letter reveal (Words)endRound
- Called when round ends (Words)showWheel
- Called when wheel shows (Words)hideWheel
- Called when wheel hideens (Words)guessResponse
- Called after sending a letter or word (Words)const HQTrivia = require('hqtrivia-api')
const hq = new HQTrivia('[token]')
hq.connectToGame()
hq.on('connected', () => {
console.log('Connected to HQ WS')
})
hq.on('question', (data) => {
console.log(`Question #${data.questionNumber}/${data.questionCount}`) // Question #3/12
console.log(data.question) // In a jazz band, which instrument would be in the rhythm section?
console.log(data.answers.map(answer => answer.text).join(' | ')) // Trombone | Guitar | Violin |
hq.sendAnswer(data.answers[1].answerId, data.questionId) // Sends the answer "Guitar"
})
hq.on('disconnected', (code) => {
console.log('Disconnected from HQ WS')
})
const HQTrivia = require('hqtrivia-api')
const hq = new HQTrivia('[token]')
hq.connectToGame()
hq.on('connected', () => {
console.log('Connected to HQ WS')
})
hq.on('startRound', (data) => {
console.log(`Round Number #${data.roundNumber}/${data.totalRounds}`) // Round Number #9/10
console.log(`Hint: ${data.hint}`) // Hint: Circus Performance
console.log(`Puzzle: `) // Puzzle:
console.log(data.puzzleState.join(' | ')) // ******** | ******** | C********
hq.sendWord(data.roundId, data.showId, 'JUGGLING') // Send the letters "J", "U", "G", ...etc
hq.sendWord(data.roundId, data.showId, 'MULTIPLE') // Send the letters "M", "U", "L", ...etc
hq.sendWord(data.roundId, data.showId, 'CHAINSAWS') // Send the letters "C", "H", "I", ...etc
// or
hq.sendLetter(data.roundId, data.showId, 'J') // Send the letter "J"
hq.sendLetter(data.roundId, data.showId, 'U') // Send the letter "U"
hq.sendLetter(data.roundId, data.showId, 'G') // Send the letter "G"
})
hq.on('disconnected', (code) => {
console.log('Disconnected from HQ WS')
})
const HQTrivia = require('hqtrivia-api')
const hq = new HQTrivia()
await hq.sendCode('+11111111111')
const response = await hq.confirmCode('0228')
if (response.accountRegistred) {
console.log(`token: ${response.token}`)
hq.setToken(response.token)
} else {
const token = await hq.register('jsoplox', 'machuita')
console.log(`token: ${token}`)
hq.setToken(token)
}
FAQs
HQ Trivia API wrapper for Node.js
The npm package hqtrivia-api receives a total of 0 weekly downloads. As such, hqtrivia-api popularity was classified as not popular.
We found that hqtrivia-api 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.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.