Hello welcome to my
first post, so one day I was just making a simple
nodejs windows user32.dll program to automate some stuff I do at work, and then I found out
CSGO went free to play and figured why not have a crack at it. I basically hacked together
trigger bot and a
radar hack in node. I'v been using it for the past 4 days and it seems to be
undetected by any anti cheat systems.
I'm using node version 10.13.0
npm version 6.4.1
modules you will need to install: (
npm i memoryjs util ffi colors )
'
memoryjs' to read and write memory to csgo
'
util' for some debugging stuff
'
ffi' to do some clicking and stuff with user32.dll
'
colors' for some snazzy console output
This code is
extremely bad, I don't write like this normally, I did a lot of copy and pasting from c++ programs and re writing them in js, so be warned, this is a
heep of garbage, but I feel like I need to share it because it was only possible because of the talented coders sharing their works here. I'm working on wrapping it up into an exe and extend it's features, so if you stay tuned I might be able to get that going for yall who can't get node configured.
If you have node installed and configured properly...
1) make a folder call it what ever you want
2) open up code editor or notepad, paste code into it, save it as whatever you want but it has to end in '.js'
ex: 'icantaim.js', 'everyonehacksanyway.js', 'welcometohell.js'
3) npm init the folder you just made
4) npm i memoryjs util ffi colors
5) start csgo (WAIT UNTIL GAME IS FULLY LOADED UNTIL YOU GO TO STEP 6 BRUH)
6) now just `node 'yourfilenamehere.js'` and if you get the magenta line of text that explains the hotkeys, you should be golden.
If you have anyone questions
let me know, this isn't supposed to be much of a guide, just releasing back source that I came up with by browsing this board.
Code:
var mem = require('memoryjs')
const ffi = require('ffi')
const util = require('util')
const colors = require('colors')
const user32 = ffi.Library('user32.dll', {
mouse_event: ['void', ['int', 'int', 'int', 'int', 'int']],
GetKeyState: ['short', ['int']]
})
// hazedumper offsets
let offsets = {
"clientstate_choked_commands": 19632,
"clientstate_delta_ticks": 372,
"clientstate_last_outgoing_command": 19628,
"clientstate_net_channel": 156,
"convar_name_hash_table": 192760,
"dwClientState": 5811452,
"dwClientState_GetLocalPlayer": 384,
"dwClientState_IsHLTV": 19656,
"dwClientState_Map": 652,
"dwClientState_MapDirectory": 392,
"dwClientState_MaxPlayer": 784,
"dwClientState_PlayerInfo": 21056,
"dwClientState_State": 264,
"dwClientState_ViewAngles": 19728,
"dwEntityList": 80534716,
"dwForceAttack": 51377016,
"dwForceAttack2": 51377028,
"dwForceBackward": 51377100,
"dwForceForward": 51377112,
"dwForceJump": 85397104,
"dwForceLeft": 51377136,
"dwForceRight": 51377124,
"dwGameDir": 6491760,
"dwGameRulesProxy": 85864868,
"dwGetAllClasses": 13506988,
"dwGlobalVars": 5810688,
"dwGlowObjectManager": 86039264,
"dwInput": 85035600,
"dwInterfaceLinkList": 9038228,
"dwLocalPlayer": 13358756,
"dwMouseEnable": 13382128,
"dwMouseEnablePtr": 13382080,
"dwPlayerResource": 51369756,
"dwRadarBase": 84945404,
"dwSensitivity": 13381772,
"dwSensitivityPtr": 13381728,
"dwSetClanTag": 562640,
"dwViewMatrix": 80475860,
"dwWeaponTable": 85038356,
"dwWeaponTableIndex": 12860,
"dwYawPtr": 13381200,
"dwZoomSensitivityRatioPtr": 13402256,
"dwbSendPackets": 860618,
"dwppDirect3DDevice9": 671680,
"interface_engine_cvar": 256492,
"m_bDormant": 237,
"m_pStudioHdr": 10572,
"m_pitchClassPtr": 84946096,
"m_yawClassPtr": 13381200,
"model_ambient_min": 5823772,
"cs_gamerules_data": 0,
"m_ArmorValue": 45864,
"m_Collision": 796,
"m_CollisionGroup": 1140,
"m_Local": 12220,
"m_MoveType": 604,
"m_OriginalOwnerXuidHigh": 12724,
"m_OriginalOwnerXuidLow": 12720,
"m_SurvivalGameRuleDecisionTypes": 4888,
"m_SurvivalRules": 3312,
"m_aimPunchAngle": 12332,
"m_aimPunchAngleVel": 12344,
"m_bBombPlanted": 2461,
"m_bFreezePeriod": 32,
"m_bGunGameImmunity": 14632,
"m_bHasDefuser": 45880,
"m_bHasHelmet": 45852,
"m_bInReload": 12933,
"m_bIsDefusing": 14612,
"m_bIsQueuedMatchmaking": 116,
"m_bIsScoped": 14602,
"m_bIsValveDS": 117,
"m_bSpotted": 2365,
"m_bSpottedByMask": 2432,
"m_clrRender": 112,
"m_dwBoneMatrix": 9896,
"m_fAccuracyPenalty": 13060,
"m_fFlags": 260,
"m_flC4Blow": 10640,
"m_flDefuseCountDown": 10668,
"m_flDefuseLength": 10664,
"m_flFallbackWear": 12736,
"m_flFlashDuration": 41952,
"m_flFlashMaxAlpha": 41948,
"m_flNextPrimaryAttack": 12824,
"m_flTimerLength": 10644,
"m_hActiveWeapon": 12024,
"m_hMyWeapons": 11768,
"m_hObserverTarget": 13192,
"m_hOwner": 10700,
"m_hOwnerEntity": 332,
"m_iAccountID": 12232,
"m_iClip1": 12868,
"m_iCompetitiveRanking": 6788,
"m_iCompetitiveWins": 7048,
"m_iCrosshairId": 45972,
"m_iEntityQuality": 12204,
"m_iFOV": 12772,
"m_iFOVStart": 12776,
"m_iGlowIndex": 41976,
"m_iHealth": 256,
"m_iItemDefinitionIndex": 12202,
"m_iItemIDHigh": 12224,
"m_iObserverMode": 13172,
"m_iShotsFired": 41840,
"m_iState": 12856,
"m_iTeamNum": 244,
"m_lifeState": 607,
"m_nFallbackPaintKit": 12728,
"m_nFallbackSeed": 12732,
"m_nFallbackStatTrak": 12740,
"m_nForceBone": 9868,
"m_nTickBase": 13356,
"m_rgflCoordinateFrame": 1092,
"m_szCustomName": 12348,
"m_szLastPlaceName": 13744,
"m_thirdPersonViewAngles": 12760,
"m_vecOrigin": 312,
"m_vecVelocity": 276,
"m_vecViewOffset": 264,
"m_viewPunchAngle": 12320
}
console.log(`Press the ALT key to scan\ncrosshairId for enemy players\n\nPress 'O' to toggle radar.`.magentaBG)
// these variables are here just so the interval dosn't spam the console.log with useless shit
var scanOnLogBouncer = false
var scanOffLogBouncer = false
var radarOnLogBouncer = false
var radarOffLogBouncer = false
setInterval(() => {
var procName = "csgo.exe"
var proc = mem.openProcess(procName)
var clientModule = mem.findModule("client_panorama.dll", proc.th32ProcessID)
var engineModule = mem.findModule("engine.dll", proc.th32ProcessID)
var cDLL = clientModule.modBaseAddr
var eDLL = engineModule.modBaseAddr
var localPlayer = mem.readMemory(proc.handle, cDLL + offsets.dwLocalPlayer, "dword")
var localPlayerTeam = mem.readMemory(proc.handle, localPlayer + offsets.m_iTeamNum, "int")
var localInCross = mem.readMemory(proc.handle, localPlayer + offsets.m_iCrosshairId, "int")
var inCrossEntity = mem.readMemory(proc.handle, cDLL + offsets.dwEntityList + ((localInCross - 1) * 0x10), "dword");
var inCrossEntityTeam = mem.readMemory(proc.handle, inCrossEntity + offsets.m_iTeamNum, "int")
if ((user32.GetKeyState(0x12) !== 0) && (user32.GetKeyState(0x12) !== 1)) {
if (scanOnLogBouncer === false) {
scanOnLogBouncer = true
scanOffLogBouncer = false
console.log(`scanning crosshairId`.yellowBG)
}
if (localPlayerTeam === inCrossEntityTeam) {
console.log(`looking at friendly`.greenBG)
}
} else {
if(scanOffLogBouncer === false){
scanOffLogBouncer = true
scanOnLogBouncer = false
console.log(`not scanning crosshairId`.yellowBG.red)
}
}
if (((localInCross > 0) && ((user32.GetKeyState(0x12) !== 0) && (user32.GetKeyState(0x12) !== 1))) && (localPlayerTeam !== inCrossEntityTeam)) {
console.log(`shooting at enemy`.redBG)
user32.mouse_event(2, 0, 0, 0, 0) // mouseLeft down
user32.mouse_event(4, 0, 0, 0, 0) // mouseLeft up
}
if (user32.GetKeyState(0x4F) === 1) {
if (radarOnLogBouncer === false) {
console.log('radar on'.green)
radarOnLogBouncer = true
radarOffLogBouncer = false
}
for (var i = 0; i < 300; i++) {
var entityToCheck = mem.readMemory(proc.handle, cDLL + offsets.dwEntityList + ((i + 1) * 0x10), "dword")
var entityToCheckTeam = mem.readMemory(proc.handle, entityToCheck + offsets.m_iTeamNum, "int")
var entityToCheckDormant = mem.readMemory(proc.handle, entityToCheck + offsets.m_bDormant, "int")
if (localPlayerTeam !== entityToCheckTeam && (entityToCheckTeam === 2 || entityToCheckTeam === 3) && entityToCheckDormant === 0) {
mem.writeMemory(proc.handle, entityToCheck + offsets.m_bSpotted, 1, 'int')
}
}
} else if (user32.GetKeyState(0x4F) === 0) {
if(radarOffLogBouncer === false){
console.log('radar off'.red)
radarOffLogBouncer = true
radarOnLogBouncer = false
}
}
setTimeout(() => {
mem.closeProcess(proc.th32ProcessID)
}, 1000)
}, 10)
If someone wants to hit me in the
dms or just post it as a reply here a guide to
making nicer threads (because I'm going to be making update threads as long as people engage and want it) please do because I can't find the docs on this editor thingy for this forum...