摘要: 之前尝试过windows下的简单TCP客户端服务器编写,这次尝试下一下Linux环境下的TCP 客户端代码 #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/soc 阅读全文
posted @ 2024-03-29 10:21 go__Ahead 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 最近看了下《TCP/IP网络编程》这本书,想自己实现一下TCP通信的客户端和服务器端 下面是源代码 Ser.c #include <stdio.h> #include <winsock2.h> #pragma comment(lib, "ws2_32.lib") struct CustomMessa 阅读全文
posted @ 2024-03-13 16:24 go__Ahead 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 1、在/home/hf/Desktop/pin/pin-3.30-98830-g1d7b601b3-gcc-linux/source/tools/ManualExamples/目录下写自己的pintools 去到该目录 cd /home/hf/Desktop/pin/pin-3.30-98830-g 阅读全文
posted @ 2024-03-13 14:13 go__Ahead 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 力扣225. 用队列实现栈 思路:主要是出栈操作,可以使用两个队列,出栈时将入栈队列中数据压入辅助队列中,直到入栈队列只剩下一个数据就是栈顶元素,然后再把辅助队列中元素全部压回入栈队列中,清空辅助队列 public: queue<int> que1; queue<int> que2; MyStack 阅读全文
posted @ 2024-03-10 10:40 go__Ahead 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 用栈实现队列,需要两个栈,一个定义为stackIn,另一个定义为stackOut 牛客NC76 用两个栈实现队列 1、队列的push()操作 这个直接将数据压入stcakIn,就行 void push(int node) { stackIn.push(node); } 2、队列的pop()操作 这里 阅读全文
posted @ 2024-03-10 09:57 go__Ahead 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 作为递归入门算法,我却仅仅学习了这题的递归解法,惭愧惭愧。今天来总结一下这道题的所有解法 1、递归解法 class Solution { public: int Fibonacci(int n) { //每3个一组,整成动态二维数组 // write code here if(n<=2){ retu 阅读全文
posted @ 2024-03-08 16:41 go__Ahead 阅读(6) 评论(0) 推荐(0) 编辑
摘要: ubuntu 配置ssh 1、查看ssh服务的开启状态 ps -e|grep ssh 2、如果终端没有返回 sshd,则需安装ssh-server sudo apt-get install openssh-server 3、启动服务 sudo /etc/init.d/ssh start 现在查看ss 阅读全文
posted @ 2024-03-07 15:19 go__Ahead 阅读(2) 评论(0) 推荐(0) 编辑
摘要: Myclass.h #pragma once #include<iostream> #include<Windows.h> #define SUCCESS 1 // 成功 #define ERROR -1 // 失败 #define MALLOC_ERROR -2 // 申请内存失败 #define 阅读全文
posted @ 2024-03-06 10:47 go__Ahead 阅读(5) 评论(0) 推荐(0) 编辑
摘要: 1、分别下载并安装两个版本的python 2、去安装的文件夹中将python.exe 和pythonw.exe改名加上版本号 3、将python.exe文件目录和当前目录下的Scripts目录都加到用户环境变量中去 重新安装pip 注:若遇到Scripts文件夹中没有pip,则在cmd中运行 pyt 阅读全文
posted @ 2024-01-31 19:29 go__Ahead 阅读(10) 评论(0) 推荐(0) 编辑
摘要: title: angr_ctf date: 2023-11-17 14:00:37 tags: CTF angr 的项目地址 https://github.com/jakespringer/angr_ctf angr实战 00 拖到IDA 就是输入正确的指令才能通关 这次试一下用angr来解题 go 阅读全文
posted @ 2024-01-25 19:07 go__Ahead 阅读(4) 评论(0) 推荐(0) 编辑