temp

CISCN 2019 writeup

吃可爱长大的小学妹 提交于 2019-12-29 12:19:43
划水做了两个pwn和两个逆向...... 二进制题目备份 Re easyGO Go 语言,输入有Please字样,ida搜索sequence of bytes搜please的hex值找到字符串变量,交叉引用查到主函数是 sub_495150 ,IDA断点动态调试 发现直接出现了 flag...... bbvvmm 用户名方面, Signsrch 搜索特征值发现存在 sm4 加密,然后一个 base64 加密(加密算法的元素顺序换了) 题目给了 Sm4 的 key 先使用变种 base64 解密。然后 sm4 解密得到用户名 badrer12 。附sm4解密算法 #include <string.h> #include <stdio.h> //#include "sm4.h" #include "time.h" // Test vector 1 // plain: 01 23 45 67 89 ab cd ef fe dc ba 98 76 54 32 10 // key: 01 23 45 67 89 ab cd ef fe dc ba 98 76 54 32 10 // round key and temp computing result: // rk[ 0] = f12186f9 X[ 0] = 27fad345 // rk[ 1] = 41662b61 X[ 1] =

git 操作相关

百般思念 提交于 2019-12-29 11:34:04
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 一、git从远程服务器更新本地代码 1、git fetch origin master:temp //将远程服务器master分支的获取下来,并存入本地的temp分支 2、git diff temp //查看本地与temp分支的差别 (git diff origin/master比较本地与远程服务器master分支的差别) 3、git merge temp //将本地master分支与temp分支合并 4、git branch -D temp //删除本地的temp分支 (git branch -a查看本地与远程服务器上的所有分支) 二、添加远程库。 1、git remote add origin git@github.com:cp-apple/learngVue.git 2、git push -u origin master //第一次后可以直接git push 参考链接: 廖雪峰老师的git教程之添加远程库 可能遇见的小问题: a. error:src refspec master does not match any. 原因分析:引起该错误的原因是,目录中没有文件,空目录是不能提交上去的 解决方案: touch readme.txt git add readme.txt git commit -m

SQL 临时表

人走茶凉 提交于 2019-12-27 08:42:10
表名前使用一个#号( # ),临时表是局部的,只允许当前会话使用;使用两个#号( ## ),临时表是全局的,当前在线的会话都可以使用,在断开连接后sql会自动删除临时表。 1 create table #a 2 ( 3 id int, 4 name varchar(50) 5 ) 6 insert into #a(id,name) values(1,'123') 7 select * from #a 8 drop table #a 临时表除了名称前多了#号外,其他操作与普通表完全一样。 tb_Student是已建立好的表,我们通过临时表temp把tb_Student表中的内容复制到tb_lizi表中,可以使用如下的代码实现: 1 use mcf 2 SELECT * INTO #temp FROM tb_Student 3 SELECT * INTO tb_lizi FROM #temp 执行后断开sql连接并重新连接(也可以退出sq再l重新启动sql),发现tb_lizi表中的内容tb_Student表中的内容完全一致,实现了复制,同时我们没有用代码删除temp表,但mcf数据库中却没有temp表了,这是因为断开连接时sql自动删除了temp表。 来源: https://www.cnblogs.com/Jinnchu/archive/2012/09/18/2690341.html

网络流24题解题报告小结

爷,独闯天下 提交于 2019-12-27 03:24:27
1 飞行员配对方案问题 二分图最大匹配 网络最大流 #include<iostream> #include<vector> #include<algorithm> #include<cstdio> #include<queue> #include<stack> #include<string> #include<map> #include<set> #include<cmath> #include<cassert> #include<cstring> #include<iomanip> using namespace std; #ifdef _WIN32 #define i64 __int64 #define out64 "%I64d\n" #define in64 "%I64d" #else #define i64 long long #define out64 "%lld\n" #define in64 "%lld" #endif /************ for topcoder by zz1215 *******************/ #define FOR(i,a,b) for( int i = (a) ; i <= (b) ; i ++) #define FFF(i,a) for( int i = 0 ; i < (a) ; i ++) #define FFD(i

某某文学网站小说爬虫

北战南征 提交于 2019-12-27 01:00:38
这个爬虫来自于一个问答贴: 看雪论坛: https://bbs.pediy.com/thread-256306.htm 吾爱破解: https://www.52pojie.cn/thread-1075559-1-1.html 发帖人是一个人。 感谢大佬提供技术支持: 切丝怕怕: https://bbs.pediy.com/user-733836.htm 这大概是我遇见反爬做的,最,那啥的小说网站了,网站如下: https://www.sztjgold.com/chapter.html?2#mybookid=83751&bookid=96158&chapterid=42616795 说几点: 一, 首先需要知道bytes类型是可遍历的 ,emmmm,我是才知道。 二,python里 ord和chr的使用 ,我个人好像是第一次使用,尴尬 说一下反爬: 1,小说内容不在源码里,所以无法直接获取; 2,小说内容经过加密和base64编码后,放在一个html页面,这个页面返回的是杂乱的js,需要格式化 3,这个html页面可以直接拼接,也可以按照源码里比较简单的js来改写成python语言生成 如图: 查看源码时,有如下生成链接的js,url_get_data就是对应的html链接 js需要的参数都在 https://www.sztjgold.com/chapter.html?2

