C++ Hata Alıyorum [ Open Source ]

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Onaylı Üye
Katılım
28 May 2018
Mesajlar
144
Tepki puanı
12
Ödüller
7
Yaş
25
8 HİZMET YILI
Growtopia internal Hilesi Üzerine Compile Yapıp Kullanmak istedim
Ama Hata Alıyorum Size de Source yi yayıcam Yardımcı olursanız sevinirim

C++:
#include <stdio.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>
#include <signal.h>

//Function addresses that we are going to use.
long ConsoleLogParent=0x249e64;
long GameLogic=0x27c890;
static size_t (*ConsoleLog)(long address, const char*msg);



static const char* SendPacket(long address, const char*msg)
{
    const char* dd=sprintf(address,msg);
    printf("msg sent: %d\n",dd);
    return dd;
}

__attribute__((constructor))
static void customConstructor(int argc, const char **argv)
{
 
     printf("2020-07-05 12:33:52.265 Growtopia[12522:400373][Internal v1.0]\n");
     printf("%s",stdin);
     printf("%s",stdout);
     mmap(0,0x1000000,PROT_READ | PROT_WRITE | PROT_EXEC,0,MAP_JIT | MAP_PRIVATE,NULL); //lets get full access from the assembly of gt
     pid_t gt_id=getProcessByName("Growtopia");

     printf("2020-07-05 12:33:52.265 Growtopia[12522:400373][Internal V1.0] Module ID %d\n",gt_id);
     printf("2020-07-05 12:33:52.265 Growtopia[12522:400373][Internal V1.0] GameLogic at %d\n",GameLogic);
     //this is required for gamelogic. you should update all the addresses with hopper Dissassembler.
     printf("msg sent: %d\n",SendPacket);
     //SendPacket(ConsoleLogParent,"[internalosx 1.0] super duper console message"); dont use this unless you get the funcs updated.


   
   


}
pid_t getProcessByName(const char *name)
{
    int procCnt = proc_listpids(PROC_ALL_PIDS, 0, NULL, 0);
    pid_t pids[1024];
    memset(pids, 0, sizeof pids);
    proc_listpids(PROC_ALL_PIDS, 0, pids, sizeof(pids));

    for (int i = 0; i < procCnt; i++)
    {
        if (!pids[i]) continue;
        char curPath[PROC_PIDPATHINFO_MAXSIZE];
        char curName[PROC_PIDPATHINFO_MAXSIZE];
        memset(curPath, 0, sizeof curPath);
        proc_pidpath(pids[i], curPath, sizeof curPath);
        int len = strlen(curPath);
        if (len)
        {
            int pos = len;
            while (pos && curPath[pos] != '/') --pos;
            strcpy(curName, curPath + pos + 1);
            if (!strcmp(curName, name))
            {
                return pids[i];
            }
        }
    }
    return 0;
}
 
Uzman Üye
Katılım
29 Ağu 2020
Mesajlar
257
Çözümler
4
Tepki puanı
12
Ödüller
5
5 HİZMET YILI
Eksik bişeyler var sankim
 
İnsanların senin sesiyle dalga geçmesini umursama
Banlı Üye
Katılım
25 Mar 2018
Mesajlar
260
Çözümler
1
Tepki puanı
42
8 HİZMET YILI
C dilinde yazılmış C++ ile dilinde yazılmış hali varsa atar mısın hatanın nerden olduğunu anlıyabilirim
 
uff ya
Uzman Üye
Katılım
14 Mar 2016
Mesajlar
167
Tepki puanı
21
Ödüller
9
Sosyal
10 HİZMET YILI
ss eklersen daha fazla yardımcı olabiliriz dostum
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üst