- ifconfig eth0 <IP> netmask <netmask>
- route add default gw <gateway>
- edit /etc/resolv.conf
- nameserver <DNS>
- variable example
- <IP> = 192.168.1.10
- <netmask> = 255.255.255.128
import subprocess as sub | |
out = sub.check_output("diff NEWS NEWS.old || true", shell=True) |
m_main.c:1832:VG_(split_up_argv) | |
m_commandline.c:258:VG_(RR_ClientCmdLine) | |
m_recordreplay.c:244:PROCESS_LOGENTRY | |
m_coregrind/m_recordreplay/priv_recordreplay.h:132:ML_(readFromLog) | |
replay.c:164:VG_(malloc)(NULL, len+1) |
- sudo useradd testing -m -s /bin/bash | |
- 建立帳號, username 為 testing | |
- sudo passwd testing | |
- 給 testing 密碼 |
ghost: glibc 的 gethostbyname(解 domain name 的 function) 出現 buffer overflow 的 bug,可以讓 attacker 完整控制這支程式 | |
補救方法是 update glibc,而且將所有有用到 glibc 的 process 重新啟動。 | |
update patch guide [centos]: https://www.centosblog.com/critical-glibc-remote-vulnerability-exploit-ghost-patch-glibc-now/ | |
centos6 的 glibc patch 版本號: http://lists.centos.org/pipermail/centos-announce/2015-January/020907.html | |
centos7 的 glibc patch 版本號: http://lists.centos.org/pipermail/centos-announce/2015-January/020908.html |
#include <iostream> | |
using namespace std; | |
int f(int a=10); | |
int main(){ | |
cout << f() << endl; | |
cout << f(100) << endl; | |
} |
#!/usr/bin/env python3 | |
""" | |
transform the diff program output format to "git diff --stat" style. | |
./diff_stat.py [diff_file] | |
""" | |
import sys | |
def get_fname(diff_data): | |
""" |
#!/usr/local/bin/python2 | |
import cgi | |
import subprocess as sp | |
html_template = """<html> | |
<head> | |
<title> Web Shell </title> | |
</head> | |
<body> |