python基本数据类型

佐手、 提交于 2019-12-26 02:22:09
在python中的基本数据类型有:int(数字) str(字符串) bool(布尔值) list(列表) tupel(元组) dict(字典) 类与对象的关系 如何查看对象的类?通过type来获取类型 temp = "hey" print(type(temp)) 输出为:<class 'str'> 如何在pycharm中查看类和对象的具体功能? 方法1:str,ctr+鼠标左键,找到str类,查看内部的方法。 方法2:B=dir(temp) 方法3:通过help help(type(temp)) 方法4:直接点击方法,鼠标放在方法上 ctr+鼠标左键 会自动定位到功能处。 基本数据类型:int n1 = 123 n2 = 456 print(n1+n2) 与 n1 = 123 n2 = 456 print(n1.__add__(n2)) 是一样的。 下划线的方法都是内置的。 查看二进制的位数: n1 = 4 ret = n1.bit_length() print(ret) 输出结果是3,说明二进制的位数是3 方法center: a1 = "alex" ret = a1.center(20,'_') 输出为 count方法: a1 = "alex is alph" ret = a1.count('a1',0) print(ret) 输出为:

python基本数据类型

一笑奈何 提交于 2019-12-26 02:17:41
一、 数字 int 字符串 str 布尔值 bool 字典 dict 列表 list 元组 temp 所有数据类型,都在内部存在相对应的类 二、 运算符 num +=1 自加1 num -=1 num *=1 num /=1 三、 查看对象的类,或对象所具备的功能 1、type temp="alex" t=type(temp) print(t) #str,ctr+鼠标左键,找到str类,内部所有的方法,可以通过project栏右上角的定位找到类 2.dir temp=‘alex’ b=dir(temp) 3、help,type help(type(temp)) 先获取到当前数据的类,再查看help调出所有方法 常用于看别人的代码 ctrl键+鼠标左键,可以找到当前数据类型内部的所有方法。 来源: https://www.cnblogs.com/aqiuarcadia/p/7290399.html

12345,上山打老虎。

别说谁变了你拦得住时间么 提交于 2019-12-26 00:35:02
一、 矩阵连乘的动态规划算法和程序 算法: 程序: ///测试数据30 35 35 15 15 5 5 10 10 20 20 25 # include <bits/stdc++.h> using namespace std ; # define MAXN 911 # define Max 99999999 struct MatrixDimension { int n , m ; ///表示矩阵是n*m维的 } Di [ MAXN ] ; void MatrixChain ( MatrixDimension MD [ ] , int * * s , int * * bestnum , int n ) ; void print ( int * * s , int l , int r ) ; int main ( ) { int n , i ; cout << "输入矩阵个数n = " ; cin >> n ; cout << "输入" << n << "个矩阵的维数:" << endl ; for ( i = 0 ; i < n ; i ++ ) cin >> Di [ i ] . n >> Di [ i ] . m ; int * * s = new int * [ n ] ; for ( int i = 0 ; i < n ; i ++ ) s [ i ] = new int [

迭代(遍历)时候不可以使用集合的remove和add方法,但可使用Java迭代器的remove和add方法

断了今生、忘了曾经 提交于 2019-12-25 14:07:19
不要在 foreach 循环里进行元素的 remove/add 操作。remove 元素请使用 Iterator 方式。 反例: public class ForeachTest { private List<String> list = new ArrayList<String>(); @Test public void forTest() { list.add("1"); list.add("2"); for(String temp : list) { if("1".equals(temp)) { list.remove(temp); } } for(String temp : list) { System.out.println(temp + " "); } } } 结果 如果将1换成2,结果就出错了 产生Concurrent Modification Exception原因是:当list.remove(Object o)方法之后,modCount和expectedModCount不相等了,然后当代码执行到next()方法时,判断了checkForComodification(),发现两个数值不等,就抛出该Exception;add(Object o)方法也是一样原因; 另外,Iterator是工作在一个独立的线程中,并且拥有一个mutex锁, Iterator

PAT 1025. 反转链表 (25)

梦想的初衷 提交于 2019-12-25 04:47:34
给定一个常数K以及一个单链表L,请编写程序将L中每K个结点反转。例如:给定L为1→2→3→4→5→6,K为3,则输出应该为3→2→1→6→5→4;如果K为4,则输出应该为4→3→2→1→5→6,即最后不到K个元素不反转。 输入格式: 每个输入包含1个测试用例。每个测试用例第1行给出第1个结点的地址、结点总个数正整数N(<= 10 5 )、以及正整数K(<=N),即要求反转的子链结点的个数。结点的地址是5位非负整数,NULL地址用-1表示。 接下来有N行,每行格式为: Address Data Next 其中 Address 是结点地址, Data 是该结点保存的整数数据, Next 是下一结点的地址。 输出格式: 对每个测试用例,顺序输出反转后的链表,其上每个结点占一行,格式与输入相同。 输入样例: 00100 6 4 00000 4 99999 00100 1 12309 68237 6 -1 33218 3 00000 99999 5 68237 12309 2 33218 输出样例: 00000 4 33218 33218 3 12309 12309 2 00100 00100 1 99999 99999 5 68237 68237 6 -1第一次提交最后一个测试点没过,原来是没考虑输入节点没在链表上的情况。 1 #include<stdio.h> 2 #include