I've been coding away, as being a newbie to C++. But, if you do the right research and looking good things happen! Such as my Custom Hosts Generator program, which makes you custom hosts to use for other things. It works by setting an IP to a web address, much like redirecting a website to an IP. But, this only works LOCALLY! If you want to know where i got my original inspiration for this project, please see Here! I haven't set up any download links for my compiled program, so you'll have to compile it yourself. If anyone can direct me to an awesome file sharing service, that's free, then I will thank you.
EDITS: Thanks to TRocket, I have a Github download! Here it is! NOTE: This download may be broken, and non-working.
And if that doesn't work, I finally managed to setup my own version! Here it is!
Here's my code, for any of you that are interested:
#include <iostream> #include <fstream> using namespace std; int main ( ) { char *c = new char; char *v = new char; cout<<"Please input your desired IP."<<endl; cout<<"i.e.: 192.168.0.1"<<endl; cin>>c; cout<<endl; cout<<"Now insert your desired hostname."<<endl; cout<<"ie.: 192.168.0.1 would be router.int"<<endl; cin>>v; cout<<endl; ofstream file; file.open("C:\\Windows\\System32\\drivers\\etc\\hosts", ios_base::app); file<<endl<<c<<" "<<v; file.close( ); cout<<"Wrote "<<c<<" "<<v<<" to the hosts file. Enjoy!"<<endl; system("PAUSE"); return 0; };
Enjoy!
Last edited by DigiTechs (2012-10-24 17:43:31)
Offline
You could try FileDen for free file hosting with direct downloads - they seem reputable enough.
Also, did you steal my idea for "router.int?"
IHeartGaming wrote:
I pointed my router to "router.int" (int for internal)...
Offline
IHeartGaming wrote:
You could try FileDen for free file hosting with direct downloads - they seem reputable enough.
Also, did you steal my idea for "router.int?"IHeartGaming wrote:
I pointed my router to "router.int" (int for internal)...
Yes, I did. Well, it was the only workable local thing... And thanks for the FileDen and Github downloads!
Offline
IHeartGaming wrote:
You could try FileDen for free file hosting with direct downloads - they seem reputable enough.
Also, did you steal my idea for "router.int?"IHeartGaming wrote:
I pointed my router to "router.int" (int for internal)...
I just tried fileden, 'exe files are blocked' D:
Offline
Well, somthing's wrong, as it doesn't want to work.. It keeps crashing. Mabye it's because Windows doesn't like it?
EDIT: Yes. It definitely doesn't like it.
EDIT 2: It works completely fine when I use my IDE though.. Odd.
Last edited by DigiTechs (2012-10-24 15:52:06)
Offline
DigiTechs wrote:
Well, somthing's wrong, as it doesn't want to work.. It keeps crashing. Mabye it's because Windows doesn't like it?
EDIT: Yes. It definitely doesn't like it.
EDIT 2: It works completely fine when I use my IDE though.. Odd.
Hmm, I compiled it on a windows 2000 VM i use for compiling Itchy++. If you email me the one that does work to havwrukn@trashmail.net I'll put that there...
Offline
TRocket wrote:
DigiTechs wrote:
Well, somthing's wrong, as it doesn't want to work.. It keeps crashing. Mabye it's because Windows doesn't like it?
EDIT: Yes. It definitely doesn't like it.
EDIT 2: It works completely fine when I use my IDE though.. Odd.Hmm, I compiled it on a windows 2000 VM i use for compiling Itchy++. If you email me the one that does work to havwrukn@trashmail.net I'll put that there...
I belive I know why mine only works for me.. I created the project as a win32 console app. I'll remake it as a CLR.
EDIT: Done! It should work now, as long as you have the right things to run it.
Last edited by DigiTechs (2012-10-24 16:31:10)
Offline