File tree Expand file tree Collapse file tree
src/main/java/com/beaudoin/jmm Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424
2525package com .beaudoin .jmm ;
2626
27+ import com .beaudoin .jmm .process .Module ;
2728import com .beaudoin .jmm .process .NativeProcess ;
2829
2930import java .io .IOException ;
3031
32+ import static com .beaudoin .jmm .process .NativeProcess .byName ;
33+
3134/**
3235 * Created by Jonathan on 12/22/2015.
3336 */
3437public final class Main {
3538
3639 public static void main (String [] args ) throws IOException {
37- NativeProcess proc = NativeProcess .byName ("C__Stuff.exe" );
40+ NativeProcess proc = byName ("csgo.exe" );
41+
42+ Module client = proc .findModule ("client.dll" );
43+ System .out .println (client );
3844 //System.out.println(proc.readInt(0x61ff1c));
3945 }
4046
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public interface NativeProcess extends ReadableRegion {
4545 static NativeProcess byName (String name ) {
4646 if (Platform .isWindows ()) {
4747 Tlhelp32 .PROCESSENTRY32 .ByReference entry = new Tlhelp32 .PROCESSENTRY32 .ByReference ();
48- Pointer snapshot = Kernel32 .CreateToolhelp32Snapshot (Tlhelp32 .TH32CS_SNAPALL , 0 );
48+ Pointer snapshot = Kernel32 .CreateToolhelp32Snapshot (Tlhelp32 .TH32CS_SNAPALL . intValue () , 0 );
4949 try {
5050 while (Kernel32 .Process32Next (snapshot , entry )) {
5151 String processName = Native .toString (entry .szExeFile );
You can’t perform that action at this time.
0 commit comments