Register for your free account! | Forgot your password?

Go Back   elitepvpers > General Gaming > General Gaming Discussion
You last visited: Today at 00:36

  • Please register to post and access all features, it's quick, easy and FREE!

 

[SourceCode] FantasyTennis Bot

Reply
 
Old   #1
 
elite*gold: 34
Join Date: Apr 2011
Posts: 1,476
Received Thanks: 1,220
[SourceCode] FantasyTennis Bot

hey all

i wanna share my old fantasy tennis bot with you.
i am not sure if the code is still working but you can try it!

itīs written in C/C++

Code:
#include <iostream>
#include <windows.h>
#include <tlhelp32.h>

using namespace std;

HWND GameWindow = FindWindowA(0, "FantasyTennis");;

bool CheckForProcessAlive(LPSTR str);
BOOL IsAdministrator(VOID);
void sendKey(int vk, BOOL bExtended);
bool state = FALSE;

BOOL IsAdministrator(VOID)
{
    SID_IDENTIFIER_AUTHORITY NtAuthority = SECURITY_NT_AUTHORITY;
    PSID AdministratorsGroup;

    if( !AllocateAndInitializeSid(&NtAuthority,2,SECURITY_BUILTIN_DOMAIN_RID,
        DOMAIN_ALIAS_RID_ADMINS,0, 0, 0, 0, 0, 0,&AdministratorsGroup))
    {
        return FALSE;
    }

    BOOL IsInAdminGroup = FALSE;

    if(!CheckTokenMembership(NULL,AdministratorsGroup,&IsInAdminGroup))
    {
        IsInAdminGroup = FALSE;
    }

    FreeSid(AdministratorsGroup);
    return IsInAdminGroup;
}

void SetDebugPrivilege() 
{
    HANDLE hProcess=GetCurrentProcess(), hToken;
    TOKEN_PRIVILEGES priv;
    LUID luid;

    OpenProcessToken(hProcess, TOKEN_ADJUST_PRIVILEGES, &hToken);


    priv.PrivilegeCount = 1;
    priv.Privileges[0].Luid = luid;
    priv.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
    AdjustTokenPrivileges(hToken, FALSE, &priv, 0, 0, 0);

    CloseHandle(hToken); 
}

int main(int argc, char *argv[]){

    SetConsoleTitle("XxharCs-Bot");

    if(IsAdministrator() == FALSE)
    {
        MessageBoxA(0, "Please start it as admin !", "Error", MB_ICONERROR);
        //ExitProcess(1);
        return 0;
    }

    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 10);



    char* ProcessName = "FT_Client.exe";


    cout << "================================\n";
    cout << " Fantasy Tennis Bot by XxharCs\n";
    cout << "================================\n\n";
    

    SetDebugPrivilege();

    cout << "Waiting for Fantasy Tennis..." << endl;

    while(CheckForProcessAlive(ProcessName)){
         
    }

    
    cout << "Fantasy Tennis found!" << endl;

    

    while (!CheckForProcessAlive(ProcessName))
    {
        if(GetAsyncKeyState(0x70)&1)state =! state;  // 0x70 = F1

        if(state){
            SetForegroundWindow(GameWindow);
            Sleep(50);
            sendKey(0x57, FALSE); // 0x57 = W
            Sleep(2000);
        }
    }

    state = FALSE;
    
    cout << "Fantasy Tennis is closed !" << endl;
    Sleep(1000);

    return 0;
}

bool CheckForProcessAlive(LPSTR str)
{

    HANDLE hSnapShot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);

    PROCESSENTRY32* processInfo=new PROCESSENTRY32;
    processInfo->dwSize=sizeof(PROCESSENTRY32);

    DWORD processID = 0;
    BOOL bFound = TRUE;

    while(Process32Next(hSnapShot,processInfo)!=FALSE)
    {
        processID = processInfo->th32ProcessID;

        if(lstrcmp(processInfo->szExeFile,str) == 0)
        {
            bFound = FALSE;
            //break;
        }
    }

    CloseHandle(hSnapShot);

    if(bFound)
    {
        return TRUE;
    }
    return FALSE;

} 

void sendKey(int vk, BOOL bExtended) {

    KEYBDINPUT  kb = {0};
    INPUT       Input = {0};
    int scan = MapVirtualKey(vk, 0);

    /* Generate a "key down" */
    if (bExtended) { kb.dwFlags  = KEYEVENTF_EXTENDEDKEY; }
    kb.wVk  = vk;
    Input.type  = INPUT_KEYBOARD;
    Input.ki  = kb;
    Input.ki.wScan = scan;
    SendInput(1, &Input, sizeof(Input));

    /* Generate a "key up" */
    ZeroMemory(&kb, sizeof(KEYBDINPUT));
    ZeroMemory(&Input, sizeof(INPUT));
    kb.dwFlags  =  KEYEVENTF_KEYUP;
    if (bExtended) { kb.dwFlags |= KEYEVENTF_EXTENDEDKEY; }
    kb.wVk = vk;
    Input.type = INPUT_KEYBOARD;
    Input.ki = kb;
    Input.ki.wScan = scan;
    SendInput(1, &Input, sizeof(Input));

    return;
}



XxharCs is offline  
Old   #2
 
elite*gold: 0
Join Date: Oct 2012
Posts: 5
Received Thanks: 1
you are very clever hacker


kui112 is offline  
Old   #3
 
elite*gold: 0
Join Date: Nov 2011
Posts: 86
Received Thanks: 15
useless source
Pho3nX is offline  
Old   #4
 
elite*gold: 34
Join Date: Apr 2011
Posts: 1,476
Received Thanks: 1,220
Quote:
Originally Posted by Pho3nX View Post
useless source
what for ide u have that u cant include the standart headers lol ?


XxharCs is offline  
Old   #5
 
elite*gold: 0
Join Date: Nov 2011
Posts: 86
Received Thanks: 15
Quote:
Originally Posted by XxharCs View Post
what for ide u have that u cant include the standart headers lol ?
VB 2010
Pho3nX is offline  
Old   #6
 
elite*gold: 34
Join Date: Apr 2011
Posts: 1,476
Received Thanks: 1,220
Quote:
Originally Posted by Pho3nX View Post
VB 2010
VB is an visual basic IDE..
try VC++, Dev++ or VS
XxharCs is offline  
Old   #7
 
elite*gold: 0
Join Date: Nov 2011
Posts: 86
Received Thanks: 15
im **** in c++ cant compil it :/
Pho3nX is offline  
Old   #8
 
elite*gold: 10
Join Date: Aug 2010
Posts: 596
Received Thanks: 62
this work with autoscript?


king-kongs is offline  
Reply



« Previous Thread | Next Thread »

Similar Threads
FantasyTennis - Bypass
Working bypass?
0 Replies - General Gaming Discussion
FantasyTennis hack?
Hay leute suche Fantastennis hack kann mir jemand sagen wo es noch einen giebt der aber auch funkzuniert pls pm mfg altin:)
13 Replies - General Gaming Discussion



All times are GMT +1. The time now is 00:36.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2017 elitepvpers All Rights Reserved.