If it is not the router then you have a hijacker. Run AVG or any anti virus and it should find it. If you want to test it that is it without waiting for a scan then reboot in safe mode with networking and if it does not redirect to porn then that confirms that is from a malicious program.