首页 > 其他分享 >软件管理测试案例

软件管理测试案例

时间:2023-08-24 17:11:17浏览次数:36  
标签:... -- kali work tree 案例 测试 软件 root

案例1 :显示目录树 tree

┌──(root㉿kali)-[~]
└─# tree --help
usage: tree [-acdfghilnpqrstuvxACDFJQNSUX] [-L level [-R]] [-H  baseHREF]
        [-T title] [-o filename] [-P pattern] [-I pattern] [--gitignore]
        [--gitfile[=]file] [--matchdirs] [--metafirst] [--ignore-case]
        [--nolinks] [--hintro[=]file] [--houtro[=]file] [--inodes] [--device]
        [--sort[=]<name>] [--dirsfirst] [--filesfirst] [--filelimit #] [--si]
        [--du] [--prune] [--charset[=]X] [--timefmt[=]format] [--fromfile]
        [--fromtabfile] [--fflinks] [--info] [--infofile[=]file] [--noreport]
        [--version] [--help] [--] [directory ...]
  ------- Listing options -------
  -a            All files are listed.
  -d            List directories only.
  -l            Follow symbolic links like directories.
  -f            Print the full path prefix for each file.
  -x            Stay on current filesystem only.
  -L level      Descend only level directories deep.
  -R            Rerun tree when max dir level reached.
  -P pattern    List only those files that match the pattern given.
  -I pattern    Do not list files that match the given pattern.
  --gitignore   Filter by using .gitignore files.
  --gitfile X   Explicitly read gitignore file.
  --ignore-case Ignore case when pattern matching.
  --matchdirs   Include directory names in -P pattern matching.
  --metafirst   Print meta-data at the beginning of each line.
  --prune       Prune empty directories from the output.
  --info        Print information about files found in .info files.
  --infofile X  Explicitly read info file.
  --noreport    Turn off file/directory count at end of tree listing.
  --charset X   Use charset X for terminal/HTML and indentation line output.
  --filelimit # Do not descend dirs with more than # files in them.
  -o filename   Output to file instead of stdout.
  ------- File options -------
  -q            Print non-printable characters as '?'.
  -N            Print non-printable characters as is.
  -Q            Quote filenames with double quotes.
  -p            Print the protections for each file.
  -u            Displays file owner or UID number.
  -g            Displays file group owner or GID number.
  -s            Print the size in bytes of each file.
  -h            Print the size in a more human readable way.
  --si          Like -h, but use in SI units (powers of 1000).
  --du          Compute size of directories by their contents.
  -D            Print the date of last modification or (-c) status change.
  --timefmt <f> Print and format time according to the format <f>.
  -F            Appends '/', '=', '*', '@', '|' or '>' as per ls -F.
  --inodes      Print inode number of each file.
  --device      Print device ID number to which each file belongs.
  ------- Sorting options -------
  -v            Sort files alphanumerically by version.
  -t            Sort files by last modification time.
  -c            Sort files by last status change time.
  -U            Leave files unsorted.
  -r            Reverse the order of the sort.
  --dirsfirst   List directories before files (-U disables).
  --filesfirst  List files before directories (-U disables).
  --sort X      Select sort: name,version,size,mtime,ctime.
  ------- Graphics options -------
  -i            Don't print indentation lines.
  -A            Print ANSI lines graphic indentation lines.
  -S            Print with CP437 (console) graphics indentation lines.
  -n            Turn colorization off always (-C overrides).
  -C            Turn colorization on always.
  ------- XML/HTML/JSON options -------
  -X            Prints out an XML representation of the tree.
  -J            Prints out an JSON representation of the tree.
  -H baseHREF   Prints out HTML format with baseHREF as top directory.
  -T string     Replace the default HTML title and H1 header with string.
  --nolinks     Turn off hyperlinks in HTML output.
  --hintro X    Use file X as the HTML intro.
  --houtro X    Use file X as the HTML outro.
  ------- Input options -------
  --fromfile    Reads paths from files (.=stdin)
  --fromtabfile Reads trees from tab indented files (.=stdin)
  --fflinks     Process link information when using --fromfile.
  ------- Miscellaneous options -------
  --version     Print version and exit.
  --help        Print usage and this help message and exit.
  --            Options processing terminator.

┌──(root㉿kali)-[~]
└─# dpkg -l | grep tree  
ii  cherrytree                                     0.99.48+dfsg-1                       amd64        hierarchical note taking application
ii  libhtml-tree-perl                              5.07-3                               all          Perl module to represent and create HTML syntax trees
ii  libxml-twig-perl                               1:3.52-2                             all          Perl module for processing huge XML documents in tree mode
ii  libxml-xpathengine-perl                        0.14-2                               all          re-usable XPath engine for DOM-like trees
ii  python3-asciitree                              0.3.3-3                              all          Draw tree structures using (ASCII or Unicode) characters
ii  python3-asttokens                              2.2.1-1                              all          annotate Python asbtract syntax trees with code references (Python 3)
ii  tree                                           2.1.1-1                              amd64        displays an indented directory tree, in color

案例2 :使用dpkg安装软件包

┌──(root㉿kali)-[~] ## 卸载
└─# apt-get remove tree   
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成  

┌──(root㉿kali)-[~]
└─# cd work/doc  
                                                                                     
┌──(root㉿kali)-[~/work/doc]
└─# pwd   
/root/work/doc

## apt-get download -- 下载指定的二进制包到当前目录
┌──(root㉿kali)-[~/work/doc]
└─# apt-get download tree
获取:1 http://mirrors.ustc.edu.cn/kali kali-rolling/main amd64 tree amd64 2.1.1-1 [54.4 kB]
已下载 54.4 kB,耗时 0秒 (200 kB/s)
W: 由于文件'/root/work/doc/tree_2.1.1-1_amd64.deb'无法被用户'_apt'访问,已脱离沙盒并提权为根用户来进行下载。 - pkgAcquire::Run (13: 权限不够)
 
┌──(root㉿kali)-[~/work/doc]
└─# ls -lh                    
总计 56K
-rw-r--r-- 1 root root 54K  6月27日 02:08 tree_2.1.1-1_amd64.deb

##  dpkg -i 安装本地软件包
┌──(root㉿kali)-[~/work/doc]
└─# dpkg -i tree_2.1.1-1_amd64.deb 
正在选中未选择的软件包 tree。
(正在读取数据库 ... 系统当前共安装有 428197 个文件和目录。)
准备解压 tree_2.1.1-1_amd64.deb  ...
正在解压 tree (2.1.1-1) ...
正在设置 tree (2.1.1-1) ...
正在处理用于 kali-menu (2023.4.2) 的触发器 ...
正在处理用于 man-db (2.11.2-3) 的触发器 ...
                                                                                     
┌──(root㉿kali)-[~/work/doc]
└─# which tree
/usr/bin/tree
  

┌──(root㉿kali)-[~/work/doc]
└─# dpkg -l | grep tree 
ii  cherrytree                                     0.99.48+dfsg-1                       amd64        hierarchical note taking application
ii  libhtml-tree-perl                              5.07-3                               all          Perl module to represent and create HTML syntax trees
ii  libxml-twig-perl                               1:3.52-2                             all          Perl module for processing huge XML documents in tree mode
ii  libxml-xpathengine-perl                        0.14-2                               all          re-usable XPath engine for DOM-like trees
ii  python3-asciitree                              0.3.3-3                              all          Draw tree structures using (ASCII or Unicode) characters
ii  python3-asttokens                              2.2.1-1                              all          annotate Python asbtract syntax trees with code references (Python 3)
ii  tree                                           2.1.1-1                              amd64        displays an indented directory tree, in color
    

案例3 :安装一个集成的开发环境(IDE Visual Studio Code)

## 拿到下载链接
┌──(root㉿kali)-[~/work/doc]
└─#  wget https://az764295.vo.msecnd.net/stable/6c3e3dba23e8fadc360aed75ce363ba185c49794/code_1.81.1-1691620686_amd64.deb
--2023-08-24 15:43:14--  https://az764295.vo.msecnd.net/stable/6c3e3dba23e8fadc360aed75ce363ba185c49794/code_1.81.1-1691620686_amd64.deb
正在解析主机 az764295.vo.msecnd.net (az764295.vo.msecnd.net)... 117.18.232.200
正在连接 az764295.vo.msecnd.net (az764295.vo.msecnd.net)|117.18.232.200|:443... 失败:拒绝连接。

## apt-get install -f  这样的方式 会自动解决依赖  dpkg -i 本地安装不会自动解决依赖
┌──(root㉿kali)-[~/work/doc] 
└─# apt-get install -f ./code_1.81.1-1691620686_amd64.deb
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成                 
注意,选中 'code' 而非 './code_1.81.1-1691620686_amd64.deb'

apt-get install

案例4 :安装mtr 路由跟踪工具

window -- tracert

linux -- traceroute

┌──(root㉿kali)-[~/work/doc]
└─# traceroute --help
Usage:
  traceroute [ -46dFITnreAUDV ] [ -f first_ttl ] [ -g gate,... ] [ -i device ] [ -m max_ttl ] [ -N squeries ] [ -p port ] [ -t tos ] [ -l flow_label ] [ -w MAX,HERE,NEAR ] [ -q nqueries ] [ -s src_addr ] [ -z sendwait ] [ --fwmark=num ] host [ packetlen ]
Options:
  -4                          Use IPv4
  -6                          Use IPv6
  -d  --debug                 Enable socket level debugging
  -F  --dont-fragment         Do not fragment packets
  -f first_ttl  --first=first_ttl
                              Start from the first_ttl hop (instead from 1)
  -g gate,...  --gateway=gate,...
                              Route packets through the specified gateway
                              (maximum 8 for IPv4 and 127 for IPv6)
  -I  --icmp                  Use ICMP ECHO for tracerouting
  -T  --tcp                   Use TCP SYN for tracerouting (default port is 80)
  -i device  --interface=device
                              Specify a network interface to operate with
  -m max_ttl  --max-hops=max_ttl
                              Set the max number of hops (max TTL to be
                              reached). Default is 30
  -N squeries  --sim-queries=squeries
                              Set the number of probes to be tried
                              simultaneously (default is 16)
  -n                          Do not resolve IP addresses to their domain names
  -p port  --port=port        Set the destination port to use. It is either
                              initial udp port value for "default" method
                              (incremented by each probe, default is 33434), or
                              initial seq for "icmp" (incremented as well,
                              default from 1), or some constant destination
                              port for other methods (with default of 80 for
                              "tcp", 53 for "udp", etc.)
  -t tos  --tos=tos           Set the TOS (IPv4 type of service) or TC (IPv6
                              traffic class) value for outgoing packets
  -l flow_label  --flowlabel=flow_label
                              Use specified flow_label for IPv6 packets
  -w MAX,HERE,NEAR  --wait=MAX,HERE,NEAR
                              Wait for a probe no more than HERE (default 3)
                              times longer than a response from the same hop,
                              or no more than NEAR (default 10) times than some
                              next hop, or MAX (default 5.0) seconds (float
                              point values allowed too)
  -q nqueries  --queries=nqueries
                              Set the number of probes per each hop. Default is
                              3
  -r                          Bypass the normal routing and send directly to a
                              host on an attached network
  -s src_addr  --source=src_addr
                              Use source src_addr for outgoing packets
  -z sendwait  --sendwait=sendwait
                              Minimal time interval between probes (default 0).
                              If the value is more than 10, then it specifies a
                              number in milliseconds, else it is a number of
                              seconds (float point values allowed too)
  -e  --extensions            Show ICMP extensions (if present), including MPLS
  -A  --as-path-lookups       Perform AS path lookups in routing registries and
                              print results directly after the corresponding
                              addresses
  -M name  --module=name      Use specified module (either builtin or external)
                              for traceroute operations. Most methods have
                              their shortcuts (`-I' means `-M icmp' etc.)
  -O OPTS,...  --options=OPTS,...
                              Use module-specific option OPTS for the
                              traceroute module. Several OPTS allowed,
                              separated by comma. If OPTS is "help", print info
                              about available options
  --sport=num                 Use source port num for outgoing packets. Implies
                              `-N 1'
  --fwmark=num                Set firewall mark for outgoing packets
  -U  --udp                   Use UDP to particular port for tracerouting
                              (instead of increasing the port per each probe),
                              default port is 53
  -UL                         Use UDPLITE for tracerouting (default dest port
                              is 53)
  -D  --dccp                  Use DCCP Request for tracerouting (default port
                              is 33434)
  -P prot  --protocol=prot    Use raw packet of protocol prot for tracerouting
  --mtu                       Discover MTU along the path being traced. Implies
                              `-F -N 1'
  --back                      Guess the number of hops in the backward path and
                              print if it differs
  -V  --version               Print version info and exit
  --help                      Read this help and exit

Arguments:
+     host          The host to traceroute to
      packetlen     The full packet length (default is the length of an IP
                    header plus 40). Can be ignored or increased to a minimal
                    allowed value
                                      
┌──(root㉿kali)-[~/work/doc]
└─# apt-cache search ^mtr                                
mtr - Full screen ncurses and X11 traceroute tool
mtr-tiny - Full screen ncurses traceroute tool
mtree-netbsd - Validates directory tree against specification

                                                                                     
┌──(root㉿kali)-[~/work/doc]
└─# apt-get install mtr                                  
正在读取软件包列表... 完成
正在分析软件包的依赖关系树... 完成
正在读取状态信息... 完成                 
下列软件包是自动安装的并且现在不需要了:

└─# mtr qq.com    
        

mtr qq.com

案例5 :升级软件包

python3的升级

┌──(root㉿kali)-[~/work/doc]
└─# python3 -V
Python 3.11.4
                                                                                                         
┌──(root㉿kali)-[~/work/doc]
└─# apt-get upgrade python3


案例6 :通过git方式安装软件

┌──(root㉿kali)-[~/work/doc]
└─# git -h                 
用法:git [-v | --version] [-h | --help] [-C <路径>] [-c <名称>=<取值>]
           [--exec-path[=<路径>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<路径>] [--work-tree=<路径>] [--namespace=<名称>]
           [--config-env=<名称>=<环境变量>] <命令> [<参数>]

这些是各种场合常见的 Git 命令:

开始一个工作区(参见:git help tutorial)
   clone     克隆仓库到一个新目录
   init      创建一个空的 Git 仓库或重新初始化一个已存在的仓库

在当前变更上工作(参见:git help everyday)
   add       添加文件内容至索引
   mv        移动或重命名一个文件、目录或符号链接
   restore   恢复工作区文件
   rm        从工作区和索引中删除文件

检查历史和状态(参见:git help revisions)
   bisect    通过二分查找定位引入 bug 的提交
   diff      显示提交之间、提交和工作区之间等的差异
   grep      输出和模式匹配的行
   log       显示提交日志
   show      显示各种类型的对象
   status    显示工作区状态

扩展、标记和调校您的历史记录
   branch    列出、创建或删除分支
   commit    记录变更到仓库
   merge     合并两个或更多开发历史
   rebase    在另一个分支上重新应用提交
   reset     重置当前 HEAD 到指定状态
   switch    切换分支
   tag       创建、列出、删除或校验一个 GPG 签名的标签对象

协同(参见:git help workflows)
   fetch     从另外一个仓库下载对象和引用
   pull      获取并整合另外的仓库或一个本地分支
   push      更新远程引用和相关的对象

命令 'git help -a' 和 'git help -g' 显示可用的子命令和一些概念帮助。
查看 'git help <命令>' 或 'git help <概念>' 以获取给定子命令或概念的
帮助。
有关系统的概述,查看 'git help git'。

开源的 情报搜集工具 recon-ng

┌──(root㉿kali)-[~/work/doc]
└─# git clone https://github.com/lanmaster53/recon-ng.git
正克隆到 'recon-ng'...
remote: Enumerating objects: 9522, done.
remote: Counting objects: 100% (19/19), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 9522 (delta 3), reused 14 (delta 3), pack-reused 9503
接收对象中: 100% (9522/9522), 3.06 MiB | 775.00 KiB/s, 完成.
处理 delta 中: 100% (4958/4958), 完成.

┌──(root㉿kali)-[~/work/doc]
└─# ls         
code_1.81.1-1691620686_amd64.deb  recon-ng  tree_2.1.1-1_amd64.deb
                                                                                                         
┌──(root㉿kali)-[~/work/doc]
└─# cd regon-ng
cd: 没有那个文件或目录: regon-ng
                                                                                                         
┌──(root㉿kali)-[~/work/doc]
└─# cd recon-ng
                                                                                                         
┌──(root㉿kali)-[~/work/doc/recon-ng]
└─# ls
docker-compose.yml  LICENSE    recon      recon-ng   REQUIREMENTS
Dockerfile          README.md  recon-cli  recon-web  VERSION

                                                                                                         
┌──(root㉿kali)-[~/work/doc/recon-ng]
└─# pip install -r REQUIREMENTS


┌──(root㉿kali)-[~/work/doc/recon-ng]
└─# recon-ng
[*] Version check disabled.

    _/_/_/    _/_/_/_/    _/_/_/    _/_/_/    _/      _/            _/      _/    _/_/_/
   _/    _/  _/        _/        _/      _/  _/_/    _/            _/_/    _/  _/       
  _/_/_/    _/_/_/    _/        _/      _/  _/  _/  _/  _/_/_/_/  _/  _/  _/  _/  _/_/_/
 _/    _/  _/        _/        _/      _/  _/    _/_/            _/    _/_/  _/      _/ 
_/    _/  _/_/_/_/    _/_/_/    _/_/_/    _/      _/            _/      _/    _/_/_/    


                                          /\
                                         / \\ /\
    Sponsored by...               /\  /\/  \\V  \/\
                                 / \\/ // \\\\\ \\ \/\
                                // // BLACK HILLS \/ \\
                               www.blackhillsinfosec.com

                  ____   ____   ____   ____ _____ _  ____   ____  ____
                 |____] | ___/ |____| |       |   | |____  |____ |
                 |      |   \_ |    | |____   |   |  ____| |____ |____
                                   www.practisec.com

                      [recon-ng v5.1.2, Tim Tomes (@lanmaster53)]                       

[*] No modules enabled/installed.

标签:...,--,kali,work,tree,案例,测试,软件,root
From: https://www.cnblogs.com/depressiom/p/17654622.html

相关文章

  • 20230824巴蜀暑期集训测试总结
    T1不是特别难,打暴力的时候想到一个优化,感觉能过。出分发现TLE了一个点。因为循环顺序!把限制更紧的循环放在外面!(updatein《一些tricks》)。T2考场打了一个\(O(n!n)\)的暴力拿\(10pts\)。推式子有手就行,但是起步很难(个人认为),考场上感觉无从下手。不知道该怎么描述这个技巧......
  • 什么是白盒测试,和的黑盒测试有什么区别?
     黑盒测试 软件测试是软件开发过程中的基本活动。黑盒测试和白盒测试是两种不同类型的软件测试策略,它们具有同样强大的功能,并且结合使用时甚至更好。一、黑盒测试在软件中,黑盒测试很方便,可以减少灾难性(软件)崩溃的风险。灾难性的软件崩溃可能是什么?系统在......
  • 测试
    一级标题二级标题三级标题一级标题二级标题这是一个段落这是另一个段落这是一个段落javadsadhaslkdhalksdklasdasdasddasda这是一个段落......
  • 软件测评报告:常见的技术指标(三)
     软件测试报告 以下是软件测评报告中常见的技术指标(三):1、内存消耗(MemoryConsumption):内存消耗指标是评估软件系统在内存使用方面所表现出的效率。它包括以下子指标:a.内存占用率(MemoryOccupancy):指软件系统运行时占用的内存量。b.内存泄漏(MemoryLeak......
  • 软件测试报告-测评中心-专业的CNAS测评机构有哪些?
     软件测试报告的类型 通常,测试报告分为六类:1、登记测试报告(适用于软件产品增值税即征即退以及双软评估)2、鉴定测试报告(适用于政府项目申报、高新认证、项目结题和创新产品认定等)3、验收测试报告(适用于各类软件和硬件系统相结合的综合性集成项目的第......
  • 从零做软件开发项目系列之四——数据库设计
    前言在对软件进行设计的过程中,数据库的设计是一项重要的内容,软件中主要的处理对象就是各类业务数据,通过对业务数据的处理,实现各种功能。我们经常说的,写程序,说到底就是增删改查,而增删改查的对象就是各种数据。数据都存储在数据库中,其重要性不言而喻,对于数据库的设计也是软件设计的......
  • Linux基础命令:应付测试面试
    1.进入文件命令vi文件名(一定要知道是那个目录下的文件) 下图为进入该文件: 2.编辑文件:先按I进入编辑模式就可以随便写入了保存之前一定要先退出编辑模式:按ESC接下来就是保存:    :q 不保存直接退出    ......
  • 从零做软件开发项目系列之三——系统设计
    前言在与客户充分接触后取得需求调研结果,然后分析调研内容,撰写完成项目的需求规格说明书。这是一个正式的文件,需要供需双方签字确认。说明书中会明确需求方的要求和开发方实现的内容,依据需求规格说明书,开发方就要开展系统设计工作。进行系统设计工作,粗略的可以分成两个阶段,概要......
  • 超越界限:大模型应用领域扩展,探索文本分类、文本匹配、信息抽取和性格测试等多领域应用
    超越界限:大模型应用领域扩展,探索文本分类、文本匹配、信息抽取和性格测试等多领域应用随着ChatGPT和GPT-4等强大生成模型出现,自然语言处理任务方式正在逐步发生改变。鉴于大模型强大的任务处理能力,未来我们或将不再为每一个具体任务去finetune一个模型,而是使用同一个大模型......
  • app和web测试的区分
    web测试和app的测试区别有哪些????一、系统架构不同web项目主要是基于浏览器的bs架构,而app项目主要是基于手机端的cs架构二、测试方法不同功能测试:web不支持离线浏览,但是有的app支持;性能测试:web主要关注服务器性能,app除了服务器还有考虑手机端的性能;兼容测试:web主要考虑浏览器的兼容性......