I’ve been getting many duplicate questions about FakeNet, so I’ve decided to post this FAQ to address them.
- How can I make FakeNet respond with a different file?
There are several options for getting FakeNet to respond with a different file. The simplest thing you can do is replace the default file(s) in the defaultFiles sub directory of the installation. For example if you want FakeNet to send a different .jpg when a .jpg is requested then just delete the FakeNet.jpg file in the defaultFiles directory and replace it with the file you want. Remember that if a request doesn’t match one of the pre-programmed extensions that FakeNet.html is sent. So if you want FakeNet to serve file.xyz, then copy file.xyz to FakeNet.html.Your second option, which is slightly more complicated but more effective is to enable a webroot in the configuration file. Each HTTPServer line in the config file has a parameter called Webroot. If you set that parameter to something other than “none” then Fakenet will search that directory for files to use as a response. For example if you set that parameter to c:\files_to_serve\ and FakeNet sees a request for http://www.anydomain.com/myfile.tgz then FakeNet will search c:\files_to_serve\myfile.tgz and respond to the request with that file.The final option is always to write a Python extension. A Python extension that responds to GET requests with a specific file is quite trivial to create for anyone with a basic knowledge of Python.
- Is there a tutorial for FakeNet?
The short answer is there is not a tutorial. The basic help file/user guide is the HTML document that comes up when you browse to any URL after launching FakeNet. You can also open the help file from the installation directory, it’s named Readme.html. There is documentation for the configuration file in the configuration file itself. There’s also an online demo of an earlier version of FakeNet available here.
- When do you plan to release the next version or feature?
There is no specific timeline or schedule. I work on FakeNet as a side project as time permits.