Skip to content

Commit

Permalink
sussy 😂 😂 😂 😂 😂
Browse files Browse the repository at this point in the history
  • Loading branch information
SPRAVEDLIVO committed Mar 21, 2021
1 parent c4e0913 commit e3e5ddf
Show file tree
Hide file tree
Showing 50 changed files with 669 additions and 340 deletions.
8 changes: 7 additions & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ Credit to [Mr. Noad](https://github.com/10urshin), [2772/Matt](https://github.co
* Added custom fonts support
* Added smoke timer
* Added blockbot
* Added minimize button
* Added Shared ESP
</details>

Expand All @@ -127,6 +129,8 @@ Credit to [Mr. Noad](https://github.com/10urshin), [2772/Matt](https://github.co
* Changed dwbSendPackets repository to hazedumper
* Fixed names in Ranks tab
* Fixed transparency in some Windows 7 cases
* Rewrote Skeleton ESP
* General optimisations
</details>

Expand All @@ -137,7 +141,7 @@ Credit to [Mr. Noad](https://github.com/10urshin), [2772/Matt](https://github.co
* Reworked aimbot and misc tabs, now feature sub-tabs
* Reworked options tab, moved configs to a separate tab
* Default config now has everything disabled
* Bumped libgdx version to 1.9.13-SNAPSHOT
* Updated both gradle version and libraries versions
* Improved appless mode
* Added installer.bat which downloads the installer.exe avoiding malware detection with first download
Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ dependencies {
implementation group: 'it.unimi.dsi', name: 'fastutil', version: '8.4.4'

implementation group: 'net.openhft', name: 'chronicle-core', version: '2.20.125'
implementation "io.ktor:ktor-client-websockets:1.5.2"
implementation "io.ktor:ktor-client-okhttp:1.5.2"
}

jar {
Expand Down
Binary file added settings/Assets/Images/minimize.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions settings/BoxEsp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ ADVANCED_BOUNDING_BOX = false
//Disable through smoke
BOX_SMOKE_CHECK = false

//Enable far radar box
BOX_FAR_RADAR = false

//Enable box esp details
//Shows optional extra details (Health/Armor bar, Name/Weapon text) for each enemy, configurable below
BOX_ESP_DETAILS = false
Expand Down
5 changes: 5 additions & 0 deletions settings/FarESP.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//Enable far radar box
BOX_FAR_RADAR = false

//Enable shared ESP
SHARED_ESP = false
3 changes: 3 additions & 0 deletions settings/General.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ APPLESS_HEIGHT = 600
APPLESS_X = 960
APPLESS_Y = 100

//Web Sockets Server to connect
WEBSOCKET_SERVER = 95.181.152.27

//Menu stays focused even when csgo isn't
MENU_STAY_FOCUSED = false

Expand Down
5 changes: 4 additions & 1 deletion settings/Localizations/locale_en_US.locale
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ BOTTOM = BOTTOM
ADVANCED_BOUNDING_BOX = Full Dynamic Box
BOX_WEAPON_COLOR = Weapons
BOX_SMOKE_CHECK = Smoke Check
BOX_FAR_RADAR = Far Radar Box
BOX_ESP_WEAPON_SCALE = Icons Size
BOX_ESP_USE_ICONS = Use Icons

Expand Down Expand Up @@ -473,6 +472,10 @@ HITMARKER_LENGTH = Length
HITMARKER_COLOR = Color
HITMARKER_COMBO_COLOR = Combo Color

//Category: Far Esp tab
BOX_FAR_RADAR = Far Radar Box
SHARED_ESP = Shared Esp


//Category: Others tab
DISABLE_POST_PROCESSING = Disable Post Processing
Expand Down
3 changes: 2 additions & 1 deletion settings/MiscScripts.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ BLOCK_BOT_KEY = -1
BLOCK_BOT_DISTANCE = 2000

FAKE_LAG = false
FAKE_LAG_TICKS = 10
FAKE_LAG_TICKS = 10
STEAM_ID_LOGGER = false
6 changes: 6 additions & 0 deletions src/main/kotlin/rat/poison/RatPoison.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package rat.poison

import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application
import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration
import io.ktor.util.*
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import org.lwjgl.glfw.GLFW.*
Expand All @@ -18,6 +19,7 @@ import rat.poison.scripts.aim.pathAim
import rat.poison.scripts.aim.setAim
import rat.poison.scripts.visuals.*
import rat.poison.utils.Settings
import rat.poison.utils.WebSocket
import rat.poison.utils.detectLocale
import rat.poison.utils.generalUtil.loadSettingsFromFiles
import rat.poison.utils.generalUtil.loadSkinSettings
Expand Down Expand Up @@ -70,6 +72,7 @@ val DEFAULT_OWEAPON_STR = DEFAULT_OWEAPON.toString()

var haltProcess = false

@KtorExperimentalAPI
fun main() {
System.setProperty("jna.nosys", "true")

Expand All @@ -85,6 +88,7 @@ fun main() {
println("Waiting for ${curSettings["MENU_APP"]} process...")

CSGO.initialize()
WebSocket.initialize()

WEAPON_STATS_FILE = File("$SETTINGS_DIRECTORY\\Data\\WeaponStats.txt")
SKIN_INFO_FILE = File("$SETTINGS_DIRECTORY\\Data\\SkinInfo.txt")
Expand Down Expand Up @@ -157,6 +161,8 @@ fun main() {
if (dbg) { println("[DEBUG] Initializing Handle Fire Key") }; handleFireKey()
if (dbg) { println("[DEBUG] Initializing GVars updater") }; updateGVars()
if (dbg) { println("[DEBUG] Initializing Nades Timer") }; nadesTimer()
if (dbg) { println("[DEBUG] Initializing Shared Esp") }; sharedEsp()
//steamIDLogger()

if (dbg) { println("[DEBUG] Initializing Head Level Helper") }; headLevelHelper()
if (dbg) { println("[DEBUG] Initializing Fake Lag") }; fakeLag()
Expand Down
2 changes: 2 additions & 0 deletions src/main/kotlin/rat/poison/game/Entities.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import rat.poison.settings.MAX_ENTITIES
var me: Player = 0
@Volatile
var clientState: ClientState = 0
@Volatile
var meTeam: Long = 0

typealias EntityList = Object2ObjectArrayMap<EntityType, MutableList<EntityContext>>

Expand Down
85 changes: 62 additions & 23 deletions src/main/kotlin/rat/poison/game/entity/Player.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package rat.poison.game.entity

import com.badlogic.gdx.math.MathUtils
import com.badlogic.gdx.math.Vector3
import com.sun.jna.Memory
import it.unimi.dsi.fastutil.longs.Long2ObjectMap
Expand Down Expand Up @@ -37,13 +38,17 @@ import rat.poison.game.offsets.ClientOffsets.dwEntityList
import rat.poison.game.offsets.ClientOffsets.dwIndex
import rat.poison.game.offsets.ClientOffsets.dwPlayerResource
import rat.poison.game.offsets.EngineOffsets.dwClientState_PlayerInfo
import rat.poison.scripts.gvars
import rat.poison.settings.HEAD_BONE
import rat.poison.settings.SERVER_TICK_RATE
import rat.poison.utils.Angle
import rat.poison.utils.Vector
import rat.poison.utils.extensions.uint
import rat.poison.utils.readCached
import rat.poison.utils.to
import rat.poison.utils.scl
import rat.poison.utils.threadLocalPointer
import java.util.regex.Pattern
import kotlin.math.cos
import kotlin.math.sin

typealias Player = Long

Expand All @@ -59,6 +64,8 @@ fun Player.weapon(weaponEntity: Weapon = weaponEntity()): Weapons {
return weaponEntity.type()
}

fun Player.positionNextTick(): Vector = velocity().scl(gvars.intervalPerTick)

internal fun Player.flags(): Int = csgoEXE.int(this + fFlags)

internal fun Player.onGround(): Boolean = flags() and 1 == 1
Expand Down Expand Up @@ -112,10 +119,22 @@ internal fun Player.eyeAngle(): Angle =
csgoEXE.float(this + angEyeAngles + 8))


internal fun Player.direction(): Vector = readCached(angle2Vector) {
eyeAngle().to(forward = this)
}
internal fun Player.direction(): Vector {
val eyeAngle = eyeAngle()

val dp = eyeAngle.x * MathUtils.degreesToRadians
val dy = eyeAngle.y * MathUtils.degreesToRadians

val sp = sin(dp)
val cp = cos(dp)
val sy = sin(dy)
val cy = cos(dy)

val x = cp * cy
val y = cp * sy
val z = -sp
return Vector(x, y, z)
}
internal fun Player.boneMatrix() = csgoEXE.uint(this + dwBoneMatrix)

internal fun Player.bone(offset: Int, boneID: Int = HEAD_BONE, boneMatrix: Long = boneMatrix()) = csgoEXE.float(boneMatrix + ((0x30 * boneID) + offset))
Expand All @@ -136,6 +155,11 @@ internal fun Player.isSpectating(): Boolean = observerMode() > 0

internal fun Player.isProtected(): Boolean = csgoEXE.boolean(this + bGunGameImmunity)


private const val modelMemorySize = 21332
private var modelMemory = threadLocalPointer(modelMemorySize)
private const val boneMemorySize = 21332
private var boneMemory = threadLocalPointer(boneMemorySize)
internal fun Player.nearestBone(): Int {
val studioModel = csgoEXE.uint(studioHdr())
val boneOffset = csgoEXE.uint(studioModel + 0xA0)
Expand All @@ -145,12 +169,8 @@ internal fun Player.nearestBone(): Int {
val w2sRetVec = Vector(0F, 0F, 0F)

//Get actual size
val modelMemory: Memory by lazy {
Memory(25000) //Fuck you
}
val boneMemory: Memory by lazy {
Memory(4032)
}
val modelMemory = modelMemory.get()
val boneMemory = boneMemory.get()

csgoEXE.read(studioModel + boneOffset, modelMemory)
csgoEXE.read(boneMatrix, boneMemory)
Expand Down Expand Up @@ -212,10 +232,10 @@ internal fun Memory.vector(addy: Long, xOff: Long, yOff: Long, zOff: Long): Vect
return Vector(x, y, z)
}

private const val nameMemorySize = 320
private val nameMemory = threadLocalPointer(nameMemorySize)
internal fun Player.name(): String {
val nameMem: Memory by lazy {
Memory(320)
}
val nameMem = nameMemory.get()

val entID = csgoEXE.uint(this + dwIndex) - 1
val a = csgoEXE.uint(clientState + dwClientState_PlayerInfo)
Expand All @@ -230,10 +250,10 @@ internal fun Player.name(): String {
return name
}

private const val steamIDMemorySize = 0x140
private val steamIDMemory = threadLocalPointer(steamIDMemorySize)
internal fun Player.steamID(): String {
val mem: Memory by lazy {
Memory(0x140)
}
val mem = steamIDMemory.get()

val entID = csgoEXE.uint(this + dwIndex) - 1

Expand All @@ -249,11 +269,30 @@ internal fun Player.steamID(): String {
return sID
}

private val intPattern = Pattern.compile("\\d+")
private val tmpSplit = Array(3) { "" }
fun validateSteamId(steamID: String): Boolean {
if (steamID == "BOT" || steamID == "") return false
val match = intPattern.matcher(steamID)
var idx = 0
while (match.find()) {
tmpSplit[idx] = (match.group())
idx += 1
}
return !tmpSplit.any { it == "" } && StringUtils.isNumeric(tmpSplit[2])
}

internal fun Player.getValidSteamID(): Int {
val entSteam = this.steamID()
val split = entSteam.split(":")
if (entSteam == "BOT" || entSteam == "" || split.size < 3 || !StringUtils.isNumeric(split[2])) return 0
return (split[2].toInt() * 2) + split[1].toInt()
if (entSteam == "BOT" || entSteam == "") return 0
val match = intPattern.matcher(entSteam)
var idx = 0
while (match.find()) {
tmpSplit[idx] = (match.group())
idx += 1
}
if (tmpSplit.any { it == "" } || !StringUtils.isNumeric(tmpSplit[2])) return 0
return (tmpSplit[2].toInt() * 2) + tmpSplit[1].toInt()
}

internal fun Player.score(): Int {
Expand Down Expand Up @@ -286,10 +325,10 @@ internal fun Player.wins(): Int {
return (csgoEXE.int(clientDLL.uint(dwPlayerResource) + iCompetitiveWins + index * 4))
}

private const val hltvMemorySize = 0x140
private val hltvMemory = threadLocalPointer(hltvMemorySize)
internal fun Player.hltv(): Boolean {
val mem: Memory by lazy {
Memory(0x140)
}
val mem = hltvMemory.get()

val entID = csgoEXE.uint(this + dwIndex) - 1

Expand Down
21 changes: 14 additions & 7 deletions src/main/kotlin/rat/poison/game/hooks/EntityIteration.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package rat.poison.game.hooks

import com.sun.jna.Memory
import com.sun.jna.platform.win32.WinNT
import io.ktor.util.*
import rat.poison.dbg
import rat.poison.game.*
import rat.poison.game.CSGO.GLOW_OBJECT_SIZE
Expand All @@ -10,6 +10,7 @@ import rat.poison.game.CSGO.csgoEXE
import rat.poison.game.CSGO.engineDLL
import rat.poison.game.entity.EntityType
import rat.poison.game.entity.absPosition
import rat.poison.game.entity.team
import rat.poison.game.offsets.ClientOffsets
import rat.poison.game.offsets.ClientOffsets.dwEntityList
import rat.poison.game.offsets.ClientOffsets.dwGlowObject
Expand Down Expand Up @@ -43,18 +44,19 @@ private fun reset() {
lastCleanup.set(System.currentTimeMillis())
}


private const val strBufMemorySize = 128
private val strBufMemory = threadLocalPointer(strBufMemorySize)
@KtorExperimentalAPI
private var state by Delegates.observable(SignOnState.MAIN_MENU) { _, old, new ->
if (old != new) {
if (new.name == SignOnState.IN_GAME.name) {
Thread(Runnable {
Thread.sleep(10000)
after(10000) {
shouldPostProcess = true
}).start()

val strBuf: Memory by lazy {
Memory(128) //128 str?
}

val strBuf = strBufMemory.get()

csgoEXE.read(clientState + dwClientState_MapDirectory, strBuf)
val mapName = strBuf.getString(0)

Expand Down Expand Up @@ -93,6 +95,10 @@ private var state by Delegates.observable(SignOnState.MAIN_MENU) { _, old, new -

sendPacket(true)
} else {
if (new.name == SignOnState.MAIN_MENU.name) { //disconnected
WebSocket.createSendTask("deleteInfo")
}

shouldPostProcess = false
inGame = false
sendPacket(true)
Expand All @@ -118,6 +124,7 @@ fun constructEntities() = every(500, continuous = true) {

me = clientDLL.uint(dwLocalPlayer)
if (!inGame || me <= 0L) return@every
meTeam = me.team()

val glowObject = clientDLL.uint(dwGlowObject)
val glowObjectCount = clientDLL.int(dwGlowObject + 4)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package rat.poison.interfaces

interface IOKeyProcessorListener {
interface IKeyProcessorListener {
fun onPress(keycode: Int, type: String)
}
Loading

0 comments on commit e3e5ddf

Please sign in to comment.