发个脚本上来耍耍,也许会对你有用。
功能:实现字符串和16进制之间的转换。
只要有python基础的人都能写出来。
发出来是只是为了需要的时候,能快速找到,君以为如何?
Read the rest of this entry »
发个脚本上来耍耍,也许会对你有用。
功能:实现字符串和16进制之间的转换。
只要有python基础的人都能写出来。
发出来是只是为了需要的时候,能快速找到,君以为如何?
Read the rest of this entry »
#本程序用于查询某个数据库里面的所有表的前50条记录
#主要利用查询系统库information_schema来达到查询所有表/每个表的所有字段
#最后遍历所有表,查询前50条记录并显示出来.
#Mysql大于5.0版本才有information_schema库
#oyea9le@gmail.com
#2010.7.16
Read the rest of this entry »
黑色的夜里,用windows上未知服务器的3389怕中马,我们用Linux来登录.
命令:
# rdesktop -u administrator -p the_password -a 8 -r disk:haha=/root/Desktop/win_bin/ xx.yy.zz.aa
| 类型 | 默认大小[1] | 存储位置 | 操作函数 | 备注 | |
|---|---|---|---|---|---|
| 标准I/O流[2] | File | BUFSIZ[3] (8192) 或者 st_blksize[4] (4096) |
User Space | stat(2), setvbuf(), fflush() |
每一个标准I/O流都有一个buffer |
stdin |
stdin->_IO_buf_end[5] - stdin->_IO_buf_base (1024) |
||||
stdout |
stdout->_IO_buf_end - stdout->_IO_buf_base (1024) |
||||
stderr |
1 | ||||
| TCP | Receive Buffer | SO_RCVBUF[6] (87380) |
Kernel Space | getsockopt(), setsockopt() |
每一个socket都有两个buffer |
| Send Buffer | SO_SNDBUF (16384) |
||||
| UDP[7] | Receive Buffer | SO_RCVBUF (114688) |
|||
| Send Buffer | SO_SNDBUF (114688) |
||||
这是一个很古老的古典加密算法。不过,在这儿呢,我做了少许修改。
示例:
码表:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
假设明文为:HelloWorldREnewjoy
密钥为:abc
从国外论坛找到的,虽然是以bt4来讲的,但是应该适合大多数的版本。
语言很简单,就不用翻译了。
要点:
1、如何手动设置IP地址和子网掩码?
2、如何设置默认路由?
3、如何设置DNS?
因此,它做的事情,就是在windows里面,点tcp/ip右键,然后“手动设置IP”。
Configure Network Cards, How to
So you have Backtrack running installed on a HDD, you can now configure your cards to use the network. You can also do this exactly the same if you are running the distro from the CD, but your settings will not be saved as the CD is a read only medium. There are plenty of different ways to configure these wired cards and plenty of tools to do it. What I am showing here is the generic Linux commands which should be the same for other distro’s.
I have ever fond it somewhere, this is EMACS style, If you like emacs, it it very useful.
ctrl-l — clear screen.
ctrl-r — does a search in the previously given commands so that you don’t have to repeat long command.
ctrl-u — clears the typing before the hotkey.
vim在默认情况下是没有这个功能的,我们需要下载一个插件和一个软件来实现这个功能。
软件:ctags
ctags一般系统默认就有。
下载并安装插件 omnicppcomplete:
Tags: vim c++
原文发表于我的博客: http://xiaogaozi.blogspot.com/2009/11/ipython.html
IPython是一个增强型的Python Shell, 比Python自带的那个功能更强大. 在普通Python Shell里可以通过“Ctrl+l”来清屏, 可在IPython里这个快捷键就不起作用了. 为了达到这个目的, 我们需要对IPython进行一点设置.
Read the rest of this entry »
原文:http://www.chengyongxu.com/blog/linux下检查开发工具版本的脚本/
脚本如下:
#!/bin/bash export LC_ALL=C # Simple script to list version numbers of critical development tools # 引在LFS官方文档,在此表示感谢 bash --version | head -n1 | cut -d" " -f2-4 echo "/bin/sh -> `readlink -f /bin/sh`" echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3- bison --version | head -n1 if [ -e /usr/bin/yacc ]; then echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`"; else echo "yacc not found"; fi bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6- echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2 diff --version | head -n1 find --version | head -n1 gawk --version | head -n1 if [ -e /usr/bin/awk ]; then echo "/usr/bin/awk -> `readlink -f /usr/bin/awk`"; else echo "awk not found"; fi gcc --version | head -n1 /lib/libc.so.6 | head -n1 | cut -d" " -f1-7 grep --version | head -n1 gzip --version | head -n1 cat /proc/version m4 --version | head -n1 make --version | head -n1 patch --version | head -n1 echo Perl `perl -V:version` sed --version | head -n1 tar --version | head -n1 makeinfo --version | head -n1 echo 'main(){}' > dummy.c && gcc -o dummy dummy.c if [ -x dummy ]; then echo "Compilation OK"; else echo "Compilation failed"; fi rm -f dummy.c dummy |
Tags: bash, development, tools
You are currently browsing the archives for the 脚本、编程 category.
Arclite theme by digitalnature | powered by WordPress | Favicon by Tony Tang