0x00 动态加载模块 在python脚本中,直接使用import os.import subprocess或from os import system这种方法很容易被规则检测,即使使用其它执行命令的函数,依然容易被检测.所幸python中可以动态加载模块,而python的内置魔数方法_import_,可以直接根据字符串导入模块 >>> a = __import__('o'+'s') >>> a <module 'os' from 'C:\Python27\lib
1. 内置函数 # ### 内置函数 # abs 绝对值函数 res = abs(-10) print(res) # round 四舍五入 (n.5 n为偶数则舍去 n.5 n为奇数,则进一!) 奇进偶不进 res = round(13.56) res = round(4.5) res = round(5.5) res = round(4.53) res = round(4.9) print(res) # sum 计算一个序列得和 tup = (1,2,3,43,5,6,6) res = sum
这小节我们将要介绍如何定义变量.常量.Go 内置类型以及 Go 程序设计中的一些技巧. 定义变量 Go 语言里面定义变量有多种方式. 使用 var 关键字是 Go 最基本的定义变量方式,与 C 语言不同的是 Go 把变量类型放在变量名后面: // 定义一个名称为“variableName”,类型为"type"的变量 var variableName type 定义多个变量 // 定义三个类型都是“type”的变量 var vname1, vname2, vname3 type 定义变量