codeblock

2016年3月31日 星期四

Python Challenge level 15

http://www.pythonchallenge.com/pc/return/uzi.html (login: huge/file)

- A calendar. January 26. Don't know which year it is. "he ain't the youngest, he is the second". "todo: buy flowers for tomorrow".
- I have to buy flowers on January 27 for a man who is the second and not the youngest one. What?

2016年3月30日 星期三

Python Challenge level 14


http://www.pythonchallenge.com/pc/return/italy.html (login: huge/file)

- "Walk around" is the title. A spiral bread. A 10000*1 picture named "wire.png" presented as a 100*100 one. An equation: 100*100 = (100+99+99+98) + (...
- What we should do is rearrange the pixels in wire.png in a spiral manner like that bread and make it a 100*100 picture!

Python Challenge level 13

http://www.pythonchallenge.com/pc/return/disproportional.html (logon:huge/file)

- "call him"... click number 5 on the phone, and then a xml error page shows up!
- Google the fault code (105) and knowing that it is a XMLRPC module error. According to http://stackoverflow.com/questions/7950297/faultcode-105-faultstring-xml-error-invalid-document-end-at-line-1-column-1, I should send some "xml request" to this page rather than just browsing the page.

Python Challenge level 12

http://www.pythonchallenge.com/pc/return/evil.html (login:huge/file)

- I downloaded evil1.jpg and checked this picture over and over again, but I still don't know how to deal with the EVIL here.
- After searching for some tips on Google, there is a person said, "The picture is evil1.jpg, so not surprisingly there will be evil2.jpg." Well, for me, at least, it has little sense.

Python Challenge level 11

http://www.pythonchallenge.com/pc/return/5808.html (login:huge/file)

- No much tips, just "odd even" in the title and a very vague picture. Seems like this picture is processed for a certain purpose.
- Divide the picture into 4 parts according to the pixel coordinate. (00, 01, 10, 11)

Python Challenge level 10

http://www.pythonchallenge.com/pc/return/bull.html (login:huge/file)

- Click the bull in the picture, you will see "a = [1, 11, 21, 1211, 111221, "
- This is so called "look and say sequence", please refer to https://en.wikipedia.org/wiki/Look-and-say_sequence

2016年3月29日 星期二

Python Challenge level 9

http://www.pythonchallenge.com/pc/return/good.html (login:huge/file)

- "connect the dots", remember me a little game i played when i was young...
- See also: http://pillow.readthedocs.org/en/3.1.x/reference/ImageDraw.html
- Draw a picture according to two lists: "first" and "second"

Python Challenge level 8

http://www.pythonchallenge.com/pc/def/integrity.html

- "Where is the missing link?" If you click the bee in the picture, you will be asked to input a pair of username and password.
- Find the 'un' and 'pw' data streams in the source page.

Python Challenge level 7

http://www.pythonchallenge.com/pc/def/channel.html

- To do this challenge, please make sure you have already installed PILLOW.
https://pypi.python.org/pypi/Pillow
- This is such a huge task. First of all, the code is hidden in the picture. See the grayscale bar across the picture?

Python Challenge level 6

http://www.pythonchallenge.com/pc/def/channel.html

- Visit the source page, and just see "zip" is useful
http://www.pythonchallenge.com/pc/def/channel.zip -> get a zip file
- Unzip the file, you will know that it is just like challenge level 4. According the readme.txt, you should start from 90052

2016年3月28日 星期一

Python Challenge level 5

http://www.pythonchallenge.com/pc/def/peak.html

- Pronounce "peak hell". What?? I pronounced it in my room, and nothing happened...
- Google "peak hell", it turns out to be "pickle."
- See also: https://docs.python.org/2/library/pickle.html
- The target that should be pickled is banner.p (showed in the source page)

Python Challenge level 4

http://www.pythonchallenge.com/pc/def/linkedlist.php

- click the picture, you will know that it will be an exhausted work
- knowing from source page, we should keep modifying the nothing value for at most 400 times

Python Challenge level 3

http://www.pythonchallenge.com/pc/def/equality.html

- See also: https://docs.python.org/2/library/re.html
- As the previous level, copy the mess message in the page source
- Try to find " 3 uppercase + 1 lowercase + 3 uppercase" pattern
  - For example, "AAAaAAA"
  - They emphasize "EXACTLY 3 bodyguards," so string like "AAAAaAAA" is not acceptable
- Finally, concat all lowercase letters

2016年3月25日 星期五

Python Challenge level 2


http://www.pythonchallenge.com/pc/def/ocr.html

- find the mess message in the page source (commend), copy the content and save it as a file
- "find rare characters in the mess below", so find the letter frequency of this message

2016年3月24日 星期四

Python Challenge level 1

http://www.pythonchallenge.com/pc/def/map.html

- observe the picture, there are all 2 lexicographical difference between each pairs of letters
- not sure what the tip means is
  1. k should be changed to m
  2. in the cipher text, k is changed to m

Python Challenge level 0

http://www.pythonchallenge.com/pc/def/0.html

- just calculate 2^38
g = lambda x, y:x**y
print g(2, 38)

2016年3月16日 星期三

Vocabulary

vulnerability 易受攻擊的
wreak havoc 造成破壞
forensic 法庭的, 辯論的, 鑑識
falsification 竄改;偽造;曲解
depletion 消耗;用盡
repudiation 否認
countermeasures 對策
ossification 僵化;鈣化
convolution 迴旋;盤繞
delegate 授權;委託
anomalous 不規則的;異常的
unprecedented 史無前例的
impasse 僵局
unorthodox 非正統的
susceptible 易受影響的
rudimentary 早期的;未成熟的
albeit 雖然
vantage points 有利的位置

2016年3月15日 星期二

Integer Linear Programing - Using Binary Vaviables

Some tips about ILP transformaion using binary variables.

- Logic
  - Conjunction, A and B, A∩B => a+b = 2
  - Disjunction, A or B, A∪B => a+b ≥ 1
  - if A then B, A→B, ~A∪B => a ≤ b
  - A if only if B, A↔B => a = b
  - A = ~B => a+b = 1
  - C = A∩B => c ≤ a, c ≤ b, c ≥ a+b-1
  - C = A∪B => c ≥ a, c ≥ b, c ≤ a+b

Integer Linear Programming - Duality

Main Resource: Applied Mathematical Programming by Bradley, Hax, and Magnanti (Addison-Wesley, 1977), provided by MIT

A canonical form of duality of an Integer Linear Programming problem:




2016年3月9日 星期三

IP address, Subnet, Netmask

- Classes of IP address:

- There are also class D and E, and the leading bits are 1110 and 1111 respectively.
- IP address is divided into two parts, net id and host id.
- Hosts with the same net id are within the same subnet.

2016年3月8日 星期二

L2/L3 Switching

See https://en.wikipedia.org/wiki/LAN_switching

L2 switching - see MAC address only
L3 switching - see IP address

Comparison between L2/L3 switching, see also:
 - Cisco Meraki documentation
 - IThome
 - http://www.networkpcworld.com/differences-between-layer-2-3-4-switching-multilayer-switching-layer-3-routing/


Virtual Machine setup


Got a new homework as below:

1. 從官方網站下載"Oracle VM VirtualBox" 或 "VMware Workstation Player"
2. 從官方網站下載linux作業系統,可選 ubuntu、centos 或其他你熟悉的
3. 新增一個虛擬機器,至少要有兩張虛擬網卡,第一張使用nat功能,第二張指定成內部網路。接著設定一台虛擬光碟機,並將光碟檔案指定為在第二步下載的光碟映像檔。