C# Teleport Hack + Source Code menu

User Tag List

Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    GRB's Avatar Established Member CoreCoins Purchaser
    Reputation
    65
    Join Date
    Oct 2008
    Posts
    222
    Thanks G/R
    0/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    C# Teleport Hack + Source Code

    Good morning,

    The past few days i have been trying to make a teleport hack in c#, after get the proper pointers in CE, time to code.

    Im not a pro C# programmer, i didnt went in school learning C#, all of works i do in C# is from minimum knowledge, and with alot of research with google, and help from ppl from ownedcore. So thank you all for the help.

    This teleport hack, uses blackmagic to read and write values to process, was 2 lazy do PInvoke.

    Heres the Code:

    Code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using Magic;
    using System.Threading;
    
    namespace swtor_Hack
    {
        public partial class frmmain : Form
        {
            public frmmain()
            {
                InitializeComponent();
                tcc.Start();
            }
    
            private void tcc_Tick(object sender, EventArgs e)
            {
                BlackMagic swr = new BlackMagic();
                swr.OpenProcessAndThread(SProcess.GetProcessFromProcessName("swtor.exe"));
                IntPtr swrba = swr.MainModule.BaseAddress;
                uint pb = swr.ReadUInt((uint)swrba + 0x01075E88);
                uint playerpos = swr.ReadUInt((uint)pb + 0x04);
                float x = swr.ReadFloat((uint)playerpos + 0x2C);
                float y = swr.ReadFloat((uint)playerpos + 0x34);
                float z = swr.ReadFloat((uint)playerpos + 0x30);
    
                lblCX.Text = "Current X: " + x;
                lblCY.Text = "Current Y: " + y;
                lblCZ.Text = "Current Z: " + z;
            }
    
            private void btnGO_Click(object sender, EventArgs e)
            {
                BlackMagic swr = new BlackMagic();
                swr.OpenProcessAndThread(SProcess.GetProcessFromProcessName("swtor.exe"));
                IntPtr swrba = swr.MainModule.BaseAddress;
                uint pb = swr.ReadUInt((uint)swrba + 0x01075E88);
                uint playerpos = swr.ReadUInt((uint)pb + 0x04);
                float z = swr.ReadFloat((uint)playerpos + 0x30);
                while (z <= float.Parse(tbZ.Text))
                {
                    if (z > float.Parse(tbZ.Text))
                    {
                        z-=0.1f;
                    }
                    else
                    {
                        z+=0.1f;
                    }
                    Thread.Sleep(100);
                    swr.WriteFloat((uint)playerpos + 0x30, z);
                }
                float x = swr.ReadFloat((uint)playerpos + 0x2C);
                while (x <= float.Parse(tbX.Text))
                {
                    if (x > float.Parse(tbX.Text))
                    {
                        x-=0.1f;
                    }
                    else
                    {
                        x+=0.1f;
                    }
                    Thread.Sleep(100);
                    swr.WriteFloat((uint)playerpos + 0x2C, x);
                    //Console.WriteLine(x);
                }
                float y = swr.ReadFloat((uint)playerpos + 0x34);
                while (y <= float.Parse(tbY.Text))
                {
                    if (y > float.Parse(tbY.Text))
                    {
                        y-=0.1f;
                    }
                    else
                    {
                        y+=0.1f;
                    }
                    Thread.Sleep(100);
                    swr.WriteFloat((uint)playerpos + 0x34, y);
                }
            }
        }
    }
    This will actually teleport you to the desired coordenates most of the time, other times you just go there, but for some reason you appear dead. I think its better if i included a no clip, so it could travel freely till the desired coordinates. Probably you will appear on X+0.5 or Y+0.5, i have no clue why.

    Main problem is that the swtor only alow teleport hack +3.5f, so to travel greater distances, it needs to increment or decrement the value till you get the desired position.

    Im releasing the *.exe and the source, couse i want to share what i have done so far, and im looking for someone that can improve it, and help me understand whats wrong with the coding, so i could learn more, since im a total noob on what comes to C#, but i desired to learn more.

    DOWNLOAD:
    swtor Hack.rar

    Best Regards,
    GRB

    C# Teleport Hack + Source Code
  2. #2
    junkkiller's Avatar Banned
    Reputation
    19
    Join Date
    Feb 2007
    Posts
    108
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    im not gonna use it my self but you tried and your trying to learn and improve so 5 cookies from me!

  3. #3
    GRB's Avatar Established Member CoreCoins Purchaser
    Reputation
    65
    Join Date
    Oct 2008
    Posts
    222
    Thanks G/R
    0/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    For my knowledge and usage of it, its safe so far, but like any other hacks, you CAN get banned for using it.

  4. #4
    MartinRFC's Avatar Member
    Reputation
    7
    Join Date
    Aug 2008
    Posts
    11
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Strange dude, I was making the exact same program this looks almost identical to mine. I was trying to think of a better way to get the process rather than check the PID on every tick of the timer. It seems innefficient but I have no idea if it actually is. Any thoughts?

    Cheers.

  5. #5
    psyguy's Avatar Private
    Reputation
    3
    Join Date
    Feb 2012
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    *PM'ed the Message to Author

  6. #6
    Liteness's Avatar Member
    Reputation
    7
    Join Date
    Mar 2008
    Posts
    240
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for releasing to community, i hope someone knows their C#
    Last edited by Liteness; 02-14-2012 at 03:17 AM.

  7. #7
    ShenLongKazama's Avatar Banned
    Reputation
    1
    Join Date
    Jan 2012
    Posts
    14
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Horrible, it crashes everytime i try to start it, it works one time from 1000 times but it's pretty annoying.

  8. #8
    rodarvus's Avatar Member
    Reputation
    13
    Join Date
    Jun 2011
    Posts
    13
    Thanks G/R
    0/0
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by ShenLongKazama View Post
    Horrible, it crashes everytime i try to start it, it works one time from 1000 times but it's pretty annoying.
    This code is not supposed to work *at all*, as the offset used is invalid (swtor.exe is updated at least once per week).

    Having that said, the original author stated clearly he was looking for improvement suggestions (or/and patches). Thanks, GRB, for your effort so far!

  9. #9
    GRB's Avatar Established Member CoreCoins Purchaser
    Reputation
    65
    Join Date
    Oct 2008
    Posts
    222
    Thanks G/R
    0/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by rodarvus View Post
    This code is not supposed to work *at all*, as the offset used is invalid (swtor.exe is updated at least once per week).

    Having that said, the original author stated clearly he was looking for improvement suggestions (or/and patches). Thanks, GRB, for your effort so far!
    Actually the offsets are still valid.

    Those are still the pointers for the X,Y,Z coords.
    Problem is that ppl just download, and compile the code, they forget that the code like it is atm, will only work once every 10 times couse of the line

    Code:
    swr.OpenProcessAndThread(SProcess.GetProcessFromProcessName("swtor.exe"));
    People need to set the program to get the proper swtor.exe[0] so it can work all the time.

  10. #10
    psyguy's Avatar Private
    Reputation
    3
    Join Date
    Feb 2012
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Example solution for finding the correct swtor.exe..:
    Code:
    using System.Threading;
    using System.Diagnostics;
    
    int swtorProc = 0;
    
            private void GetProcess()
            {
                DataTable dt = new DataTable();
                Process[] procs;
                procs = Process.GetProcesses();
                
    
                for (int i = 0; i < procs.Length; i++)
                {
                    String ProcName = procs[i].ProcessName;
                    long MemorySize = procs[i].NonpagedSystemMemorySize64;
                    int ProcID = procs[i].Id;
    
                    if (ProcName == "swtor")
                    {
                        if (swtorProc < MemorySize)    //swtor.exe which uses more memory
                        {
                            swtorProc = ProcID;
                        }
                    }
                }
    
                if (swtorProc == 0)
                {
                    MessageBox.Show("Error: Looks like SWTOR is not running. See you later..");
                    Environment.Exit(0);
                }
    
            }
    Last edited by psyguy; 02-17-2012 at 02:47 PM. Reason: fixed error, sorry

  11. #11
    RazorDreamz's Avatar Private
    Reputation
    1
    Join Date
    Feb 2012
    Posts
    5
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As the OP mentioned you can do this with pinvoke and skip using blackmagic.

    So for those that want full control without the extra DLL here is the pinvoke code to read and write memory in C#:

    Code:
    [Flags]
            public enum ProcessAccessFlags : uint
            {
                All = 0x001F0FFF,
                Terminate = 0x00000001,
                CreateThread = 0x00000002,
                VMOperation = 0x00000008,
                VMRead = 0x00000010,
                VMWrite = 0x00000020,
                DupHandle = 0x00000040,
                SetInformation = 0x00000200,
                QueryInformation = 0x00000400,
                Synchronize = 0x00100000
            }
    
            [DllImport("kernel32.dll")]
            private static extern IntPtr OpenProcess(ProcessAccessFlags dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, int dwProcessId);
    
            [DllImport("kernel32.dll", SetLastError = true)]
            private static extern bool WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, byte[] lpBuffer, uint nSize, out int lpNumberOfBytesWritten);
    
            [DllImport("kernel32.dll", SetLastError = true)]
            static extern bool ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [Out] byte[] lpBuffer, int dwSize, out int lpNumberOfBytesRead);
    
            [DllImport("kernel32.dll")]
            public static extern Int32 CloseHandle(IntPtr hProcess);
    
    
            public static void WriteMemory(Process p, int address, long v)
            {
                var hProc = OpenProcess(ProcessAccessFlags.All, false, p.Id);
                var val = new[] {(byte) v};
    
                int numWritten = 0;
                WriteProcessMemory(hProc, new IntPtr(address), val, (UInt32) val.LongLength, out numWritten);
    
                CloseHandle(hProc);
            }
    
            public static byte[] ReadMemory(Process p, int address, int  numberOfBytes)
            {
                var hProc = OpenProcess(ProcessAccessFlags.All, false, p.Id);
    
                byte[] buffer = new byte[numberOfBytes];
                int bytesread;
    
                ReadProcessMemory(hProc, new IntPtr(address), buffer, numberOfBytes, out bytesread);
                return buffer;
    
            }
    Enjoy
    Last edited by RazorDreamz; 02-17-2012 at 03:39 PM. Reason: Had a type on the last function

  12. #12
    GRB's Avatar Established Member CoreCoins Purchaser
    Reputation
    65
    Join Date
    Oct 2008
    Posts
    222
    Thanks G/R
    0/1
    Trade Feedback
    2 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by psyguy View Post
    Example solution for finding the correct swtor.exe..:
    Code:
    using System.Threading;
    using System.Diagnostics;
    
    int swtorProc = 0;
    
            private void GetProcess()
            {
                DataTable dt = new DataTable();
                Process[] procs;
                procs = Process.GetProcesses();
                
    
                for (int i = 0; i < procs.Length; i++)
                {
                    String ProcName = procs[i].ProcessName;
                    long MemorySize = procs[i].NonpagedSystemMemorySize64;
                    int ProcID = procs[i].Id;
    
                    if (ProcName == "swtor")
                    {
                        if (swtorProc < MemorySize)    //swtor.exe which uses more memory
                        {
                            swtorProc = ProcID;
                        }
                    }
                }
    
                if (swtorProc == 0)
                {
                    MessageBox.Show("Error: Looks like SWTOR is not running. See you later..");
                    Environment.Exit(0);
                }
    
            }
    All of that can be changed for this piece of code.

    Originally Posted by Apoc View Post
    Code:
    Process proc = Process.GetProcessesByName("swtor").FirstOrDefault(p => string.IsNullOrWhiteSpace(p.MainWindowTitle));

  13. #13
    Liteness's Avatar Member
    Reputation
    7
    Join Date
    Mar 2008
    Posts
    240
    Thanks G/R
    0/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    still not working for me GRB, and i get no compiler errors

    Code:
                   BlackMagic swr = new BlackMagic();
                Process proc = Process.GetProcessesByName("swtor").FirstOrDefault(p => string.IsNullOrWhiteSpace(p.MainWindowTitle));
                swr.OpenProcessAndThread(proc.Id);
    I read blackmagic's documentation and thought i could pass it the ID from Process class to it. (int) does not work unfortunatley
    I changed both instances of swr.OpenProcessAndThread and doesnt work


    EDIT 2: I also tried this but does not work.

    Code:
                Process proc = Process.GetProcessesByName("swtor").FirstOrDefault(p => string.IsNullOrWhiteSpace(p.MainWindowTitle));
                swr.OpenProcessAndThread(SProcess.OpenProcess(proc.Id));

    BlackMagic and the Process Class (not SProcess) seem to be incompatible. (proc without .Id does not compile)
    Last edited by Liteness; 02-18-2012 at 07:19 AM.

  14. #14
    psyguy's Avatar Private
    Reputation
    3
    Join Date
    Feb 2012
    Posts
    4
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try this

    Code:
    BlackMagic swr = new BlackMagic();
    Process proc = Process.GetProcessesByName("swtor").FirstOrDefault(p => string.IsNullOrWhiteSpace(p.MainWindowTitle));
    Int32 procID = proc.Id;
    swr.OpenProcessAndThread(procID);
    Also keep in mind to run it as administrator.

  15. #15
    Paranoiaaa123's Avatar Member
    Reputation
    1
    Join Date
    Oct 2009
    Posts
    3
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well done. But this seems to work only randomly.
    The problem is: if for example the X-Value is teleporting by 0.1 steps and you would tele in a wall, the swtor-Client is resetting your position. This means the desired Value connot be reached directly and the teleport fails.
    You have to add a NoClip hack to make this work 100%.

    Thanks and well done anyway.

Page 1 of 2 12 LastLast

Similar Threads

  1. Source code for Hitchhiker or any other 3.3.5 hack?
    By Chas3down in forum WoW Memory Editing
    Replies: 3
    Last Post: 11-08-2016, 05:59 PM
  2. [Source] BWH Bubba's Hack Source Code
    By TehAvatar in forum World of Warcraft Bots and Programs
    Replies: 25
    Last Post: 09-30-2014, 11:08 AM
  3. [Request] Lag Hack Source Code
    By gensmeta in forum Programming
    Replies: 2
    Last Post: 07-13-2013, 07:22 AM
  4. [Source Code] Click 2 Teleport, Fly, No clip...
    By karliky in forum GW2 Memory Editing
    Replies: 5
    Last Post: 11-27-2012, 10:30 AM
  5. [Source Code] Click To Teleport ( wow beta 4.0.0 )
    By RivaLfr in forum WoW Memory Editing
    Replies: 34
    Last Post: 10-13-2010, 10:09 PM
All times are GMT -5. The time now is 10:41 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search