博文
基本的系统进程(2006-11-27 20:21:00)
摘要:基本的系统进程(也就是说,这些进程是系统运行的基本条件,有了这些进程,系统就能正常运行): smss.exe Session Manager csrss.exe 子系统服务器进程 winlogon.exe 管理用户登录 services.exe 包含很多系统服务lsass.exe 管理 IP 安全策略以及启动 ISAKMP/Oakley (IKE) 和 IP 安全驱动程序。(系统服务) 产生会话密钥以及授予用于交互式客户/服务器验证的服务凭据(ticket)。(系统服务) svchost.exe 包含很多系统服务 svchost.exe SPOOLSV.EXE 将文件加载到内存中以便迟后打印。(系统服务) explorer.exe 资源管理器 internat.exe 托盘区的拼音图标 附加的系统进程(这些进程不是必要的,你可以根据需要通过服务管理器来增加或减少): mstask.exe 允许程序在指定时间运行。(系统服务) regsvc.exe 允许远程注册表*作。(系统服务) winmgmt.exe 提供系统管理信息(系统服务)。 inetinfo.exe 通过 Internet 信息服务的管理单元提供 FTP 连接和管理。(系统服务) tlntsvr.exe 允许远程用户登录到系统并且使用命令行运行控制台程序。(系统服务) 允许通过 Internet 信息服务的管理单元管理 Web 和 FTP 服务。(系统服务) tftpd.exe 实现 TFTP Internet 标准。该标准不要求用户名和密码。远程安装服务的一部分。(系统服务) termsrv.exe 提供多会话环境允许客户端设备访问虚拟的 Windows 2000 Professional 桌面会话以及运行在服务器上的基 于 Windows 的程序。(系统服务) dns.exe 应答对域名系统(DNS)名称的查询和更新请求。(系统服务) 以下服务很少会用到,上面的服务都对安全有害,如果不是必要的应该关掉 tcpsvcs.exe 提供在 PXE 可远程启动客户计算机上远程安装 Windows 2000 Professional 的能力。(系统服务) 支持以下 TCP/IP 服务:Character Generator, Daytime, Discard, Echo, 以及 Quote of the Day......
批处理学习(2006-11-27 20:18:00)
摘要:后缀是bat的文件就是批处理文件,是一种文本文件。简单的说,它的作用就是自动的连续执行多条命令,批处理文件的内容就是一条一条的命令。那它有什么用呢?
比如,在启动wps软件时,每次都必须执行
C:\>cd wps C:\WPS>spdos C:\WPS>py C:\WPS>wbx C:\WPS>wps
如果每次用WPS之前都这样执行一次,您是不是觉得很麻烦呢?
如果有一个方法,只需编写一个批处理文件,就会自动执行刚才的所有命令,您想不想学呢?
当您看完此节,自己编写的第一个批处理文件顺利执行时,您一定会大吃一惊的。
此外电脑每次启动时都会寻找autoexec.bat这条批处理文件,从而可执行一些每次开机都要执行的命令,如设置路径path、加载鼠标驱动mouse、磁盘加速smartdrv等,可以使您的电脑真正自动化。
echo、@、call、pause、rem 是批处理文件最常用的几个命令,我们就从他们开始学起。 echo 表示显示此命令后的字符 echo off 表示在此语句后所有运行的命令都不显示命令行本身 @ 与echo off相象,但它是加在其它命令行的最前面,表示运行时不显示命令行本身。 call 调用另一条批处理文件(如果直接调用别的批处理文件 ,执行完那条文件后将无法执行当前文件后续命令) pause 运行此句会暂停,显示Press any key to continue... 等待用户按任意键后继续 rem 表示此命令后的字符为解释行,不执行,只是给自己今后查找用的
例:用edit编辑a.bat文件,输入下列内容后存盘为c:\a.bat,执行该批处理文件后可实现:将根目录中所有文件写入 a.txt中,启动UCDOS,进入WPS等功能。
批处理文件的内容为: 文件表示:
echo off 不显示命令行
dir c:\*.* >a.txt 将c盘文件列表写入a.txt
call c:\ucdos\ucdos.bat 调用ucdos
echo 你好 显示"你好"
......
讲课内容:批处理(2006-11-27 20:16:00)
摘要:
授课时间:2005年12月4日
批处理:批处理有也有些人称为批处理脚本,也有说成为批处理程序的。英文是batch 。我们现在的批处理文件后缀就是取其单词的前三个字母 *.bat,或者 *.cmd 。 一行可视为一个命令。每行命令里可以以包含多条子命令。从第一行开始到最后一行结束。(整体是这样的,如果中间加如如if ;for之类的循环 条件之类的除外)。基于批处理的平台是DOS系统。全名是磁盘操作系统disk operation system 。不过批处理(DOS命令)在入侵过程中用处还是很多的,DOS系统有一个好处: 速度快,不留痕迹。而且用多了会觉得比WIN下面的鼠标点的要爽。
现在进入批处理的正题。
.bat跟.cmd后缀运行的效果都是一样的.两种不同的后缀而已. 命令行在XP (NT之上的都是叫cmd调出.在win98类的系统都是以command调出. 现在谈下关系批处理的功能. 在入侵中,在实际操作中都有非常重要的作用. 先说下在入侵中...相信大家都见过这么一句代码:net use \ip\ipc$ "password" /u:"administrator"。如果把他转化成批量管理,或者破解的话,用批处理命令来解决怎么办? 下面我们将讲到这个. 还有实际应用中,比如说网吧的应用系统。自动备份功能,用批处理来解决的话也会更方便。 好了,功能及应用就说到这里,我们开始讲关于批处理的命令如何写。
一echo 命令
可以说这是一句回显开关命令. 大家可以在自己的CMD下试试 echo /? 帮助文件是如何的 。我想问,如果知道用户名和密码,用批处理能编个开IPC$的软件吗?(在本机上运行的)。你再输入echo off ,就关闭了回显了. 这个命令基本上只是显示后面的提示而建立的,比如你输入一个命令行 @echo Just me is a good guy 。屏幕就会显示Just me is a good guy。这条命令基本上的功能就是这样.
二 .@命令.
这条命令的作用于是不显示@后面的命令. 例如:书上的例子:@echo Now initializing the program,please wait a mi......
函数大全(w开头)(2006-11-27 20:09:00)
摘要:
函数名: wherex 功 能: 返回窗口内水平光标位置 用 法: int wherex(void); 程序例:
#include
int main(void) { clrscr(); gotoxy(10,10); cprintf("Current location is X: %d Y: %d\r\n", wherex(), wherey()); getch();
return 0; }
函数名: wherey 功 能: 返回窗口内垂直光标位置 用 法: int wherey(void); 程序例:
#include
int main(void) { clrscr(); gotoxy(10,10); cprintf("Current location is X: %d Y: %d\r\n", wherex(), wherey()); getch();
return 0; }
函数名: window 功 能: 定义活动文本模式窗口 用 法: void window(int left, int top, int right, int bottom); 程序例:
#include
int main(void) {
window(10,10,40,11); textcolor(BLACK); textbackground(WHITE); cprintf("This is a test\r\n");
return 0; }
函数名: write 功 能: 写到一文件中 用 法: int write(int handel, void *buf, int nbyte); 程序例:
#include #include #include #include #include #include
int main(void) { int handle; char string[40]; int length, res;
/* Create a file named "TEST.$$$" in the current directory and write a string to it. If "TEST.$$$" already exists, it will be overwritten. */
......
函数大全(v开头)(2006-11-27 20:08:00)
摘要:
函数名: vfprintf 功 能: 送格式化输出到一流中 用 法: int vfprintf(FILE *stream, char *format, va_list param); 程序例:
#include #include #include
FILE *fp;
int vfpf(char *fmt, ...) { va_list argptr; int cnt;
va_start(argptr, fmt); cnt = vfprintf(fp, fmt, argptr); va_end(argptr);
return(cnt); }
int main(void) { int inumber = 30; float fnumber = 90.0; char string[4] = "abc";
fp = tmpfile(); if (fp == NULL) { perror("tmpfile() call"); exit(1); }
vfpf("%d %f %s", inumber, fnumber, string); rewind(fp); fscanf(fp,"%d %f %s", &inumber, &fnumber, string); printf("%d %f %s\n", inumber, fnumber, string); fclose(fp);
return 0; }
函数名: vfscanf 功 能: 从流中执行格式化输入 用 法: int vfscanf(FILE *stream, char *format, va_list param); 程序例:
#include #include #include
FILE *fp;
int vfsf(char *fmt, ...) { va_list argptr; int cnt;
va_start(argptr, fmt); cnt = vfscanf(fp, fmt, argptr); va_end(argptr);
return(cnt); }
int main(void) { int inumber = 30; float fnumber = 90.0; char string[4] = ......
函数大全(u开头)(2006-11-27 20:07:00)
摘要:
函数名: ultoa 功 能: 转换一个无符号长整型数为字符串 用 法: char *ultoa(unsigned long value, char *string, int radix); 程序例:
#include #include
int main( void ) { unsigned long lnumber = 3123456789L; char string[25];
ultoa(lnumber,string,10); printf("string = %s unsigned long = %lu\n",string,lnumber);
return 0; }
函数名: ungetc 功 能: 把一个字符退回到输入流中 用 法: int ungetc(char c, FILE *stream); 程序例:
#include #include
int main( void ) { int i=0; char ch;
puts("Input an integer followed by a char:");
/* read chars until non digit or EOF */ while((ch = getchar()) != EOF && isdigit(ch)) i = 10 * i + ch - 48; /* convert ASCII into int value */
/* if non digit char was read, push it back into input buffer */ if (ch != EOF) ungetc(ch, stdin);
printf("i = %d, next char in buffer = %c\n", i, getchar()); return 0; }
函数名: ungetch 功 能: 把一个字符退回到键盘缓冲区中 用 法: int ungetch(int c); 程序例:
#include #include #include
int main( void ) { int i=0; char ch;
puts("Input an integer followed by a char:")......
函数大全(t开头)(2006-11-27 20:06:00)
摘要:
函数名: tan 功 能: 正切函数 用 法: double tan(double x); 程序例:
#include #include
int main(void) { double result, x;
x = 0.5; result = tan(x); printf("The tan of %lf is %lf\n", x, result); return 0; }
函数名: tanh 功 能: 双曲正切函数 用 法: double tanh(double x); 程序例:
#include #include
int main(void) { double result, x;
x = 0.5; result = tanh(x); printf("The hyperbolic tangent of %lf is %lf\n", x, result); return 0; }
函数名: tell 功 能: 取文件指针的当前位置 用 法: long tell(int handle); 程序例:
#include #include #include #include
int main(void) { int handle; char msg[] = "Hello world";
if ((handle = open("TEST.$$$", O_CREAT | O_TEXT | O_APPEND)) == -1) { perror("Error:"); return 1; } write(handle, msg, strlen(msg)); printf("The file pointer is at byte %ld\n", tell(handle)); close(handle); return 0; }
函数名: textattr 功 能: 设置文本属性 用 法: void textattr(int attribute); 程序例:
#include
int main(void) { int i;
clrscr(); for (i=0; i<9; i++) { textattr(i + ((i+1) << 4)); cprintf("This is a test......
函数大全(s开头)(2006-11-27 20:06:00)
摘要:
函数名: sbrk 功 能: 改变数据段空间位置 用 法: char *sbrk(int incr); 程序例:
#include #include
int main(void) { printf("Changing allocation with sbrk()\n"); printf("Before sbrk() call: %lu bytes free\n", (unsigned long) coreleft()); sbrk(1000); printf(" After sbrk() call: %lu bytes free\n", (unsigned long) coreleft()); return 0; }
函数名: scanf 功 能: 执行格式化输入 用 法: int scanf(char *format[,argument,...]); 程序例:
#include #include
int main(void) { char label[20]; char name[20]; int entries = 0; int loop, age; double salary;
struct Entry_struct { char name[20]; int age; float salary; } entry[20];
/* Input a label as a string of characters restricting to 20 characters */ printf("\n\nPlease enter a label for the chart: "); scanf("%20s", label); fflush(stdin); /* flush the input stream in case of bad input */
/* Input number of entries as an integer */ printf("How many entries will there be? (less than 20) "); scanf("%d", &entries); fflush(stdin); /* flush the input stream in case of bad......
函数大全(q,r开头)(2006-11-27 20:01:00)
摘要:
函数名: qsort 功 能: 使用快速排序例程进行排序 用 法: void qsort(void *base, int nelem, int width, int (*fcmp)()); 程序例:
#include #include #include
int sort_function( const void *a, const void *b);
char list[5][4] = { "cat", "car", "cab", "cap", "can" };
int main(void) { int x;
qsort((void *)list, 5, sizeof(list[0]), sort_function); for (x = 0; x < 5; x++) printf("%s\n", list[x]); return 0; }
int sort_function( const void *a, const void *b) { return( strcmp(a,b) ); }
函数名: qsort 功 能: 使用快速排序例程进行排序 用 法: void qsort(void *base, int nelem, int width, int (*fcmp)()); 程序例:
#include #include #include
int sort_function( const void *a, const void *b);
char list[5][4] = { "cat", "car", "cab", "cap", "can" };
int main(void) { int x;
qsort((void *)list, 5, sizeof(list[0]), sort_function); for (x = 0; x < 5; x++) printf("%s\n", list[x]); return 0; }
int sort_function( const void *a, const void *b) { return( strcmp(a,b) ); }
函数名: raise 功 能: 向正在执行的程序发送一个信号 用 法: int raise(i......
函数大全(p开头)(2006-11-27 19:59:00)
摘要:
函数名: parsfnm 功 能: 分析文件名 用 法: char *parsfnm (char *cmdline, struct fcb *fcbptr, int option); 程序例:
#include #include #include #include
int main(void) { char line[80]; struct fcb blk;
/* get file name */ printf("Enter drive and file name (no path - ie. a:file.dat)\n"); gets(line);
/* put file name in fcb */ if (parsfnm(line, &blk, 1) == NULL) printf("Error in parsfm call\n"); else printf("Drive #%d Name: %11s\n", blk.fcb_drive, blk.fcb_name);
return 0; }
函数名: peek 功 能: 检查存储单元 用 法: int peek(int segment, unsigned offset); 程序例:
#include #include #include
int main(void) { int value = 0;
printf("The current status of your keyboard is:\n"); value = peek(0x0040, 0x0017); if (value & 1) printf("Right shift on\n"); else printf("Right shift off\n");
if (value & 2) printf("Left shift on\n"); else printf("Left shift off\n");
if (value & 4) printf("Control key on\n"); else printf("Control key off\n");
if (value & 8) printf("Alt key on\n"); else p......
