Skip to content

Commit

Permalink
feat: no-recoil check
Browse files Browse the repository at this point in the history
  • Loading branch information
iiLearner committed Aug 20, 2021
1 parent 9a51ea3 commit a1635c6
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .idea/workspace.xml

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

20 changes: 19 additions & 1 deletion anticheat/grass/grass.go → anticheat/cheats/grass.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package grass
package cheats

import (
"anticheat_ch/vars"
Expand Down Expand Up @@ -26,3 +26,21 @@ func GrassCheck(){
}
}

func RecoilCheck(){
path := windows.Path(vars.ProcessID)
path = path+"/res/xsetting.npk"
path = strings.Replace(path, "\\bin\\client.exe", "", -1)
if file, err := os.Stat(path); err == nil {

tdr := file.ModTime().Unix()
tdrn := time.Now().Unix()
minsago := (tdr-tdrn)/60


if (tdrn-tdr)<86200 {
msg := fmt.Sprintf("[N0 RECOIL WARNING] User %s(ID: %s) could POTENTIALLY BE using NO-RECOIL! (Settings Files modified %d mins ago)", vars.UserName, vars.UserID, minsago)
vars.DiscordGo.ChannelMessageSend(vars.AlertsChannel, msg)
vars.RecoilReported = true
}
}
}
5 changes: 5 additions & 0 deletions anticheat/functions.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package anticheat

import (
"anticheat_ch/anticheat/cheats"
"anticheat_ch/config"
"anticheat_ch/utils/game"
"anticheat_ch/vars"
Expand Down Expand Up @@ -48,6 +49,10 @@ func PingServer() {
InitialcheatCheck()
}

if vars.RecoilReported == false {
cheats.RecoilCheck()
}

if game.IsGameRunning() == "Not running" {
fmt.Println("[ERROR] The tool was unable to find cyber hunter, please run the game again!")
}
Expand Down
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"anticheat_ch/anticheat"
"anticheat_ch/anticheat/grass"
"anticheat_ch/anticheat/cheats"
"anticheat_ch/auth"
"anticheat_ch/config"
"anticheat_ch/discord"
Expand Down Expand Up @@ -63,7 +63,9 @@ func main() {
if check {message.WelcomeMessage()}

//check if user has no grass
grass.GrassCheck()
cheats.GrassCheck()

cheats.RecoilCheck()

//the initial cheating checks
anticheat.InitialcheatCheck()
Expand Down
1 change: 1 addition & 0 deletions vars/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ package vars
var UserID string
var UserName string
var HackReported = false
var RecoilReported = false

0 comments on commit a1635c6

Please sign in to comment.