metasploit android
March 19, 2018
Music Max
October 23, 2018
Show all


I was kinda lazy today so I wrote a "useless" bit of code.... ;)


So those are two very small C programs release and renew.
Release will dump IP and cut all internet connections.
Renew will renew IP and enable connections.

How does it work?

The original CMD script is very simple :
ipconfig / release followed by ipconfig / renew and exit.
This is use to renew ip…. but here I will be using it to cut connections.

So the release program creates a .bat file when executed in the same folder where it is located
–now if you double click on this lets call it test.bat file it will cut all ip configurations.

To renew ip you ether change the test.bat files code which for now is:

@echo off

now if you put renew in the place of release and run the file again it will renew IP and connection, and this is exactly what renew.exe does.

Got to remember release and renew only create, write or edit the test.bat file but don’t do changes to cmd, for that you need to run the .bat file.

****Just for fun

Here is the code :

#include <stdio.h>
#include <stdlib.h>

FILE* fopen(const char* new_file, const char* w);

int main(int argc, char *argv[])
FILE* new_file = NULL;
new_file = fopen(“test.bat” , “w+”);

if(new_file != NULL)
//write and read
fputs(“@echo off\nIpconfig/release\n”, new_file);

//error message
printf(“Can’t open file — test.txt”);
return 0;

renew is same thing only command changed to renew.

Here you will find those two files….




1 Comment

  1. igraora says:

    Try this 1
    1) Right click on “Internet Explorer” icon —>click on “Properties” —> Click on “Connections” tab–> Click on LAN settings button. In that window uncheck all the options, if you notice any option selected—>Click on OK—> Click on OK.

    If the problem still exists, go to step 2.
    2) Make sure that IP address and DNS server was set to obtain the address automatically.
    Click on Start –> In search bar type ncpa.cpl and press “Enter”.
    Right click on your Network icon —> Select “Properties” —> scroll down and double click on “Internet Protocol[TCP/IP]” . Make sure that “Obtain IP address automatically” and “Obtain DNS server address automatically” options are selected.
    3) Click on Start –> In search bar type devmgmt.msc and press “Enter”. Type this command ipconfig /all and press enter. Make sure that IP Address, Subnet Mask, Default Gateway and DNS Servers are having addresses.
    4) Check your firewall (try to turn it off to see if it helps).
    5) Try to desactivate your antivirus to see if it helps. If you have McAfee, uninstall and reinstall it.

    Note from Shahab1210 : Click on Start –> In search bar type ncpa.cpl and press “Enter”. Right click on your Network icon —> Select “Properties” —> scroll down and double click on “Internet Protocol [TCP/IP]”, set your “Preferred DNS Server” to (Google) or (OpenDNS)

Leave a Reply

Your email address will not be published. Required fields are marked *