Skip to content

Instantly share code, notes, and snippets.

YangFei Zheng suziewong

Block or report user

Report or block suziewong

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@suziewong
suziewong / apache.md
Last active Mar 2, 2018
Apache 知识经验整理
View apache.md

Apache

安全方面

1.勤打补丁[没经验,能先用好就不错了]

2.伪装版本

修改httpd.conf

ServerSignature off
View tcpdump.md

Tcpdump

看了蛮久的tcpdump,也一直很想尝试抓包这类的技能。

tcpdump

-i 指定监听网卡 lo eth0
-c 数量
-w xxx.cap(直接是wireshark的2进制文件)
-A ACSII显示内容
@suziewong
suziewong / network.md
Last active Sep 6, 2016
网络知识
View network.md

私有地址(Private address)属于非注册地址,专门为组织机构内部使用。

私有网段是:

A类 10.0.0.0 --10.255.255.255
B类 172.16.0.0--172.31.255.255
C类 192.168.0.0--192.168.255.255

还有一个特殊的IP地址,就是127网段的,这是测试地址,即不属于公网,也不属于私网.

@suziewong
suziewong / ssh.md
Last active Apr 27, 2018
SSH端口转发实验
View ssh.md

通过本机的81号端口访问测试服务器89的我的私人apache目录(端口为11063)

使用本地转发,在本机上输入

ssh -L 81:210.32.200.89:11063 suzie@210.32.200.89

这时候打开浏览器,输入地址127.0.0.1:81 我同时也试验了

ssh -L 81:127.0.0.1:11063 suzie@210.32.200.89
ssh -L 81:localhost:11063 suzie@210.32.200.89
@suziewong
suziewong / cookie_session.md
Created Dec 25, 2012
PHP中session与cookie的区别?
View cookie_session.md
@suziewong
suziewong / self _parent.md
Created Dec 25, 2012
PHP中 self 和 parent 的区别?
View self _parent.md

a)在子类中常用到这两个对像。他们的主要区别在于self可以调用父类中的公有或受保护的属性,但parent不可以调用

b).self:: 它表示当前类的静态成员(方法和属性) 与 $this 不同,$this是指当前对像 附代码:

@rednaxelafx
rednaxelafx / DirectMemorySize.java
Created Jan 11, 2012
An Serviceability-Agent based tool to see stats of NIO direct memory, as an alternative on JDK6 without JMX support for direct memory monitoring. Only works on JDK6; to work on JDK7 will need some tweaking because static variables are moved to Java mirror
View DirectMemorySize.java
import java.io.*;
import java.util.*;
import sun.jvm.hotspot.memory.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.debugger.*;
import sun.jvm.hotspot.runtime.*;
import sun.jvm.hotspot.tools.*;
import sun.jvm.hotspot.utilities.*;
public class DirectMemorySize extends Tool {
@yegle
yegle / bash-invocation.md
Created Jan 5, 2012
Bash Shell启动方式与RC脚本
View bash-invocation.md

Bash Shell启动方式与rc脚本

Shell的不同分类

根据启动Bash Shell的方式不同,对Shell有两种分类方式

登录Shell与非登录Shell

根据Shell的启动方式不同,可以将Shell分为

@pithyless
pithyless / gist:1208841
Created Sep 10, 2011
Install Python 2.7 (homebrew + pip + virtualenv) on Mac OS X Lion
View gist:1208841

Install Python

$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7

Symlinks...

You can’t perform that action at this time.