总结各种语言常见操作的代码,不熟悉新学习语言的语法也能快速开发.
#include <stdio.h>
int main()
{
printf("hello\n");
}
#include <iostream>
int main()
{
std::cout << "hello" << endl;
}
python可以不像c那样有特定入口函数main() 但可以用__name__
if __name__ == "__main__":
print("hello")
Sleep 是一个基于Java的,语法类似perl的语言,是cobalt strike的扩展语言 官方文档 http://sleep.dashnine.org/manual/index.html 没有入口函数,代码从上执行到下 解释器下载地址 http://sleep.dashnine.org/download.html 打开控制台
java -jar sleep.jar
加载写的脚本
load 1.cna
a.c
#include "b.h"
int main()
{
test();
}
b.c
#include <stdio.h>
void test()
{
printf("hello");
}
b.h
void test();
编译命令
gcc a.c b.c
a = "hello"
b = "world"
c = a + b
$a = "hello";
$b = "world";
$c = $a . $b;
println($c);
a = "h"
if a in "hello":
print("in")
else:
print("not in")
$a = "hello world";
$b = 'hello';
$c = '*' . $b . '*';
if ( $c iswm $a) {
println("match");
}
with open('a.txt', w) as f:
f.write('hello')
openf打开文件时可以指定是覆盖还是追加,一个>是覆盖
if (-canwrite "/etc/passwd")
{
$handle = openf(">>/etc/passwd");
println($handle, "raffi::0:0::/:/bin/sh");
closef($handle);
}