Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Jenkinsで伺かしてみる

matuyuji
April 05, 2013

 Jenkinsで伺かしてみる

SSP(伺か)とその通信プロトコルであるSSTPを用いて、JenkinsからSSPへのビルド失敗時の通知などを行います。

matuyuji

April 05, 2013
Tweet

More Decks by matuyuji

Other Decks in Technology

Transcript

  1. ஻ΒͤΔ ϙʔτ9801ʹจࣈྻΛૹΓࠐΉ $ cat notify NOTIFY SSTP/1.1 Charset: UTF-8 Sender:

    Jenkins-Server Script: \0Ϗϧυʹࣦഊ͠·ͨ͠ɻ\e $ nc 127.0.0.1 9801 < notify SSTP/1.1 200 OK 13೥4݄5೔༵ۚ೔
  2. SakuraεΫϦϓτ \0 ϝΠϯΩϟϥΫλΛࢦఆ \1 αϒΩϟϥΫλΛࢦఆ \v ΰʔετΛશ໘ʹҠಈ \w# ΢ΣΠτ \s#

    αʔϑΣε ද৘ มߋ \_a[] ΞϯΧʔ࡞੒ \q[] ࣭໰࡞੒ ΄͔ɺͨ͘͞Μ 13೥4݄5೔༵ۚ೔
  3. ද৘Λม͑Δ 0: ૉ 1: রΕ 2: ڻ͖ 3: ෆ҆ 4:

    མͪࠐΈ 5: ඍসΈ 6: ໨ด͡ 7: ౖΓ 8: ྫྷস 9: রΕౖΓ 13೥4݄5೔༵ۚ೔
  4. SSTP IANAͷRegistered Port Numbersʹొ࿥͋Γ sstp-1 7743/tcp Sakura Script Transfer Protocol

    sstp-1 7743/udp Sakura Script Transfer Protocol sstp-2 9801/tcp Sakura Script Transfer Protocol-2 sstp-2 9801/udp Sakura Script Transfer Protocol-2 13೥4݄5೔༵ۚ೔
  5. ΰʔετͷߏ੒ Shiori Event OnBoot OnAITalk Shiori.dll ཬʑ YAYA (C-like) ը૾ͷఆٛ

    ணͤସ͑ Ξχϝʔγϣϯ shell ghost 13೥4݄5೔༵ۚ೔
  6. MouseDoubleClick_0Head { ! "\1\s[10]\0\s[0] \![execute,http-get,http://127.0.0.1:8080/job/ AlwaysFailed/build?token=foobar] ಄ΛμϒϧΫϦοΫ͞ΕͨͷͰɺϏϧυΛ։࢝͠·͢ɻ\e" } ΠϕϯτఆٛϑΝΠϧʹهड़ Πϕϯτ

    $ nc -l 127.0.0.1 8080 GET /job/AlwaysFailed/build?token=foobar HTTP/1.1 Host: 127.0.0.1:8080 User-Agent: SSP/2.2.99 (20130204-14; Windows NT 5.1) Accept-Encoding: gzip,deflate Connection: close Accept-Charset: utf-8,* Accept: text/*,*/* 13೥4݄5೔༵ۚ೔
  7. ಠࣗΠϕϯτ OnBuildFailed { "\0\vϏϧυʹࣦഊ͠·ͨ͠ɻ\1ͳΜͱ͔͠Ζ\e" } $ nc 127.0.0.1 9801 <<EOF

    NOTIFY SSTP/1.1 Sender: Jenkins-Server Event: OnBuildFailed EOF SSTP/1.1 200 OK ΠϕϯτఆٛϑΝΠϧʹهड़ 13೥4݄5೔༵ۚ೔