M♪o 之學習筆記本《寅》井井︰【䷝】試釋是事

派生碼訊

寅 虎

幽棲》‧元稹

野人自愛幽棲所,近對長松遠是山。
盡日望雲心不繫,有時看月夜方閑。
壺中天地乾坤外,夢裏身名旦暮間。
遼海若思千歲鶴,且留城市會飛還。

︰例假日。

夜來有一夢,解之尋 夢 夢書,得一詩︰

《夏日登鹤岩偶成》‧ 戴叔倫

天風吹我上層岡,
露洒長松六月凉。
愿借老僧双白鶴,
碧云深處共翱翔。

禹 禹步判詞曰︰天借,長。

幽思起無明,意緒難抹滅。信手翻《 圖 》圖冊,正遇仲夏夜之夢

1280px-Oberon,_Titania_and_Puck_with_Fairies_Dancing._William_Blake._c.1786

, 跳舞的仙子。想必是『花魂』『鳥魂』已歸天界了吧!

 

☆ 編者言說明

無緣讀 夢 夢書,沒法解 禹 禹步,因此緣法故,只作『寓釋』講, M♪o 的心情或可體會,難以言傳。

 

派 ︰倩誰共語『柏梁诗』,

紅樓夢‧中秋夜大觀園即景

三五中秋夕,(黛玉)清游擬上元。
撒天箕斗燦,(湘雲)匝地管弦繁。
幾處狂飛盞?(黛玉)誰家不啟軒?
輕寒風剪剪,(湘雲)良夜景暄暄。
爭餅嘲黃髮,(黛玉)分瓜笑綠媛。
香新榮王桂,(湘雲)色健茂金萱。
蠟燭輝瓊宴,(黛玉)觥疘亂綺園。
分曹尊一令,(湘雲)射覆聽三宣。
骰彩紅成點,(黛玉)傳花鼓濫喧。
晴光搖院宇,(湘雲)素彩接乾坤。
賞罰無賓主,(黛玉)吟詩序仲昆。
構思時倚檻,(湘雲)擬景或依門。
酒盡情猶在,(黛玉)更殘樂已諼。
漸聞語笑寂,(湘雲)空剩雪霜痕。
階露團朝菌,(黛玉)庭姻斂夕棔。
秋湍瀉石髓,(湘雲)風葉聚雲根。
寶婺情孤潔,(黛玉)銀蟾氣吐吞。
葯經靈兔搗,(湘雲)人向廣寒奔。
犯斗邀牛女,(黛玉)乘槎訪帝孫。
盈虛輪莫定,(湘雲)晦朔魄空存。
壺漏聲將涸,(黛玉)窗燈焰已昏。
寒塘渡鶴影,(湘雲)冷月葬花魂。(黛玉)
香篆銷金鼎,脂冰膩玉盆。
簫憎嫠婦泣,衾倩侍兒溫。
空帳懸文鳳,閑屏掩彩鴛。
露濃苔更滑,霜重竹難捫。
猶步縈紆沼,還登寂歷原。
石奇神鬼搏,木怪虎狼蹲。
贔屓朝光透,罘罳曉露屯。
振林千樹鳥,啼谷一聲猿。
歧熟焉忘徑?泉知不問源。
鐘鳴攏翠寺,雞唱稻香村。
有興悲何繼?無愁意豈煩?
芳情只自遣,雅趣向誰言!
徹旦休雲倦,烹茶更細論。(妙玉)

,對影聯句,或能解憂,可以忘懷。

當下沒心緒, W!o+ 傳話至,吱吱又咭咭。聲聲皆分明,半句難了意。細思,原來是《 笑 》笑典裡的

施氏食獅史》‧趙元任

石室詩士施氏,嗜獅,誓食十獅。施氏時時適市視獅。十
時,適十獅適市。是時,適施氏適市。氏視是十獅,恃矢
勢,使是十獅逝世。氏拾是十獅屍, 適石室。石室濕,氏
使侍拭石室。石室拭,氏始試食是十獅。食時,始識是十
獅,實十石獅屍 。試釋是事。

☆ 編者言說明

編者不知『笑典』是何典?只讀著一堆音近字,方才勉強擬以相仿的《施氏食獅史》。其實『  W!o 』以及『 M♪o 』有著特殊關聯,讀者若是不知道此事,恐將以為編者穿鑿附會,特此一併表明。

