springboot 防止xss 和sql 注入 改写 http 请求 getParameter,getParameterValues,getHeader等方法 有点东西

article/2025/11/5 19:22:59

 

 目录

1.springboot 启动类 引入 过滤器配置

2.过滤器

3.XssAndSqlHttpServletRequestWrapper包装器 包装类

4.修改验证登录代码 这里只写了基础的 了解意思即可 

5.测试内容 

6.测试结果

7.反黑客小介绍(黑客大哥们好小弟这没啥大用O(∩_∩)O~,但是对待小白黑客还好)


1.springboot 启动类 引入 过滤器配置

package com.superman;import java.util.HashMap;
import java.util.Map;import org.apache.log4j.BasicConfigurator;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;import com.superman.conf.filter.XssAndSqlFilter;
import com.superman.tonifi.InitInfo;/*** 项目启动类* * @author yushen**/
@SpringBootApplication
public class Provider_App {/*** 项目启动入口* * @param args*/public static void main(String[] args) {SpringApplication.run(Provider_App.class, args);InitInfo.Info(); //初始化内容// 自动快速地使用缺省Log4j环境。BasicConfigurator.configure();}/*** 防止xss 和 sql 注入 * * @return*/@SuppressWarnings({ "unchecked", "rawtypes" })@Beanpublic FilterRegistrationBean xssFilterRegistrationBean() {FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();filterRegistrationBean.setFilter(new XssAndSqlFilter());filterRegistrationBean.setOrder(1);filterRegistrationBean.setEnabled(true);filterRegistrationBean.addUrlPatterns("/*");filterRegistrationBean.setName("XssAndSqlFilter");Map<String, String> initParameters = new HashMap();initParameters.put("excludes", "/favicon.ico,/img/*,/js/*,/css/*");initParameters.put("isIncludeRichText", "true");filterRegistrationBean.setInitParameters(initParameters);return filterRegistrationBean;}}
  • 这个可以注册到的的地方除了springbootappliaction 以外别的 配置也可以注册更具自己选择,最好方springbootappliaction 中 方便省事

     

2.过滤器

package com.superman.conf.filter;import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;import org.apache.commons.lang3.StringUtils;/*** 防止* xss 和 sql 注入漏洞* @author yushen* 20200611**/
public class XssAndSqlFilter implements Filter {/*** TODO 这个可以注册到的的地方除了springbootappliaction 以外别的 配置也可以注册更具自己选择,最好方springbootappliaction 中 方便省事** @Beanpublic FilterRegistrationBean xssFilterRegistrationBean() {FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();filterRegistrationBean.setFilter(new XssAndSqlFilter());filterRegistrationBean.setOrder(1);filterRegistrationBean.setEnabled(true);filterRegistrationBean.addUrlPatterns("/*");filterRegistrationBean.setName("XssAndSqlFilter");Map<String, String> initParameters = new HashMap();initParameters.put("excludes", "/favicon.ico,/img/*,/js/*,/css/*");initParameters.put("isIncludeRichText", "true");filterRegistrationBean.setInitParameters(initParameters);return filterRegistrationBean;}*/@Overridepublic void destroy() {// TODO Auto-generated method stub}@Overridepublic void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)throws IOException, ServletException {String method = "GET";String param = "";XssAndSqlHttpServletRequestWrapper xssRequest = null;if (request instanceof HttpServletRequest) {method = ((HttpServletRequest) request).getMethod();xssRequest = new XssAndSqlHttpServletRequestWrapper((HttpServletRequest) request);}if ("POST".equalsIgnoreCase(method)) {param = this.getBodyString(xssRequest.getReader());if(StringUtils.isNotBlank(param)){if(xssRequest.checkXSSAndSql(param)){response.setCharacterEncoding("UTF-8");response.setContentType("application/json;charset=UTF-8");PrintWriter out = response.getWriter();
//                    out.write(JSONResponseUtil.getWrappedERRString("您所访问的页面请求中有违反安全规则元素存在,拒绝访问!"));out.write("您所访问的页面请求中有违反安全规则元素存在,拒绝访问!");return;}}}if (xssRequest.checkParameter()) {response.setCharacterEncoding("UTF-8");response.setContentType("application/json;charset=UTF-8");PrintWriter out = response.getWriter();
//            out.write(JSONResponseUtil.getWrappedERRString("您所访问的页面请求中有违反安全规则元素存在,拒绝访问!"));out.write("您所访问的页面请求中有违反安全规则元素存在,拒绝访问!");return;}chain.doFilter(xssRequest, response);}@Overridepublic void init(FilterConfig arg0) throws ServletException {// TODO Auto-generated method stub}// 获取request请求body中参数public static String getBodyString(BufferedReader br) {String inputLine;String str = "";try {while ((inputLine = br.readLine()) != null) {str += inputLine;}br.close();} catch (IOException e) {System.out.println("IOException: " + e);}return str;}}

3.XssAndSqlHttpServletRequestWrapper包装器 包装类

package com.superman.conf.filter;import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import java.util.Vector;
import java.util.regex.Pattern;import javax.servlet.ReadListener;
import javax.servlet.ServletInputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;import org.springframework.util.StreamUtils;/*** 过滤器相关* @author yushen* 20200611*	创建XssAndSqlHttpServletRequestWrapper包装器,这是实现XSS过滤的关键,*	在其内重写了getParameter,getParameterValues,getHeader等方法,对http请求内的参数进行了过滤**/
public class XssAndSqlHttpServletRequestWrapper extends HttpServletRequestWrapper {HttpServletRequest orgRequest = null;private Map<String, String[]> parameterMap;private final byte[] body; //用于保存读取body中数据public XssAndSqlHttpServletRequestWrapper(HttpServletRequest request) throws IOException{super(request);orgRequest = request;parameterMap = request.getParameterMap();body = StreamUtils.copyToByteArray(request.getInputStream());}// 重写几个HttpServletRequestWrapper中的方法/*** 获取所有参数名** @return 返回所有参数名*/@Overridepublic Enumeration<String> getParameterNames() {Vector<String> vector = new Vector<String>(parameterMap.keySet());return vector.elements();}/*** 覆盖getParameter方法,将参数名和参数值都做xss & sql过滤。<br/>* 如果需要获得原始的值,则通过super.getParameterValues(name)来获取<br/>* getParameterNames,getParameterValues和getParameterMap也可能需要覆盖*/@Overridepublic String getParameter(String name) {String[] results = parameterMap.get(name);if (results == null || results.length <= 0)return null;else {String value = results[0];if (value != null) {value = xssEncode(value);}return value;}}/*** 获取指定参数名的所有值的数组,如:checkbox的所有数据 接收数组变量 ,如checkobx类型*/@Overridepublic String[] getParameterValues(String name) {String[] results = parameterMap.get(name);if (results == null || results.length <= 0)return null;else {int length = results.length;for (int i = 0; i < length; i++) {results[i] = xssEncode(results[i]);}return results;}}/*** 覆盖getHeader方法,将参数名和参数值都做xss & sql过滤。<br/>* 如果需要获得原始的值,则通过super.getHeaders(name)来获取<br/>* getHeaderNames 也可能需要覆盖*/@Overridepublic String getHeader(String name) {String value = super.getHeader(xssEncode(name));if (value != null) {value = xssEncode(value);}return value;}/*** 将容易引起xss & sql漏洞的半角字符直接替换成全角字符* * @param s* @return*/private static String xssEncode(String s) {if (s == null || s.isEmpty()) {return s;} else {s = stripXSSAndSql(s);}StringBuilder sb = new StringBuilder(s.length() + 16);for (int i = 0; i < s.length(); i++) {char c = s.charAt(i);switch (c) {case '>':sb.append(">");// 转义大于号break;case '<':sb.append("<");// 转义小于号break;// case '\'':// sb.append("'");// 转义单引号// break;// case '\"':// sb.append(""");// 转义双引号// break;case '&':sb.append("&");// 转义&break;case '#':   sb.append("#");// 转义#break;default:sb.append(c);break;}}return sb.toString();}/*** 获取最原始的request* * @return*/public HttpServletRequest getOrgRequest() {return orgRequest;}/*** 获取最原始的request的静态方法* * @return*/public static HttpServletRequest getOrgRequest(HttpServletRequest req) {if (req instanceof XssAndSqlHttpServletRequestWrapper) {return ((XssAndSqlHttpServletRequestWrapper) req).getOrgRequest();}return req;}/*** * 防止xss跨脚本攻击(替换,根据实际情况调整)*/public static String stripXSSAndSql(String value) {if (value != null) {// NOTE: It's highly recommended to use the ESAPI library and// uncomment the following line to// avoid encoded attacks.// value = ESAPI.encoder().canonicalize(value);// Avoid null characters/** value = value.replaceAll("", ""); ***/// Avoid anything between script tagsPattern scriptPattern = Pattern.compile("<[\r\n| | ]*script[\r\n| | ]*>(.*?)</[\r\n| | ]*script[\r\n| | ]*>", Pattern.CASE_INSENSITIVE);value = scriptPattern.matcher(value).replaceAll("");// Avoid anything in a// src="http://www.yihaomen.com/article/java/..." type of// e-xpressionscriptPattern = Pattern.compile("src[\r\n| | ]*=[\r\n| | ]*[\\\"|\\\'](.*?)[\\\"|\\\']",Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);value = scriptPattern.matcher(value).replaceAll("");// Remove any lonesome </script> tagscriptPattern = Pattern.compile("</[\r\n| | ]*script[\r\n| | ]*>", Pattern.CASE_INSENSITIVE);value = scriptPattern.matcher(value).replaceAll("");// Remove any lonesome <script ...> tagscriptPattern = Pattern.compile("<[\r\n| | ]*script(.*?)>",Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);value = scriptPattern.matcher(value).replaceAll("");// Avoid eval(...) expressionsscriptPattern = Pattern.compile("eval\\((.*?)\\)",Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);value = scriptPattern.matcher(value).replaceAll("");// Avoid e-xpression(...) expressionsscriptPattern = Pattern.compile("e-xpression\\((.*?)\\)",Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);value = scriptPattern.matcher(value).replaceAll("");// Avoid javascript:... expressionsscriptPattern = Pattern.compile("javascript[\r\n| | ]*:[\r\n| | ]*", Pattern.CASE_INSENSITIVE);value = scriptPattern.matcher(value).replaceAll("");// Avoid vbscript:... expressionsscriptPattern = Pattern.compile("vbscript[\r\n| | ]*:[\r\n| | ]*", Pattern.CASE_INSENSITIVE);value = scriptPattern.matcher(value).replaceAll("");// Avoid onload= expressionsscriptPattern = Pattern.compile("onload(.*?)=",Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);value = scriptPattern.matcher(value).replaceAll("");}return value;}public static boolean checkXSSAndSql(String value) {boolean flag = false;if (value != null) {// NOTE: It's highly recommended to use the ESAPI library and// uncomment the following line to// avoid encoded attacks.// value = ESAPI.encoder().canonicalize(value);// Avoid null characters/** value = value.replaceAll("", ""); ***/// Avoid anything between script tagsPattern scriptPattern = Pattern.compile("<[\r\n| | ]*script[\r\n| | ]*>(.*?)</[\r\n| | ]*script[\r\n| | ]*>", Pattern.CASE_INSENSITIVE);flag = scriptPattern.matcher(value).find();if (flag) {return flag;}// Avoid anything in a// src="http://www.yihaomen.com/article/java/..." type of// e-xpressionscriptPattern = Pattern.compile("src[\r\n| | ]*=[\r\n| | ]*[\\\"|\\\'](.*?)[\\\"|\\\']",Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);flag = scriptPattern.matcher(value).find();if (flag) {return flag;}// Remove any lonesome </script> tagscriptPattern = Pattern.compile("</[\r\n| | ]*script[\r\n| | ]*>", Pattern.CASE_INSENSITIVE);flag = scriptPattern.matcher(value).find();if (flag) {return flag;}// Remove any lonesome <script ...> tagscriptPattern = Pattern.compile("<[\r\n| | ]*script(.*?)>",Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);flag = scriptPattern.matcher(value).find();if (flag) {return flag;}// Avoid eval(...) expressionsscriptPattern = Pattern.compile("eval\\((.*?)\\)",Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);flag = scriptPattern.matcher(value).find();if (flag) {return flag;}// Avoid e-xpression(...) expressionsscriptPattern = Pattern.compile("e-xpression\\((.*?)\\)",Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);flag = scriptPattern.matcher(value).find();if (flag) {return flag;}// Avoid javascript:... expressionsscriptPattern = Pattern.compile("javascript[\r\n| | ]*:[\r\n| | ]*", Pattern.CASE_INSENSITIVE);flag = scriptPattern.matcher(value).find();if (flag) {return flag;}// Avoid vbscript:... expressionsscriptPattern = Pattern.compile("vbscript[\r\n| | ]*:[\r\n| | ]*", Pattern.CASE_INSENSITIVE);flag = scriptPattern.matcher(value).find();if (flag) {return flag;}// Avoid onload= expressionsscriptPattern = Pattern.compile("onload(.*?)=",Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);flag = scriptPattern.matcher(value).find();if (flag) {return flag;}}return flag;}public final boolean checkParameter() {Map<String, String[]> submitParams = new HashMap(parameterMap);Set<String> submitNames = submitParams.keySet();for (String submitName : submitNames) {Object submitValues = submitParams.get(submitName);if ((submitValues instanceof String)) {if (checkXSSAndSql((String) submitValues)) {return true;}} else if ((submitValues instanceof String[])) {for (String submitValue : (String[])submitValues){if (checkXSSAndSql(submitValue)) {return true;}}}}return false;}@Override    public BufferedReader getReader() throws IOException {    return new BufferedReader(new InputStreamReader(getInputStream()));    }    @Override    public ServletInputStream getInputStream() throws IOException {    final ByteArrayInputStream bais = new ByteArrayInputStream(body);    return new ServletInputStream() {    @Override    public int read() throws IOException {    return bais.read();    }  @Override  public boolean isFinished() {  // TODO Auto-generated method stub  return false;  }  @Override  public boolean isReady() {  // TODO Auto-generated method stub  return false;  }  @Override  public void setReadListener(ReadListener arg0) {  // TODO Auto-generated method stub  }    };    }}

4.修改验证登录代码 这里只写了基础的 了解意思即可 

//2.校验手机号和token号 String sql = "select * from userlogin where phonenum='"+phonenum+"' and token='"+tokennum+"' ";//3.不准确退回从新输入登录try {int resttokenjy = aed.queryApiInfo(sql).size();if(resttokenjy != 1){return new AsyncResult<>("验证码不正确!");}} catch (Exception e) {log.error(e.toString());return new AsyncResult<>("验证码不正确!");}
  • 重点是加上try 如果发生异常 也好吧信息异步返回 回去
  • 更具业务需求,返回自己特殊更多的内容,有需要进行其他安全设施的也可以像安全记录中进行记录数据
  • 如发现危险用户 恶意攻击系统等

 

5.测试内容 

6.测试结果

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
2020-06-12 10:02:22.045 INFO  com.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited
2020-06-12 10:02:22.192 ERROR com.superman.global.service.usercheck.UserLoginCheckService - org.springframework.jdbc.BadSqlGrammarException: 
### Error querying database.  Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '#'' at line 1
### The error may exist in file [D:\eclipseworks_2020\superporject\super_portal\target\classes\mybatis\mapper\ds1\ApiOneDao.xml]
### The error may involve com.superman.globaldao.ds1.ApiOneDao.queryApiInfo-Inline
### The error occurred while setting parameters
### SQL: select id from userlogin where phonenum='15600000000' and token='' or 1=1 #'
### Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '#'' at line 1
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '#'' at line 1

7.反黑客小介绍(黑客大哥们好小弟这没啥大用O(∩_∩)O~,但是对待小白黑客还好)

