自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

linux-0.11调试教程

linux-0.11调试教程

  • 博客(615)
  • 资源 (50)
  • 收藏
  • 关注

原创 bash源代码分析----rl_redisplay函数分析

(gdb) p rl_display_prompt$36 = 0x726c88 "[root@localhost bash-4.2.53]# "此函数比较大,慢慢分析。rl_display_prompt确实是指向了提示字符串。现在的任务还是,什么时候,哪个函数里面具体打印出提示字符串的?/* Basic redisplay algorithm. */voidrl_redisplay (){ register int in, out, c, linenum, cursor_line.

2021-03-11 11:24:12 582

原创 bash源代码分析----readline_internal_setup函数会打印出提示字符串

(gdb) n394 (*rl_redisplay_function) ();(gdb) n[root@localhost bash-4.2.53]# 398 if (rl_editing_mode == vi_mode)(gdb)STATIC_CALLBACK voidreadline_internal_setup (){ char *nprompt; _rl_in_stream = rl_instream; _rl_out_strea...

2021-03-11 11:12:45 185

原创 bash源代码分析----readline_internal_setup函数分析

readline_internal_setup函数里面打印出提示字符串,离目标又近了一步。/* Read a line of input from the global rl_instream, doing output on the global rl_outstream. If rl_prompt is non-null, then that is our prompt. */static char *readline_internal (){ int eof;...

2021-03-11 10:59:51 227

原创 bash源代码分析----yy_readline_get函数主要是调用了readline函数

/* **************************************************************** *//* *//* Let input be read from readline (). *//* *//* **************************************...

2021-03-11 10:15:45 149

原创 bash源代码分析----yy_getc函数分析

(gdb) syy_readline_get () at ./parse.y:14271427 {(gdb) p *(bash_input.getter)$29 = {int (void)} 0x41e830 <yy_readline_get>(gdb)shell_getc函数会调用yy_getc函数yy_getc函数就是一个指针引用/* Call this to get the next character of input. */static intyy_ge...

2021-03-11 10:11:11 409

原创 bash源代码分析----read_token函数调用shell_getc函数返回10也就是回车符

/* Function for yyparse to call. yylex keeps track of the last two tokens read, and calls read_token. */static intyylex (){ if (interactive && (current_token == 0 || current_token == '\n')) { /* Before we print a prompt, we might...

2021-03-11 09:35:59 268

原创 bash源代码分析----read_token函数调用了shell_getc函数

/* Read the next token. Command can be READ (normal operation) or RESET (to normalize state). */static intread_token (command) int command;{ int character; /* Current character. */ int peek_char; /* Temporary look-ahead charact...

2021-03-10 17:16:50 259

原创 bash源代码分析----yylex函数分析和decode_prompt_string函数负责分析并返回提示字符串

yylex函数调用位置:y.tab.c中if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; }/* Function for yyparse to call. yylex keeps track of the last two tokens read, and calls read_token. */static intyylex (...

2021-03-10 16:55:58 694

原创 bash源代码分析----bison--debug或-t选项的作用

bison--debug或-t选项的作用bison -y parse.y/* Debug traces. */#ifndef YYDEBUG# define YYDEBUG 0#endif#if YYDEBUGextern int yydebug;#endifbison -y --debug parse.y/* Debug traces. */#ifndef YYDEBUG# define YYDEBUG 1#endif#if YYDEBUGextern int yydeb..

2021-03-10 11:03:43 501

原创 bash源代码分析----打印提示符是如何实现的和get_string_value函数获取环境变量的值

/* Return the string value of a variable. Return NULL if the variable doesn't exist, or only has a function as a value. Don't cons a new string. */char *get_string_value (var_name) char *var_name;{ SHELL_VAR *var = find_variable (var_name...

2021-03-09 16:25:28 184

原创 bash源代码分析----bash --login的作用和--noprofile的作用

[root@localhost ~]# cat ~/.bash_profile# .bash_profile# Get the aliases and functionsif [ -f ~/.bashrc ]; then . ~/.bashrcfi# User specific environment and startup programsPATH=$PATH:$HOME/binexport PATHlshell="login shell will see this ...

2021-03-09 15:22:51 1884

原创 bash源代码分析----maybe_execute_file函数分析

执行哪些启动脚本? if (act_like_sh) maybe_execute_file ("~/.profile"); else { if (maybe_execute_file ("~/.bash_profile") == 0) if (maybe_execute_file ("~/.bash_login") == 0) maybe_execute_file ("~/.profile");...

2021-03-09 15:08:10 174

原创 bash源代码分析之shell.c中mail函数对HISTFILE的处理

/* Initialize the interactive history stuff. */ if (!shell_initialized) { char *hf = get_string_value ("HISTFILE"); if (hf) read_history (hf); } } /* Save the history of executed commands. */ if (inter...

2021-03-09 11:50:14 192

原创 bash源代码分析----shell_initialize函数和variables.c的关系

/* Do whatever is necessary to initialize the shell. Put new initializations in here. */shell_initialize (){ /* Line buffer output for stderr. If your machine doesn't have either of setlinebuf or setvbuf, you can just comment out the buffer...

2021-03-09 11:43:14 347 1

原创 bash源代码分析----after_flags之前处理flags和after_flags之后初始化shell_initialize函数和read_and_execute部分

第一部分:after_flags之前处理flags第二部分:after_flags之后初始化shell_initialize函数第三部分:read_and_execute部分main (argc, argv, env) int argc; char **argv, **env;{ int i, arg_index = 1; extern int yydebug; FILE *default_input = stdin; char *local_pend...

2021-03-09 11:36:36 215

原创 bash源代码分析----reader_loop函数分析和read_but_dont_execute的作用和just_one_command的作用

reader_loop (){ extern int indirection_level; int our_indirection_level; COMMAND *current_command = (COMMAND *)NULL; our_indirection_level = ++indirection_level; while (!EOF_Reached) { sighandler sigint_sighandler (); int code =...

2021-03-09 11:18:05 359

原创 bash源代码分析----login shell登录shell和interactive交互式shell的关系以及main函数中的change_flag_char函数

/* Non-zero means that this shell is a login shell. Specifically: 0 = not login shell. 1 = login shell from getty (or equivalent fake out) -1 = login shell from "-login" flag. -2 = both from getty, and from flag.*/int login_shell = -2;/* ...

2021-03-09 11:06:25 233

原创 bash源代码分析----shell_builtins[]数组和shell_flags[]数组的一一对应关系

builtins.c文件中的 shell_builtins[]数组和struct builtin shell_builtins[] = { { "set", set_builtin, 1, "set [-aefhkntuvx] [arg ...]]", " -a Mark variables which are modified or created for export\n\ -e Exit immediately if a command exits wit...

2021-03-09 10:36:29 287

原创 bash源代码分析----set_builtin函数和change_flag函数的关系

下面的文件的来源:http://www.oldlinux.org/Linux.old/gnu/bash/bash-1.05-linux.tar.gzset命令和flags.c文件密切相关。/* builtins.h -- a list of all commands that are shell builtins. See builtins.c to see where to add more builtins. */#include "config.h"int colon...

2021-03-09 10:24:14 386

原创 bash源代码分析之重定向----do_redirection_internal()函数

/* Do the specific redirection requested. Returns errno in case of error. If FOR_REAL is zero, then just do whatever is neccessary to produce the appropriate side effects. REMEMBERING, if non-zero, says to remember how to undo each redirection....

2021-03-03 15:35:13 147 1

原创 centos----bash中的重定向M>&N中的&引用符号的作用

gcc -c -g program.c >& compiler.txt我知道&> filename会将stdout和stderr重定向到文件filename。但在这种情况下,&符号是在大于号后。它看起来像其形式M>& N,其中M和N是文件描述符。在上面的代码段中,M = 1和N =’compiler.txt’[root@centos ~]# ls >&-bash: syntax error near unexpected ..

2021-03-03 14:39:23 519 1

原创 centos----utmpdump源代码分析一

/** utmpdump** Simple program to dump UTMP and WTMP files in raw format, so they can be* examined.** Based on utmpdump dump from sysvinit suite.** Copyright (C) 1991-2000 Miquel van Smoorenburg <miquels@cistron.nl>** Copyright (C)...

2021-02-27 10:48:56 529

原创 centos----util-linux软件包文件列表

[root@VM-0-12-centos xxxxxxxx]# rpm -qf /bin/utmpdumputil-linux-2.32.1-22.el8.x86_64[root@VM-0-12-centos xxxxxxxx]# rpm -ql util-linux|grep "bin"/usr/bin/cal/usr/bin/chmem/usr/bin/chrt/usr/bin/col/usr/bin/colcrt/usr/bin/colrm/usr/bin/column/usr/b

2021-02-27 10:33:27 860

原创 dropbear源代码分析之二----openwrt的登录到root用户公钥为什么保存在/etc/dropbear/authorized_keys

openwrt的登录到root用户公钥为什么保存在/etc/dropbear/authorized_keys?原因是openwrt对dropbear做了一点点的更改!!!打了一个patch下面是一个openwrt的源代码https://pan.baidu.com/share/link?shareid=3399010809&uk=939937960...

2021-01-21 19:00:34 895

原创 【全网首发】dropbear源代码分析之一::checkfileperm函数---dropbear免密登录的三个条件

dropbear[28567]: /root must be owned by user or root, and not writable by others# chmod 700 root# chown root:root /root

2021-01-20 17:31:39 1605

原创 centos----coreutils套件也包括chroot工具啊

[root@VM-0-12-centos log]# rpm -ql coreutils/usr/bin/[/usr/bin/arch/usr/bin/b2sum/usr/bin/base32/usr/bin/base64/usr/bin/basename/usr/bin/cat/usr/bin/chcon/usr/bin/chgrp/usr/bin/chmod/usr/bin/chown/usr/bin/cksum/usr/bin/comm/usr/

2021-01-14 22:19:26 743

原创 centos----coreutils中的sort -k 的意思是key

-k, --key=KEYDEF sort via a key; KEYDEF gives location and type\n\

2021-01-14 22:14:19 213

原创 centos---ssh之客户端known_hosts的作用是保存服务端的公key 

ssh之客户端known_hosts的作用是保存服务端的公key[root@VM-0-12-centos dropbear-2020.80]# ./dropbearkey -t rsa -f /etc/dropbear/dropbear_rsa_host_keyGenerating 2048 bit rsa key, this may take a while...Public key portion is:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDUc.

2021-01-14 07:13:19 1281

原创 centos----只需三条命令利用iptables和ipset长期封禁ip和临时封禁ip

iptables和ipset长期封禁ip和临时封禁ip[root@centos xxxx]# ipset create blacknow hash:ip[root@centos xxxx]# iptables -I INPUT -m set --match-set blacknow src -j DROP[root@centos xxxx]# lastb -n 2000 | awk '{ print $3 }'|sort |uniq -c |sort -nr|head -n 60|awk '{ pri

2021-01-12 09:47:17 386

原创 centos----grep自己单独的一个软件包,包括egrep,fgrep和grep三个命令

grep自己单独的一个软件包,包括egrep,fgrep和grep三个命令[xxxxxx@centos xxxxxx]# rpm -qa|grep grepgrep-3.1-6.el8.x86_64[xxxxxx@centos xxxxxx]# rpm -ql grep|head -n 20/etc/GREP_COLORS/etc/profile.d/colorgrep.csh/etc/profile.d/colorgrep.sh/usr/bin/egrep/usr/bin/fgrep/

2021-01-12 08:36:16 279

原创 centos----tftpd配置

tftp-server-0.49-7.el6.x86_64centos配置tftpd# default:off# description: The tftp server serves files using the trivial file transfer # protocol. The tftp protocol is often used to boot diskless # workstations, download configuration files t...

2021-01-04 11:09:27 236

原创 centos----windows的ftp匿名登录输入什么用户名和密码

anonymous和ftp,密码可以不输入。[root@admin]# ftp 172.2.6.15Connected to 172.2.6.15 (172.2.6.15).220 Microsoft FTP ServiceName (172.2.6.15:root): ftp331 Anonymous access allowed, send identity (e-mail name) as password.Password:230 User logged in.Remote sys

2021-01-03 16:13:03 1479

原创 centos---软件centos-release-8.0-0.1905.0.9.el8.x86_64和变量$releasever的关系

软件centos-release-8.0-0.1905.0.9.el8.x86_64和变量$releasever的关系rpm -qi centos-releaseName : centos-releaseVersion : 8.0Release : 0.1905.0.9.el8Architecture: x86_64Install Date: 2019年11月26日 星期二 10时12分10秒Group : System Environm...

2021-01-02 21:57:01 1086 1

原创 centos----centos-6.7--yum安装gcc4.4.7-16成功

rpm -ivh libxml2-python-2.7.6-14.el6.x86_64.rpmrpm -ivh python-deltarpm-3.5-0.5.20090913git.el6.x86_64.rpmrpm -ivh createrepo-0.9.9-18.el6.noarch.rpmcreaterepo /opt/admin/c67/rm /opt/admin/c67/TRANS.TBLcentos-6.7--yum安装gcc4.4.7-16成功[root@RCD c6.

2021-01-02 15:31:59 1136

原创 centos---gcc-4.4.7-4rpm包在centos6.5里面

gcc-4.4.7-4rpm包在centos6.5里面gcc-4.4.7-4.el6.i686.rpmcentos 6.5centos 6.7

2021-01-01 19:41:11 260

原创 拷贝兔ajax上传和返回tag函数分析

拷贝兔ajax上传和返回tag函数分析 function multipartUploadWithSts(file,burn) { $("#select_file").hide(); $("#uploading").show(); console.log("file=",file); var formData = new FormData(); formData.append("file",file); f...

2020-12-21 16:16:54 237

原创 php----Index.php中上传文件移动文件的源代码调试分析

controller/Index.php $file = request()->file('file'); $fileInfo = $file->getInfo(); $fp = fopen('./a.txt', 'a+b'); fwrite($fp, print_r($fileInfo, true)); fclose($fp);上面自己添加的四行调...

2020-12-21 15:48:01 367

原创 php----拷贝兔中选择文件按钮的upload_with_input事件

拷贝兔中选择文件按钮的upload_with_input事件view/index/index.html<div class="fileBox" draggable='true' ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)"><span id="fileSpan">拖拽到该区域</span><p id="uploadfile"></p>

2020-12-21 14:56:16 181

原创 如何查找自己的微信公众号主页并复制链接

如何查找自己的微信公众号主页并复制链接随意复制你微信公众号的一篇文章链接在浏览器打开查看源代码找到biz=*****编码,例如biz=MzUwOTg2MzgyMwhttps://mp.weixin.qq.com/mp/profile_ext?action=home&__biz=MzUwOTg2MzgyMw==&scene=117#wechat_redirect将 biz= 后面的*****编码替换成你刚才获取你自己公号的 openid,就可以获取到你公众号的主页链接啦...

2020-12-08 10:42:41 4831

原创 linux----利用ifconfig和grep和tr得到网卡地址

利用ifconfig和grep和tr得到网卡地址[xxxxxxxx@VM-0-12-centos ~]$ ifconfig eth0 | grep netmask inet 172.21.0.12 netmask 255.255.240.0 broadcast 172.21.15.255[xxxxxxxx@VM-0-12-centos ~]$ ifconfig eth0 | grep netmask | tr -s " "inet 172.21.0.12 netmask 255....

2020-12-07 16:44:05 634

TUTORIAL FOR INSTALLING MINIX-386

TUTORIAL FOR INSTALLING MINIX-386 MINIX 升级到 MINIX-386的经典 John Nall写的关于如何使用Bruce Evans的补丁程序将MINIX 1.5.10版升级到MINIX-386的说明。

2013-12-14

netcat.dll(UDP版) by chenghao0511

netcat.dll(UDP版) by chenghao0511 2013-05-20 by chenghao0511@gmail.com dll.dll(netcat.dll:nc -uLp 66) Load.exe injector in explorer.exe 备份在csdn资源库

2013-05-20

netcat 1.15-3 by chenghao0511

nc -u -lp port -e cmd.exe [remote] nc -u ip port [locate] (after ctrl+c,exit(0))

2013-05-16

netcat 1.15-2 by chenghao0511

in netcat.c in readwrite() rr = send (fd, zp, rr, 0); /* one line, or the whole buffer */ + if (strnicmp(zp, "exit\n", 5) == 0) /* UDP after input "exit",break! by chenghao0511 2013-05-14*/ + if(o_udpmode) + break; 修正了UDP连接中,输入exit后,远程端退出但本地不退出情况。

2013-05-14

nt4-ddk,压缩包,2k环境下安装的编译nt4的

nt4-ddk,压缩包,2k环境下安装的编译nt4的

2013-05-12

cmd.exe的源代码,nt4的

位置在\nt4\private\windows\cmd,zk代码中没发现cmd目录。

2013-05-12

nc115.rar by chenghao0511#gmail.com

nc -u -lp port -e cmd.exe

2013-05-11

Windows环境下32位汇编语言程序设计中13章的远程注入dll的例子

Windows环境下32位汇编语言程序设计中13章的远程注入dll的例子

2013-05-09

远程dll示例,学习远程线程的例子

远程dll示例,学习远程线程的例子. 先运行计算器,然后loader.exe,然后用netcat既军刀nc连接本地的66端口

2013-05-09

netcat 1.142 by chenghao0511

netcat nc chenghao0511 1.142 update you can use: nc -lp 66 < doexec.c nc -C 127.0.0.1 66 >test.c or: nc -lp 66 > test1.c nc -C 127.0.0.1 66 < doexec.c

2013-05-05

netcat 1.14 by chenghao0511

after: remote:nc -lp 55 < doexec.c local:nc ip 55 > test.c remote:nc -lp 55 < doexec.c _ [can not type in] local:nc ip 55 > test.c _ [can type in,remote out]

2013-05-03

netcat 1.13 by chenghao0511

netcat -C ip port -e cmd.exe

2013-05-01

nc112.rar

nc112.rar

2013-04-20

masm32 v11 免费下载

masm32 v11 免费下载

2013-04-18

samba rpm包 for centos-5.5

2010-04-27 04:00 4,402,581 samba3x-3.3.8-0.51.el5.i386.rpm 2010-04-27 04:00 12,760,275 samba3x-common-3.3.8-0.51.el5.i386.rpm 2010-04-27 04:00 3,232,573 samba3x-winbind-3.3.8-0.51.el5.i386.rpm 4 个文件 20,395,429 字节 2 个目录 87,655,424,000 可用字节

2013-03-25

bash 1.05 by gcc-1.40 in minix-386 第二版

bash 1.05 by gcc-1.40 in minix-386 第二版by chenghao0511#gmail.com 2013/2/23

2013-02-23

findipn for linux-0.11 by chenghao0511

findipn根据i节点号返回路径和文件名

2013-02-19

fdisk-by-chenghao0511 for linux-0.11

fdisk-by-chenghao0511 for linux-0.11 2013/2/16 by chenghao0511 # gmail.com patch to: /fs/ioctl.c /include/linux/hdreg.h /kernel/blk_drv/hd.c

2013-02-16

readinode for linux-0.11 by chenghao0511

2013/2/15 by chenghao0511 # gmail.com stat /bin/sh readinode /dev/hd1 2353 hexdump inode2353 0000000 81c9 0000 d400 0003 dc92 403f 0100 bbc7 0000010 bbc8 bbc9 bbca bbcb bbcc bbcd bbce 0000 0000020

2013-02-15

readblock for linux-0.11 by chenghao0511

readblock for linux-0.11 by chenghao0511 2013/2/15 by chenghao0511 # gmail.com stat hello.c fileino /dev/hd3 293 readblock 2560 ls -l 2560

2013-02-15

windows server 2003 checked版3790

windows server 2003 checked版3790

2024-09-14

vc2008工具软件包括dumpbin.exe

vc2008工具软件包括dumpbin.exe

2024-08-15

Windows Resource Kits 2003

Windows Resource Kits 2003

2024-08-07

成绩查询php源码.pdf

成绩查询php源码.pdf

2021-09-01

txtSQL1.0.zip

https://sourceforge.net/projects/txtsql/主页地址。2004年版本。就单个文件的类库。

2020-11-21

vi.rarLinux上的文本编辑器

vi编辑器,1992年古董级别的编辑器,linux上差不多是最早的编辑器。可执行文件。源代码大家自己找吧。

2020-11-16

isbn十位转13位.xlsx

isbn十位转13位.xlsx,10位转13位用的mid函数和mod函数,算法很简单。 13位转10位,用的choose函数和match函数,或者用if函数。

2020-05-09

usb3.0最新20170511驱动forwin7-

usb3.0最新20170511驱动forwin7-可以注入win7原版系统。用工具dism-GUI

2018-11-04

cute http file server 开发API

cute http file server 开发文档https://github.com/docblue/chfsgui图形界面Git地址

2018-11-01

Prime numbers and the Riemann zeta function.by Jørgen Veisdal

Prime numbers and the Riemann zeta function.by Jørgen Veisdal

2018-03-27

MT7601U驱动修改版16.04

MT7601U驱动修改版16.04MT7601U驱动修改版16.04MT7601U驱动修改版16.04

2017-12-17

initramfs-tools_0.103

initramfs-tools_0.103 https://launchpad.net/ubuntu/+source/initramfs-tools/0.103ubuntu9 有源代码下载

2015-01-29

run-init源代码

来源与klibc-2.0.4,klibc-2.0.4/usr/kinit目录

2015-01-29

awb-gcc-minix.rar

minix升级到minix-386所需的gcc-1.37.1

2014-05-01

linux-0.11硬盘集成盘14年1月9日by chenghao0511

linux-0.11硬盘集成盘14年1月9日by chenghao0511 2014年1月9日 by chenghao0511@gmail.com 制作方法:把bootsect 替换 原来的 make dd bs=8192 if=Image of=/dev/hd5 c h s 60 16 63 之后需要更改img的分区表,需要你先备份然后再拷贝回去 0x1BE到0x1CF是这个分区1的数据 001231048165041E2C010000317500000000

2014-01-09

调试shoelace的winiboot所需的img文件

调试shoelace的winiboot所需的img文件 60 16 63 c h s 让这个img为主盘启动,什么也不要操作。

2014-01-08

linux-0.11内核bochs实验编译环境

linux-0.11内核bochs实验编译环境

2014-01-04

readline used in linux-0.11 made in minix

readline used in linux-0.11 made in minix 14年1月4日 readline回车 quit离开

2014-01-04

linux-0.11内核文件备份

linux-0.11内核文件备份 用winimage加入diskb.img 然后进入系统后mcopy b:backup.Z backup.Z 然后解压tar xZvf backup.Z

2014-01-03

netpipe聊天室服务端

netpipe聊天室服务端 netpipe回车,本地开启5150端口。 netpipe 66回车,本地开启66端口。

2013-12-18

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除