1 public static String pathManipulation(String path) {
2 HashMap<String, String> map = new HashMap<String, String>();
3 map.put("a", "a");
4 map.put("b", "b");
5 map.put("c", "c");
6 map.put("d", "d");
7 map.put("e", "e");
8 map.put("f", "f");
9 map.put("g", "g");
10 map.put("h", "h");
11 map.put("i", "i");
12 map.put("j", "j");
13 map.put("k", "k");
14 map.put("l", "l");
15 map.put("m", "m");
16 map.put("n", "n");
17 map.put("o", "o");
18 map.put("p", "p");
19 map.put("q", "q");
20 map.put("r", "r");
21 map.put("s", "s");
22 map.put("t", "t");
23 map.put("u", "u");
24 map.put("v", "v");
25 map.put("w", "w");
26 map.put("x", "x");
27 map.put("y", "y");
28 map.put("z", "z");
29
30 map.put("A", "A");
31 map.put("B", "B");
32 map.put("C", "C");
33 map.put("D", "D");
34 map.put("E", "E");
35 map.put("F", "F");
36 map.put("G", "G");
37 map.put("H", "H");
38 map.put("I", "I");
39 map.put("J", "J");
40 map.put("K", "K");
41 map.put("L", "L");
42 map.put("M", "M");
43 map.put("N", "N");
44 map.put("O", "O");
45 map.put("P", "P");
46 map.put("Q", "Q");
47 map.put("R", "R");
48 map.put("S", "S");
49 map.put("T", "T");
50 map.put("U", "U");
51 map.put("V", "V");
52 map.put("W", "W");
53 map.put("X", "X");
54 map.put("Y", "Y");
55 map.put("Z", "Z");
56
57 map.put(":", ":");
58 map.put("/", "/");
59 map.put("\\", "\\");
60 map.put(".", ".");
61 map.put("-", "-");
62 map.put("_", "_");
63
64 map.put("0", "0");
65 map.put("1", "1");
66 map.put("2", "2");
67 map.put("3", "3");
68 map.put("4", "4");
69 map.put("5", "5");
70 map.put("6", "6");
71 map.put("7", "7");
72 map.put("8", "8");
73 map.put("9", "9");
74
75 String temp = "";
76 for (int i = 0; i < path.length(); i++) {
77 if (map.get(path.charAt(i) + "") != null) {
78 temp += map.get(path.charAt(i) + "");
79 }
80 }
81 return temp;
82 }

Path Manipulation安全漏洞处理方法的更多相关文章

  1. Fortify漏洞之Path Manipulation(路径篡改)

    继续对Fortify的漏洞进行总结,本篇主要针对 Path Manipulation(路径篡改)的漏洞进行总结,如下: 1.Path Manipulation(路径篡改) 1.1.产生原因: 当满足以 ...

  2. Path Manipulation 路径操作

  3. Fortify Audit Workbench 笔记 Path Manipulation

    Path Manipulation Abstract 通过用户输入控制 file system 操作所用的路径,借此攻击者可以访问或修改其他受保护的系统资源. Explanation 当满足以下两个条 ...

  4. Linux中Bash发现重大安全漏洞修改方法

    北京时间9月25日消息,Linux用户今天又得到了一个“惊喜”!Red Hat安全团队在 Linux 中广泛使用的Bash shell中发现了一个隐晦而危险的安全漏洞.该漏洞被称为“Bash Bug” ...

  5. Mysql漏洞修复方法思路及注意事项

    [系统环境] 系统环境:Red Hat Enterprise Linux Server release 5.4 (Tikanga)  +  5.7.16 MySQL Community Server  ...

  6. java中xxe漏洞修复方法

    java中禁止外部实体引用的设置方法不止一种,这样就导致有些开发者修复的时候采用的错误的方法 之所以写这篇文章是有原因的!最早是有朋友在群里发了如下一个pdf, 而当时已经是2019年1月末了,应该不 ...

  7. SQL注入漏洞解决方法

    本文只指针编码层次的SQL注入漏洞解决方法,例子代码是以java为主. 1,参数化的预编译查询语句 不安全例子 String query = "SELECT account_balance ...

  8. 阿里云提出的漏洞(Phpcms V9某处逻辑问题导致getshell漏洞解决方法)的问题

    最近从阿里云云盾检测流出来的,相比使用阿里云服务器的朋友已经收到漏洞提醒:Phpcms V9某处逻辑问题导致getshell漏洞解决方法,这个漏洞怎么办呢?CMSYOU在这里找到针对性解决办法分享给大 ...

  9. 微擎系统BUG漏洞解决方法汇总(原创)

    微擎微赞系统BUG漏洞解决方法汇总 弄了微擎系统来玩玩,发觉这个系统BUG还不少,阿里云的提醒都一大堆,主要是没有针对SQL注入做预防,处理的办法基本都是用转义函数. 汇总: 1. 漏洞名称: 微擎任 ...

  10. 关于阿里云ECS Centos 5/6/7 Linux Glibc库严重安全漏洞修复方法

    日前Linux GNU glibc标准库的 gethostbyname函数爆出缓冲区溢出漏洞,漏洞编号为CVE-2015-0235.黑客可以通过gethostbyname系列函数实现远程代码执行,获取 ...

随机推荐

  1. SpecCPU2017 测试cpu性能

    SpecCPU介绍见: https://blog.csdn.net/qq_36287943/article/details/103601539 官网:https://spec.org/ 1.SpecC ...

  2. goalng 将字符串转化成整数后取余

    package main import ( "fmt" "github.com/google/uuid" "hash/fnv" ) func ...

  3. laravel 服务容器,容器概念

    Laravel 服务容器 发现一篇讲服务容器的文章,讲的很好,转载过来laravel 服务容器 实质是工厂模式的升级,类的传递动态加载 ####以下内容转载 容器,字面上理解就是装东西的东西.常见的变 ...

  4. ssr 学习总结

    自己构建ssr 前提:了解  koa, koa-router, koa-static, webpack 文件结构 ssr  中的router store 都是  一个工厂函数 在服务器端渲染(SSR) ...

  5. mysql8改密码

    登录后执行语句 ALTER USER 'test'@'localhost' IDENTIFIED WITH MYSQL_NATIVE_PASSWORD BY '新密码'; 修改Host范围 updat ...

  6. NVIDIA显卡安装

    查看是否有gcc命令. 执行gcc  -v  查看相关版本信息.一般完整安装是有此命令的.没有就要自行安装. yum -y install  gcc  gcc-c++ 修改文件vim /lib/mod ...

  7. npm install报错C:\Users\Guyang\AppData\Roaming\npm-cache\_logs\xxx-14T01_06_33_159Z-debug-0.log

    先看报错 可以看到报错提示,给了个日志路径 有的兄弟看到其他博客给了一个命令 npm cache clean --force 或者 npm config set strict-ssl false 说是 ...

  8. Route路径

  9. python 通过win32com操作vcf到outlook中,同时解决乱码问题

    之前用的黑莓手机,故障后换了iphone,后来还是想用上黑莓Q10.于是有了该文章. 问题: 如何将iphone上的通讯录导入黑莓? 网上回答1:通过icloud将iphone中的通讯录导入黑莓手机. ...

  10. Task :app:lintVitalRelease FAILED

    错误信息:Task :app:lintVitalRelease FAILED 问题原因:dl.google.com 无法连接 解决办法: 修改hosts(推荐)通过在线查询ip网站,找到dl.goog ...