Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
You gotta request a Free API key on Tracker.gg
axios
To install use:
npm i m4a1.js
You must call CSAPI.fetchUser before using any other method.
Methods | Description |
---|---|
info | user info |
stats | lifeline stats |
weapons | weapons stats |
maps | maps stats |
There are constants to format the string of maps and weapons (feel free to pr if something is missing)
const { MAPS, WEAPONS } = require('m4a1.js')
/* Maps */
MAPS['de_cbble'] // Cobblestone
MAPS['de_train'] // Train
MAPS['de_shorttrain'] // Train (wingman)
/* Weapons */
WEAPONS['ak47'] // AK-47
WEAPONS['deagle'] // Desert Eagle
WEAPONS['hkp2000'] // P2000
This module supports either
You can see the diference between them in this page
Example code: (Feel free to use my steamid for testing)
const { CSAPI } = require('m4a1.js')
try {
const user = await CSAPI.fetchUser('iFraan_', 'YourApiKey')
console.log('User:', user.info())
/*
User: {
platform: 'steam' ,
steamid: '76561198137433783' ,
name: 'fran' ,
avatar: 'https://avatars.akamai.steamstatic.com/b5ac48b867b9ac1935fc564eaf1b43e8ac326e24_full.jpg'
}
*/
console.log('Stats:', user.stats())
/*
Stats: {
timePlayedDisplay: '1,311h',
timePlayed: 4722655,
score: 248751,
kills: 100376,
deaths: 64971,
kd: 1.5449354327315263,
damage: 11336712,
headshots: 42423,
dominations: 649,
shotsFired: 1308051,
shotsHit: 299525,
shotsAccuracy: 22.89857199757502,
snipersKilled: 4619,
dominationOverkills: 666,
dominationRevenges: 177,
bombsPlanted: 4962,
bombsDefused: 989,
moneyEarned: 191909700,
hostagesRescued: 0,
mvp: 11693,
wins: 1466,
ties: 0,
matchesPlayed: 3877,
losses: 2411,
roundsPlayed: 68576,
roundsWon: 1466,
wlPercentage: 37.8,
headshotPct: 42.3
}
*/
console.log('Weapons:', user.weapons())
/*
Weapons: {
ak47: {
kills: 24626,
shotsFired: 465473,
shotsHit: 107951,
shotsAccuracy: 23.191678142448648
},
aug: {
kills: 1253,
shotsFired: 25473,
shotsHit: 4664,
shotsAccuracy: 18.309582695402977
},
awp: {
kills: 8690,
shotsFired: 32426,
shotsHit: 9679,
shotsAccuracy: 29.84950348485783
},
...
}
*/
console.log('Maps:', user.maps())
/*
Maps: {
de_cbble: {
rounds: 1595,
wins: 770,
wr: 0.4827586206896552
},
de_inferno: {
rounds: 14407,
wins: 7198,
wr: 0.4996182411327827
},
de_nuke: {
rounds: 687,
wins: 358,
wr: 0.5211062590975255
},
...
}
*/
} catch (e) {
console.log(e)
/* Error: We could not find the player [player]. */
}
This project is fully for educational purposes.
FAQs
Wrapper for CSGO stats.
The npm package m4a1.js receives a total of 0 weekly downloads. As such, m4a1.js popularity was classified as not popular.
We found that m4a1.js 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.