PDA

View Full Version : [2 Tutorials] -- Launching stuff



Fragment
05-06-2008, 06:18 PM
Navigating the user's default browser to a website
Here is a code, that you can put in a button, or anything you want, and it will navigate the user's default web browser to the website you put in there.
Here is the code:

AnsiString a = "open";
AnsiString b = "http://www.dxth4x.com/";
AnsiString c = " ";
ShellExecute(0, a.c_str(), b.c_str(), c.c_str(),c.c_str(),SW_MAXIMIZE);

Short, sweet and simple. It's good for making credits, that way, if you release a hack, all the lechers will know that it came from our website.

Launching an executable
In this tutorial, I will be explaining how you can make windows execute a program, given the directory.

I am using warrock as an example.



STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
CreateProcess(NULL,
"C:\\Program Files\\WarRock\\WRLauncher.exe", /*The file path*/
/*Also, remember that in C++, a '\' can only be represented by '\\'*/
NULL,
NULL,
false,
0,
NULL,
"C:\\Program Files\\WarRock", /*The containing folder*/
&si,
&pi);
Now, your hack can have a button that says LAUNCH WARROCK.
With warrock, this is easy, since all copies of the game install to the same directory.

ganglyman21
05-07-2008, 03:49 AM
Good work again fragment. Seeing a lot of tutorials coming up from you! Next public I release shall have a button to DXT now lol. (If I ever get off my god damned d3d that is)

Fragment
05-07-2008, 02:03 PM
Good work again fragment. Seeing a lot of tutorials coming up from you! Next public I release shall have a button to DXT now lol. (If I ever get off my god damned d3d that is)
Lol thanks ;)
How are you gonna put a button in your d3d?

ganglyman21
05-07-2008, 03:43 PM
Won't be releasing my d3d! especially as it seems to have melted my grphx card. Should of phrased it better. My next PUBLIC release.

sailerboy
05-08-2008, 09:52 AM
You are making it too complex. You can just use this


void OpenPlace( char* place )
{
ShellExecute(0, "open", place, 0, 0, 0);
}
Usage

OpenPlace("http:\google.com");
OpenPlace("C:Program FilesWarrocksystemwarrock.exe 0 0");

Fragment
05-08-2008, 07:03 PM
You are making it too complex. You can just use this


void OpenPlace( char* place )
{
ShellExecute(0, "open", place, 0, 0, 0);
}
Usage

OpenPlace("http:google.com");
OpenPlace("C:Program FilesWarrocksystemwarrock.exe 0 0");
WOW!
Dang. I always just muscle thru everything without even looking for an easier way out. Thanks for posting that.

sailerboy
05-08-2008, 07:50 PM
One of my friends told me "Don't look for a backdoor without checking the front door." I try to live by that. At least online.

landerman01
05-11-2008, 04:03 AM
thx but wow in visual basic 08 is it much easyer!