Register for your free account! | Forgot your password?

Go Back   elitepvpers > General Gaming > General Gaming Discussion
You last visited: Today at 11:47

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

Advertisement



[SourceCode] FantasyTennis Bot

Discussion on [SourceCode] FantasyTennis Bot within the General Gaming Discussion forum part of the General Gaming category.

Reply
 
Old   #1
 
XxharCs's Avatar
 
elite*gold: 34
Join Date: Apr 2011
Posts: 1,475
Received Thanks: 1,225
[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 11/05/2012, 14:53   #2
 
elite*gold: 0
Join Date: Oct 2012
Posts: 5
Received Thanks: 1
you are very clever hacker
kui112 is offline  
Old 11/05/2012, 19:18   #3
 
Pho3nX's Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 86
Received Thanks: 15
useless source
Pho3nX is offline  
Old 11/05/2012, 19:25   #4
 
XxharCs's Avatar
 
elite*gold: 34
Join Date: Apr 2011
Posts: 1,475
Received Thanks: 1,225
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 11/05/2012, 19:30   #5
 
Pho3nX's Avatar
 
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 11/05/2012, 19:34   #6
 
XxharCs's Avatar
 
elite*gold: 34
Join Date: Apr 2011
Posts: 1,475
Received Thanks: 1,225
Quote:
Originally Posted by Pho3nX View Post
VB 2010
VB is an visual basic IDE..
try VC++, Dev++ or VS
XxharCs is offline  
Old 11/05/2012, 19:55   #7
 
Pho3nX's Avatar
 
elite*gold: 0
Join Date: Nov 2011
Posts: 86
Received Thanks: 15
im **** in c++ cant compil it :/
Pho3nX is offline  
Old 11/08/2012, 08:18   #8
 
king-kongs's Avatar
 
elite*gold: 10
Join Date: Aug 2010
Posts: 608
Received Thanks: 66
this work with autoscript?
king-kongs is offline  
Reply


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



All times are GMT +2. The time now is 11:47.


Powered by vBulletin®
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2023 elitepvpers All Rights Reserved.