Forum > Coding >

How do I index the text file inside of the exploit folder

trollhackerdude

LUA and C# programmer

Posts: 118

Threads: 33

Joined: Jun, 2018

Reputation: 1

Posted

I want to execute the text inside of a txt file, but how do I get to the folder?

 

If I specify the path for example C:\Users\Idiot\Text.txt it wont work because not all the pathways will be the same,

 

(the .txt is inside the same folder as the exe)

 

(sorry if this post is stupid, i just started learning c#)

  • 0

I know LUA and some C#

 

and i own synapse x noob

Posts: 250

Threads: 111

Joined: Jun, 2018

Reputation: 5

Replied

The code I mention works for any user, as it looks for the file in the folder

uh the code is below.


string filename = "./test.txt"; //A selected file within the folder

string filecontents = File.ReadAllText(filename);

//It could also be: string filename = "./Scripts/test.txt";

 

api.SendLimitedLuaScript(filecontents);


hope this helps you.

 

also, refer to google when you want to ask simple questions like this, it's actually quicker, depending on how difficult it is to do.

e.g. "c# how to use bunifu dragcontrol" or "c# how to use seperate class methods"

  • 0

Exploits I own: Synapse, Electron

Scripts I've made: Aimbot GUI, Draco Admin

Scripts I'm working on: More game ESPs

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )