BUUCTF__[极客大挑战 2019]Knife_题解

前言

  • 想做前面那题高明的黑客,可是没学过python不会写脚本。。。而且看wp也感觉脚本也挺复杂的,以后再说吧,看来是得赶紧学习python了。
  • 再说这题,从打开到拿到 flag ,可能还没有一分钟,着实简单。哈哈哈,可能这就是秒题吧。

看题

  • 一看就是要用shell 连接了
    在这里插入图片描述

  • F12 也没有什么提示。但发现说白给的shell。

  • 白给,怎么白给,在哪???白嫖一下

  • 但想想 shell 肯定肯定是PHP文件了。而一般网站都会有 index.php

  • 所以尝试一下用蚁剑连接 index.php

     http://9393f1aa-a404-4e27-b887-2f7faf47b8c1.node3.buuoj.cn/index.php 
    
  • 然后就成功连上了?连上了! 连上了!!!

  • 然后直接终端 cat /flag 得到flag。
    在这里插入图片描述

最后

  • 没有知识点,有一点是 index.php 在很多时候可能就是突破点,默认解析首页。
  • 附上 原题链接
  • 持续更新BUUCTF题解,写的不是很好,欢迎指正。
  • 最后欢迎来访 个人博客
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Mask R-CNN 是一种基于 Faster R-CNN 的目标检测算法,不仅可以检测出物体的位置,还可以精确地分割出物体的 mask。下面是一个 Mask R-CNN 的例程: ```python import os import sys import random import math import numpy as np import skimage.io import matplotlib import matplotlib.pyplot as plt # Root directory of the project ROOT_DIR = os.path.abspath("../") # Import Mask RCNN sys.path.append(ROOT_DIR) # To find local version of the library from mrcnn import utils import mrcnn.model as modellib from mrcnn import visualize from mrcnn.config import Config # Directory to save logs and trained model MODEL_DIR = os.path.join(ROOT_DIR, "logs") # Local path to trained weights file COCO_MODEL_PATH = os.path.join(ROOT_DIR, "mask_rcnn_coco.h5") # Download COCO trained weights from Releases if needed if not os.path.exists(COCO_MODEL_PATH): utils.download_trained_weights(COCO_MODEL_PATH) # Directory of images to run detection on IMAGE_DIR = os.path.join(ROOT_DIR, "images") class InferenceConfig(Config): # Set batch size to 1 since we'll be running inference on # one image at a time. Batch size = GPU_COUNT * IMAGES_PER_GPU GPU_COUNT = 1 IMAGES_PER_GPU = 1 NUM_CLASSES = 1 + 80 # COCO has 80 classes config = InferenceConfig() config.display() # Create model object in inference mode. model = modellib.MaskRCNN(mode="inference", model_dir=MODEL_DIR, config=config) # Load weights trained on MS-COCO model.load_weights(COCO_MODEL_PATH, by_name=True) # COCO Class names # Index of the class in the list is its ID. For example, to get ID of # the teddy bear class, use: class_names.index('teddy bear') class_names = ['BG', 'person', 'bicycle', 'car', 'motorcycle', 'airplane', 'bus', 'train', 'truck', 'boat', 'traffic light', 'fire hydrant', 'stop sign', 'parking meter', 'bench', 'bird', 'cat', 'dog', 'horse', 'sheep', 'cow', 'elephant', 'bear', 'zebra', 'giraffe', 'backpack', 'umbrella', 'handbag', 'tie', 'suitcase', 'frisbee', 'skis', 'snowboard', 'sports ball', 'kite', 'baseball bat', 'baseball glove', 'skateboard', 'surfboard', 'tennis racket', 'bottle', 'wine glass', 'cup', 'fork', 'knife', 'spoon', 'bowl', 'banana', 'apple', 'sandwich', 'orange', 'broccoli', 'carrot', 'hot dog', 'pizza', 'donut', 'cake', 'chair', 'couch', 'potted plant', 'bed', 'dining table', 'toilet', 'tv', 'laptop', 'mouse', 'remote', 'keyboard', 'cell phone', 'microwave', 'oven', 'toaster', 'sink', 'refrigerator', 'book', 'clock', 'vase', 'scissors', 'teddy bear', 'hair drier', 'toothbrush'] # Load a random image from the images folder file_names = next(os.walk(IMAGE_DIR))[2] image = skimage.io.imread(os.path.join(IMAGE_DIR, random.choice(file_names))) # Run detection results = model.detect([image], verbose=1) # Visualize results r = results[0] visualize.display_instances(image, r['rois'], r['masks'], r['class_ids'], class_names, r['scores']) ``` 在上面的例程中,我们首先导入所需的库和模块,包括 Mask R-CNN 的配置、模型、可视化等。然后,我们设置了模型的超参数和文件路径,以及加载了预训练的 COCO 权重。接下来,我们定义了一个 InferenceConfig 类,它继承自 Config 类,并设置了模型的 GPU 数量、每个 GPU 的图片数量和类别数。然后,我们在 inference 模式下创建了模型对象,并加载了预训练的 COCO 权重。最后,我们从图片文件夹中随机加载一张图片,并对其进行目标检测和分割,最后可视化检测结果。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值