Yet another bootstrap theme.

2020-11-17
dao_repent

最近要來讀讀道教的懺文,需要讀的過程,同時也找找、了解有關道教的懺悔

寶懺的組成

  • 寶懺有二種組成形式
    • 一種就是懺文和諸天尊聖號
    • 一種就是懺文和經句,但在拜的過程中,哪位祖師的寶懺就在經句後加這位祖師聖號。

滿有感的

  • 道教內有句話,叫做有經必有懺

Reference

Read More

2020-11-11
snmp_related

最近需要寫跟 snmp 相關的測試,就記錄一下囉

可以試試的工具

有關的 snmp server docker

  • colebrumley/net-snmp - Net-SNMP base image with Supervisor on CentOS

    • 目前有測試過,可以使用
    • 跑 snmptrap receiver 的方式,設定 UDP port mapping (port publish)
      • docker run -d --name trap_sink -p 1620:162/udp elcolio/net-snmp
    • 送出 trap 來,設定需要的 ip & pprt
      • docker run --rm=true elcolio/net-snmp snmptrap -v 1 -c public DESTINATION .1.3.6.1.6.3 "" 0 0 coldStart.0
      • docker run --rm=true elcolio/net-snmp snmptrap -v 1 -c public 10.1.83.41:1620 .1.3.6.1.6.3 "" 0 0 coldStart.0
  • OpenNMS/opennms - container

net-snmp 的資料

接收 snmp trap 的方式

snmp 三個主要元件

  • SNMP 管理者(SNMP Manager)
    • 是 SNMP 的主要管理軟體,安裝於『網路管理系統』(Network Management System)上,它負責向所管轄的管理設備索取管理訊息,或設定網路組態,為 SNMP 管理環境的主要控制設備。
  • SNMP 代理者(SNMP Agent)
    • 一般安裝於被管理的網路設備上,例如,路由器、主機電腦、橋接器等。SNMP Agent 收集網路設備上訊息,再以 SNMP 通訊協定和 SNMP Manager 通訊,達到管理的目的。
  • 被管理物件(Managed Object)
    • 一般指被管理設備內之各種管理物件。例如,被管理之設備為橋接器,而其被管理物件為橋接器的有關設備,譬如,網路介面卡、緩衝器空間、過濾資料庫等等。被管理物件皆以『管理訊息結構』方式表達,且以樹狀識別碼(Tree Identified)方式,儲存於『管理訊息資料庫』(Management Information Base, MIB)上。

snmp 掃盲

snmp default port

  • 161 UTP port
    • 來傳送及請求訊息
  • 162 UTP port
    • 接收來自待管裝置的trap訊息

檢查 udp port 是否有open

檢查有開哪些 port

python 相關的 snmp library

要小心的雷

同場加映

Read More

2020-11-10
run_remote_docker_daemon

最近需要用 python (using robot framework) 來操作 docker 的 start & stop,找了一段時間
找到可以用 docker python SDK,來操作 remote 的 docker daemon
茲加以記錄

Docker Python SDK

Connect to Remote Docker

Read More

2020-11-09
gherkin_test_case

用 robot framework 一段時間後,讀到 How to write good test case,有建議一種 test case 的寫法為 Gherkin,先行記錄囉

Reference

Read More

2020-11-06
tacacs_beginner

Reference

Read More

2020-11-06
docker_beginner

Read More

2020-11-04
aws_sns_encryption

最近在 serverless 上,加上 cloud conformity的檢查,檢查後會出現 Rule ID: SNS-006 SNS Topic Encrypted 的 High level,就找了一下解法如下

可以執行的範例 serverless conf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
provider:
...

custom:
...
alerts:
topics:
ok:
topic: sns-alerts-ok

alarm:
topic: sns-alerts-alarm

...

functions:
...

resources:
- Resources:
AwsAlertsOk: # Append the following properties to the resource created by the plugin serverless-plugin-aws-alerts
Properties:
KmsMasterKeyId: enter-your-cmk-id-here

AwsAlertsAlarm: # Append the following properties to the resource created by the plugin serverless-plugin-aws-alerts
Properties:
KmsMasterKeyId: enter-your-cmk-id-here

Reference

Read More

2020-10-28
robot_framework

最近需要 support SQA 的工作。在我的想象中,要將 SQA 做得好,需要有 automation testing & daily buid 的互相配合
在 automation testing 中,來試試用 robot-framework 來撰寫 test case,以進行整合
robot-framework 中,可以用 python 來寫 custom test libraries 滿有趣的

vim plugin

  • robotframework-vim Vim plugin for development with Robot Framework.
  • 安裝上述的 plugin,檔案中加上這行 # -*- coding: robot -*- 或是用 :setf robot

REST API testing

write test case

有關 test case 的 structure

  • Test case structure 分為 Workflow tests & Data-driven tests
    • 目前的寫法為 Workflow tests

簡介

Reference

TestRail

IDE

rst 相關資料

Read More

2020-10-15
csrf_info

Read More

2020-10-14
chrom-ssl-cert-invalid

在測試階段的時候,會用自己簽的 SSL,最近用 chrom 開這類的 page 時,會出現 Your connection is not private 的訊息,錯誤碼是 NET::ERR_CERT_INVALID
可以輸入 thisisunsafe 這幾個字來解這個問題

Reference

Read More