  • ok 我们这里可以看到 原本 半角代码 # 已经变成全角代码# 如此以来就可以完全防止sql 和xss 注入了,当然,还有有高手
  • 攻击破解系统,这时候就是继续再加点过滤器和系统安全防护策略,还有安全校验来实现,
  • 总体来讲
  • 要向防止系统被攻破
  • 就要自己多方几堵墙 阻挡破解的墙越多,黑客发现这么多阻挡,由于利益的权衡后发现,破解你的系统有些亏,大部分就
  • 去破解别的系统去了^_^ , 这说法仅当参考哈,还是你们想和黑客战斗的大哥们去战斗比试比试吧,
  • pk 下谁更牛 棒棒哒   O(∩_∩)O   

 

ok

 

 


http://chatgpt.dhexx.cn/article/EIYwCfYt.shtml

相关文章

java web中request.getParameterValues()和request.getParameter()异同

JavaWeb中获取表单的多行值采用request.getParameterValues(&#xff09;方法&#xff0c;request.getParameter()方法获取单个值 <!DOCTYPE html> <html lang"zh_CN"> <head><meta charset"UTF-8"><title>Title</title…

Jsp中getParameter、getParameterValues、getParameterNames和getParameterMap用法详解

以下是一个简单的jsp注册页面&#xff0c;从前端提交的数据 <% page language"java" import"java.util.*" pageEncoding"UTF-8"%> <% String path request.getContextPath(); String basePath request.getScheme()"://"re…

req.getParameterValues 输出前端乱码

前端页面 <% page contentType"text/html;charsetUTF-8" language"java" %> <html> <head><title>登录</title> </head> <body> <% page pageEncoding"UTF-8" %> <div style"text-ali…

jsp内置对象request——getParameterValues的使用

文章目录 前言一、getParameterValues是什么二、使用步骤 1.通过表单传入2.使用数组存取读入表单结果总结 提示&#xff1a;以下是本篇文章正文内容&#xff0c;下面案例可供参考 一、getParameterValues是什么 当控件中有多个选项时&#xff0c;要取到所有值可调用该方法&am…

initWithFormat 和stringWithFormat的区别

差别&#xff1a; 1、initWithFormat是实例办法 只能经由过程 NSString* str [[NSString alloc] initWithFormat:&#xff20;"&#xff05;&#xff20;"&#xff0c;&#xff20;"Hello World"] 调用&#xff0c;然则必须手动release来开释内存资料 2、…

C# string Format

使用C#格式化字符串 转载自博客园&#xff0c;原文连接&#xff1a;https://www.cnblogs.com/FlyingBread/archive/2007/01/18/620287.html&#xff0c;向原文作者献上敬意 1 前言 如果你熟悉Microsoft Foundation Classes&#xff08;MFC&#xff09;的CString&#xff0c;…

NSString函数stringWithFormat与stringWithString的比较

我们经常会初始化一些string使用NSString的stringWithString函数 但使用时发现了一个stringWithString的问题&#xff0c;如图 当参数是nil时&#xff0c;stringWithString会crash&#xff0c;所以使用时必须验证参数不是nil 相比较stringWithFormat就不会crash但返回的str也…

stringWithFormat:用法及注意事项

在ObjectiveC中NSString中有一个 stringWithFormat&#xff1a;方法 常见的输出方式&#xff1a; NSString *height; height [NSString stringWithFormat:"Your height is %d feet, %d inches.",5,11]; NSLog("%",height); 输出结果&#xff1a; 2013-04-…

虚拟机VirtualBox下载与安装、安装Ubuntu超详细图文步骤,对一些配置问题也有所写。

对于机器学习和深度学习来说&#xff0c;Linux系统是必不可少的。而我们在只是学习当中一般不会去重装一个Linux系统&#xff0c;而是去使用虚拟机来使用Linux系统。在VMware与VirtualBox这两款虚拟机的体验上&#xff0c;个人更偏向于后者&#xff0c;因为它所占内存更小&…

安装Windowsxp虚拟机

1.打开VMware&#xff0c;选择创建新的虚拟机&#xff0c;微软windows系统选择典型&#xff0c;而linux系统选择自定义&#xff1a; 2.选择稍后安装操作系统&#xff1a; 3.下一步选择相应合适的版本&#xff0c;选择存放位置&#xff1a; 4.选择合适大小的硬盘给虚拟机&…

在虚拟机VMware上安装XP系统

由于最近在学习uc/os-ii操作系统需要用到Borland C 3.1版本的软件&#xff0c;但是由于本人笔记本电脑的系统为Windows7 64位操作系统&#xff0c;与BC3.1不兼容&#xff0c;又不想直接换成XP系统&#xff0c;所以想在虚拟机VMware上安装XP&#xff0c;刚开始在网上搜了很多教程…

VirtualBox安装

1、VirtualBox安装 运行安装程序&#xff0c;一直下一步即可。如果不想安装到C盘&#xff0c;可以自己选盘符。 注意&#xff1a;软件开发安装所有程序时&#xff0c;不要安装到有中文或特殊符号的路径下。 2、安装操作系统 点击新建&#xff0c;弹出如下对话框 名称&…

VirtualBox虚拟机安装

一、宿主机(物理机)要求 宿主机建议内存大于4G&#xff0c;cpu至少4个 二、下载virtualBox https://www.virtualbox.org/wiki/Downloads 下载的安装包&#xff0c;默认安装即可(也可指定目录安装) 三、下载系统镜像 可以参考另外一篇各种ISO镜像 四、VirtualBox安装虚拟…

使用VirtualBox安装Ubuntu系统

一、下载VirtualBox软件安装包和Ubuntu系统镜像 1.1 下载VirtualBox安装包 点我进入VirtualBox官网下载安装包。 1.2 下载ubuntu20.04系统镜像 我使用的是国内清华大学的镜像&#xff0c;点我进行镜像选择和下载&#xff0c;这里我选择的是64位的系统镜像。 二、安装Vi…

如何在vmware workstation 上安装xp系统

准备&#xff1a;系统ISO镜像&#xff0c;可去MSDN下载。**Vmware workstation软件** 安装过程&#xff1a; 1&#xff0c;打开vmware软件&#xff0c;点击“创建新的虚拟机” 2&#xff0c;在窗口中选择典型&#xff0c;然后下一步。 3&#xff0c;选择“稍后安装操作系统”…

超级详细的 VirtualBox 虚拟机安装 及入门教程

一、前言 虚拟机&#xff08;Virtual Machine&#xff09;指通过软件模拟的具有完整硬件系统功能的、运行在一个完全隔离环境中的完整计算机系统。在实体计算机中能够完成的工作在虚拟机中都能够实现。 虚拟机是在一些开发测试工作中常常需要用到的功能&#xff0c;常见的虚拟机…

virtualbox安装详解

环境 系统&#xff1a;win7 内存&#xff1a;8GB 软件版本 VBox版本&#xff1a;安装的最新版本 [VirtualBox-5.2.12-122591-Win.exe] 运行VirtualBox的安装程序 执行步骤如下&#xff1a; 1、进入安装向导&#xff0c;点击”下一步“ 2、进入自定安装&#xff0c;软…

使用 virtualBox 安装 ubuntu

1.在官网上下载virtualBox windows用户点击如下图开始下载&#xff1a; 2.下载好VirtualBox-6.1.34a-150636-Win.exe文件后运行&#xff0c;一直点击下一步完成安装 3.在ubuntu镜像站下载Ubuntu&#xff0c;如下图&#xff1a; 4.打开VirtualBox&#xff0c;开始新建&#xf…

手把手教,使用Oracle VM VirtualBox虚拟机安装Windows XP系统,爷青回

文章目录 一、前言二、Oracle VM VirtualBox下载安装三、XP系统镜像下载四、创建XP虚拟机五、启动虚拟机&#xff0c;安装系统六、主机与虚拟机双向互传文件 一、前言 我写了一篇关于VMware虚拟机安装Windows XP系统的文章&#xff1a;https://linxinfa.blog.csdn.net/article…

在虚拟机中安装Windows XP

首先&#xff0c;下载镜像文件&#xff1a; 链接在这里&#xff1a;ed2k://|file|zh-hans_windows_xp_professional_with_service_pack_3_x86_cd_x14-80404.iso|630239232|CD0900AFA058ACB6345761969CBCBFF4|/ 可以使用迅雷下载&#xff0c;没会员我感觉也挺快&#xff08;我没…