!☿☹ ,W!o 平日寡言少語,這『咭吱』文,恐有『寓意』,卻是恰在此時?☿☹☺ 該不會是『魔電』 Modem 聲吧??這倒是點醒了我一件事。

 

生 ︰《 網 》網上偶讀 蠻 蠻力法

1280px-Board300

Brute-force attack

In cryptography, a brute-force attack, or exhaustive key search, is a cryptanalytic attack that can, in theory, be used against any encrypted data[1] (except for data encrypted in an information-theoretically secure manner). Such an attack might be used when it is not possible to take advantage of other weaknesses in an encryption system (if any exist) that would make the task easier. It consists of systematically checking all possible keys or passwords until the correct one is found. In the worst case, this would involve traversing the entire search space.

When password guessing, this method is very fast when used to check all short passwords, but for longer passwords other methods such as the dictionary attack are used because of the time a brute-force search takes.

When key guessing, the key length used in the cipher determines the practical feasibility of performing a brute-force attack, with longer keys exponentially more difficult to crack than shorter ones. A cipher with a key length of N bits can be broken in a worst-case time proportional to 2N and an average time of half that.

Brute-force attacks can be made less effective by obfuscating the data to be encoded, something that makes it more difficult for an attacker to recognize when he/she has cracked the code. One of the measures of the strength of an encryption system is how long it would theoretically take an attacker to mount a successful brute-force attack against it.

Brute-force attacks are an application of brute-force search, the general problem-solving technique of enumerating all candidates and checking each one.

The term “brute-force” is not the only term to name such a type of attack. It can also be called “bruteforce”, “brute force” and just “brute” (that is common in names of programs that perform brute-force attacks).

, 本想閑時再驗證。何不就趁今日。☺☿

 

碼 ︰無 習 。無課。

 

行 ︰雖說是蠻力法,實則乃用『窮舉』,數ㄕㄨˇ數ㄕㄨˋ數不盡,耗時難為功,怎曉 機 機心迅捷後,此法遂真可行耶!?實習所用機,登入採『學號』與『針碼』【※ Pin Code 四位數字碼】。『學號』之制 ── 班碼-位碼 ──,班不過十,位少於百,故而極其數不足千。針碼有四位,總其量,只有萬。試而盡之,『千萬』已『窮舉』。問題當在『咸澤碼訊』有多快?『登錄』之法有多嚴 ?破解程式幾人會?設使一應具足,那個『駭黑』之事,怕是恐難免!!

理雖通,程式而今初學,實作難?!☿☹。苦思腸,難不成不能『仍舊』用著『試誤法』,一探究竟!? ☿☺ 。

# 登入情況分析
pi@raspberrypi ~ python3 M♪oterm.py -p /dev/ttyUSB0 -b 115200 --- Miniterm --- type Ctrl-D to quit  # 按 Enter 出現 Raspbian GNU/Linux 7 raspberrypi ttyAMA0  # 皆錯 raspberrypi login: 999 Password:   # 密碼錯 Login incorrect raspberrypi login: pi Password:   # 使用者錯 Login incorrect raspberrypi login: 999 Password:   # 正確 Login incorrect raspberrypi login: pi Password:  Last login: Mon Jun  1 16:17:18 CST 2015 on ttyAMA0 Linux raspberrypi 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l  The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.  Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. pi@raspberrypi:~ 

經過了一番折騰,總算完成了 M♪oautologin.py ,雖看來事情並不容易 ,但是…再熟悉一點之後…… ☿☺ ,恐非難事。

#!/usr/bin/python3
# -*- coding: utf-8 -*-

import sys, os, serial, threading, getopt

EXITCHARCTER = '\x04'   #ctrl+D


import termios, sys, os
fd = sys.stdin.fileno()
old = termios.tcgetattr(fd)
new = termios.tcgetattr(fd)
new[3] = new[3] & ~termios.ICANON & ~termios.ECHO
new[6][termios.VMIN] = 1
new[6][termios.VTIME] = 0
termios.tcsetattr(fd, termios.TCSANOW, new)
s = ''    # We'll save the characters typed and add them to the pool.

