
linux
esrrhs
http://www.esrrhs.xyz/
展开
-
动态链接库的注入修改查找工具hookso
hooksohookso是一个linux动态链接库的注入修改查找工具,用来修改其他进程的动态链接库行为。hookso是一个linux动态链接库的注入修改查找工具,用来修改其他进程的动态链接库行为。https://github.com/esrrhs/hooksogithub.com功能让某个进程执行系统调用 让某个进程执行.so的某个函数 给某个进程挂接新的.so 卸载某个进程的.so 把旧.so的函数替换为新.so的函数 复原.so的函数替换 查找.so的函数地址编译.原创 2020-05-20 15:20:55 · 746 阅读 · 0 评论 -
centos安装aria2及web端
去这个页面找yum安装方法https://centos.pkgs.org/6/repoforge-i386/aria2-1.16.3-1.el6.rf.i686.rpm.html安装好后生成配置文件并编辑mkdir /etc/aria2/ #创建目录vi /etc/aria2/aria2.conf #创建配置文件配置文件内容#用户名#rpc-user=user#原创 2017-10-18 17:23:52 · 5026 阅读 · 0 评论 -
void*和类成员函数指针的相互转换
linux环境下,示例代码如下,#include #include #include #include class class1{public: class1() { b = 10; } int memfunc1(int a) { printf("memfunc1原创 2014-11-11 13:15:15 · 2383 阅读 · 1 评论 -
GCC内嵌汇编简单实例
经常会在linux内核中看到汇编,而这个汇编又和正常的汇编不太一样,这个就是GCC中的内嵌汇编了。前先天,在移植dvb的frontend的时候看到了mb();这个函数,发现最终其执行的就是 [html] view plaincopy#define barrier __asm__ __volatile__(“”: : : “memory”)转载 2014-09-21 00:39:03 · 876 阅读 · 0 评论 -
解决方案: scp/ssh 的登陆提示很慢 (Linux)
看着用 windows 的 scp 命令很快很是羡慕. 这个问题让我实实郁闷了好几天. 在 Linux 下不管是用 ssh 还是用 scp, 连接速度都很慢 (登陆提示框的弹出时间).确切地讲, 每次的登陆连接平均消耗了 30 秒! 言归正传. 如何找出究竟是什么导致了 ssh 或是 scp 的登陆很慢? 如何修复该所谓的登陆 "慢" 或 "延迟"?今天 Google 了一转载 2014-07-11 14:33:02 · 1211 阅读 · 0 评论 -
hg下多个heads的问题
I don't think that you actually want to delete the heads. If you do that, you will lose the work that was done in those branches.You probably want to merge the heads back into one branch.Say that转载 2014-06-30 14:20:00 · 1757 阅读 · 0 评论 -
linux下hook函数
#include #include #include #include #include #include #include #include void set_hook(void *to_mock_func, void *mock_func) { uint8_t machine_code[]转载 2014-06-27 10:34:55 · 1141 阅读 · 0 评论 -
jprofiler_监控远程linux服务器的JVM进程
几天前写了一篇文章,jprofiler_监控远程linux服务器的tomcat进程(实践),介绍了使用jprofiler怎样监控远程linux的tomcat进程,这两天想了想,除了可以监控tomcat进程,是不是也可以监控其它的Java进程,可是找了一圈都是监控tomcat,于是就打算亲手实验一下本文打算把一个简单的java程序打包成jar包,并部署到linux服务器运行,然后使用jp转载 2017-10-27 16:44:49 · 612 阅读 · 0 评论 -
docker删除镜像和实例
docker system prune -adocker volume lsdocker volume rm volume_name volume_name原创 2018-05-25 09:58:06 · 1255 阅读 · 0 评论 -
owncloud同步无法写入的问题
删除同步目录下的.打头的隐藏文件,重启owncloud 客户端原创 2018-05-25 17:35:23 · 2590 阅读 · 0 评论 -
centos 安装docker的owncloud
version: '2.1'volumes: files: driver: local mysql: driver: local backup: driver: local redis: driver: localservices: owncloud: image: owncloud/server:${OWNCLOUD_VERSI...原创 2018-05-24 10:40:08 · 850 阅读 · 0 评论 -
迅雷离线下载 docker
https://github.com/esrrhs/docker-thunder-xware原创 2018-06-12 15:03:44 · 8489 阅读 · 0 评论 -
haproxy配置tcp转发带上ip
globaldefaults log global mode tcp option dontlognull timeout connect 5000 timeout client 50000 timeout server 50000resolvers dns nameserver svr1 8.8.8.8:53...原创 2018-07-27 16:20:40 · 5592 阅读 · 1 评论 -
德州扑克算法
德州扑克算法用于德州扑克的算法,包括以下功能https://github.com/esrrhs/texas_algorithm查表算法 评估算法使用<dependency> <groupId>com.github.esrrhs</groupId> <artifactId>texas_algorithm</a...原创 2018-07-27 16:22:09 · 7237 阅读 · 1 评论 -
utuntu添加启动项
Make sure /etc/rc.local is executable and that the script it calls is also executable.$ ls -l /etc/rc.local-rwxr-xr-x 1 root root 419 2010-08-27 11:26 /etc/rc.localMake sure rc.local has a sheb...转载 2018-12-13 16:37:15 · 453 阅读 · 0 评论 -
find方法
find / -amin -10 # 查找在系统中最后10分钟访问的文件 find / -atime -2 # 查找在系统中最后48小时访问的文件 find / -empty # 查找在系统中为空的文件或者文件夹 find / -group cat # 查找在系统中属于 groupcat的文件 find / -mmin -5 # 查找在系统中最后5分钟里修改过的文件原创 2014-05-22 15:49:28 · 554 阅读 · 0 评论 -
graphviz 工具厉害
graphviz原创 2014-04-13 13:44:53 · 536 阅读 · 0 评论 -
backtrace获取堆栈
#include #include #include #include #include #include void backtrace(){ const int maxLevel = 200; void* buffer[maxLevel]; int level = backtrace(buffer, maxLevel); const int SIZE转载 2014-04-12 17:30:19 · 601 阅读 · 0 评论 -
rhel下安装hg
下载http://mercurial.selenic.com/release/mercurial-2.8.tar.gz解压tar -xf http://mercurial.selenic.com/release/mercurial-2.8.tar.gzcd到目录里,执行make install然后就可以使用hg了比如hg clone xxx把仓库复制到本地hg ad原创 2013-12-10 15:46:43 · 646 阅读 · 0 评论 -
samba源代码安装
下载tar包,解压进入source目录或者source3目录./configure,make,make install复制example下的smd.conf文件去/usr/local/samba/lib下添加系统用户xxxcd到/usr/local/samba/bin下,添加smb用户smbpasswd -a xxx和密码cd到/usr/local/samba/sbin下,原创 2013-12-14 14:51:40 · 625 阅读 · 0 评论 -
linux替换目录内的内容
把当前目录下内容是abc的替换成defsed -i "s/abc/def/g" `grep "abc" -rl ./`原创 2013-12-17 11:53:51 · 664 阅读 · 1 评论 -
linux杀掉叫包含某个名字的进程
ps -ef | grep XXX | grep -v grep | awk '{print $2}' | xargs kill -9原创 2013-12-17 14:30:48 · 846 阅读 · 0 评论 -
linux替换文件名
把名字中有[template]xxx文件的替换成123xxx#! /bin/shfor i in `find ./ -name "\[template\]*"`; do echo $i ${i/\[template\]/123}done原创 2013-12-17 11:51:36 · 750 阅读 · 0 评论 -
linux代码获取某个进程的cpu、内存
struct CPUSnapShot{ CPUSnapShot() { char buff[256] = {0}; FILE原创 2014-01-16 22:58:26 · 990 阅读 · 0 评论 -
gdb调试时查看宏信息
在编译程序时 加上 -gdwarf-2 -g3 参数 即可。查看的时候得需要context才行原创 2014-02-22 16:22:39 · 992 阅读 · 0 评论 -
python修改文件内容
def func(filename): input = open(filename) lines = input.readlines() input.close() output = open(filename,'w') for line in lines: if not line: break if (('appdef.h' in line) and ('include' in line) ):原创 2014-02-28 23:01:41 · 690 阅读 · 0 评论 -
linux下查看静态库和动态库是32位还是64位
动态库:file ./usr/libexec/sudo_noexec.so静态库:objdump -a libmqapi.a原创 2014-03-03 11:40:42 · 1158 阅读 · 0 评论 -
graphviz画服务器架构图
digraph "DE Server Architecture" {rankdir = LR;node [width=0.375,height=0.25];Legend [shape=box,fontsize=24,shape=plaintext,label="DE Server Architecture"];gameserver1 [label="gameserver1",shape=原创 2014-04-13 15:47:56 · 1929 阅读 · 1 评论 -
简化移植google profiler
void StartProfiler(){ // 定时器 struct itimerval timer; timer.it_interval.tv_sec = 0; timer.it_interval.tv_usec = 10000; // 0.01秒 timer.it_value = timer.it_interval; setitimer(IT原创 2014-04-12 22:41:18 · 752 阅读 · 0 评论 -
backtrace有的情况会崩溃
在signal handler里面使用,有时候会core掉还是用你不能原创 2014-04-15 17:43:01 · 657 阅读 · 0 评论 -
undefined reference to `_Ux86_64_init_local'
链接libunwind报错undefined reference to `_Ux86_64_init_local'在include前面加宏原创 2014-04-15 16:03:16 · 2717 阅读 · 1 评论 -
内建获取调用地址
__builtin_return_address(x)x是层数原创 2014-04-15 16:07:15 · 560 阅读 · 0 评论 -
根据int随机生成名字
static void RandStrByInt(int data, char * out, size_t size) { const char words[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; out[size - 1] = 0;原创 2014-04-17 20:58:10 · 533 阅读 · 0 评论 -
SecureCRT登录执行
SecureCRT登录执行SecureCRT有一个Logon Actions功能,允许登录时执行一个远程命令。原创 2014-04-05 18:03:53 · 1199 阅读 · 0 评论 -
linux command
CommandDescription•apropos whatisShow commands pertinent to string. See also threadsafe•man -t ascii | ps2pdf - > ascii.pdfmake a pdf of a manual page which commandSh转载 2014-04-05 11:51:57 · 851 阅读 · 0 评论 -
rhel虚拟机设置局域网网卡
虚拟机改成桥接模式在 cd /etc/sysconfig/network-scripts/目录下,修改ifcfg-eth0文件DEVICE=eth0HWADDR=08:00:27:7e:4c:e4NM_CONTROLLED=yesONBOOT=yesBOOTPROTO=staticDNS2=10.103.0.20TYPE=EthernetDNS1=10.141.原创 2013-12-10 15:05:21 · 603 阅读 · 0 评论