def 讀鍵():
    c = os.read(fd, 1)
    #~ c = sys.stdin.read(1)
    if echo: sys.stdout.write(c); sys.stdout.flush()
    return c

def clenaup_console():
    termios.tcsetattr(fd, termios.TCSAFLUSH, old)

sys.exitfunc = clenaup_console      #terminal modes have to be restored on exitCONVERT_CRLF = 2 CONVERT_CR   = 1 CONVERT_LF   = 0  def 讀口():     """loop forever and copy serial->console"""     while 1:         data = s.read()         if repr_mode:             sys.stdout.buffer.write(repr(data)[1:-1])         else:             sys.stdout.buffer.write(data)         sys.stdout.flush()  def 寫口():     """loop and copy console->serial until EOF character is found"""     while 1:         c = 讀鍵()         if c == EXITCHARCTER:             break                       #exit app         elif c == '\n':             if convert_outgoing == CONVERT_CRLF:                 s.write('\r\n')         #make it a CR+LF             elif convert_outgoing == CONVERT_CR:                 s.write('\r')           #make it a CR             elif convert_outgoing == CONVERT_LF:                 s.write('\n')           #make it a LF         else:             s.write(c)                  #send character   #print a short help message def 用法():     sys.stderr.write("""用法: %s [options]     Miniterm - A simple terminal program for the serial port.       options:     -p, --port=PORT: port, a number, default = 0 or a device name     -b, --baud=BAUD: baudrate, default 9600     -r, --rtscts:    enable RTS/CTS flow control (default off)     -x, --xonxoff:   enable software flow control (default off)     -e, --echo:      enable local echo (default off)     -c, --cr:        do not send CR+LF, send CR only     -n, --newline:   do not send CR+LF, send LF only     -D, --debug:     debug received data (escape nonprintable chars)   """ % (sys.argv[0], ))  if __name__ == '__main__':     #initialize with defaults     port  = 0     baudrate = 9600     echo = 0     convert_outgoing = CONVERT_CRLF     rtscts = 0     xonxoff = 0     repr_mode = 0      #parse command line options     try:         opts, args = getopt.getopt(sys.argv[1:],             "hp:b:rxecnD",             ["help", "port=", "baud=", "rtscts", "xonxoff", "echo",             "cr", "newline", "debug"]         )     except getopt.GetoptError:         # print help information and exit:         用法()         sys.exit(2)      for o, a in opts:         if o in ("-h", "--help"):       #help text             用法()             sys.exit()         elif o in ("-p", "--port"):     #specified port             try:                 port = int(a)             except ValueError:                 port = a         elif o in ("-b", "--baud"):     #specified baudrate             try:                 baudrate = int(a)             except ValueError:                 raise ValueError("Baudrate must be a integer number, not %r" %
        elif o in ("-r", "--rtscts"):
            rtscts = 1
        elif o in ("-x", "--xonxoff"):
            xonxoff = 1
        elif o in ("-e", "--echo"):
            echo = 1
        elif o in ("-c", "--cr"):
            convert_outgoing = CONVERT_CR
        elif o in ("-n", "--newline"):
            convert_outgoing = CONVERT_LF
        elif o in ("-D", "--debug"):
            repr_mode = 1

    #open the port
    try:
        s = serial.Serial(port, baudrate, rtscts=rtscts, xonxoff=xonxoff)
    except:
        sys.stderr.write("Could not open port\n")
        sys.exit(1)
    sys.stderr.write("--- Miniterm --- type Ctrl-D to quit\n")
    #start serial->console thread
    r = threading.Thread(target=讀口)
    r.setDaemon(1)
    r.start()

# M♪oautologin.py 自動登入 hack
    from time import sleep
    s0 = "\r\n"
    bs0 = str.encode(s0)
    s.write(bs0)
    sleep(1)
    s1 = "pi"
    bs1 = str.encode(s1)
    s.write(bs1)
    s.write(bs0)
    s2 = "raspberry"
    bs2 = str.encode(s2)
    sleep(1)
    s.write(bs2)
    s.write(bs0)
    sleep(1)

    #and enter console->serial loop
    寫口()

    sys.stderr.write("\n--- 離開 ---\n")

 

訊 ︰ ☿ 即使命運弄人,前程操之在我。