end0tknr's kipple - web写経開発

太宰府天満宮の狛犬って、妙にカワイイ

2020-01-01から1年間の記事一覧

経産省/IPA - 改正民法に対応した「情報システム・モデル取引・契約書」を公開

urlを忘れるのでメモ www.ipa.go.jp

re: SAML2.0でのシングルサインオン実装と戦うあなたに(.NET編)

SAMLの仕様が、とても分かりやすくまとめられているので、メモ qiita.com

SSO SAML Tracer

helpx.adobe.com によれば、 for Firefox として addons.mozilla.org for Google Chrome として chrome.google.com がある

antlr4-python3-runtime for python3 による java source の parse / 構文解析

java (seasar2) の source を parse / 構文解析 する必要があり、 ANTLR + Python を利用した際のメモ。 qiita.com と言っても、上記 url の写経です。 上記urlとの違いは、 BasicInfoListener (basic_info_listener.py)内でgetText()した場合、 空白や改行…

再 LWP::UserAgentfor perl でリダイレクト先のコンテンツを取得

※1 LWP::UserAgentでリダイレクト先のコンテンツを取得 - end0tknr's kipple - web写経開発 ※2 LWP::UserAgent 2010年に上記※1を記載しましたが、※2によれば、 LWP::UserAgent->new(%option) の %option には次があるらしい。 KEY default note agent "libww…

javascript - Geolocation API で緯度経度を取得し、更に google map api で、緯度経度→住所 変換

住所フォームへの入力の手間を軽減できないかと考えてみた。 動作はしますが、表示される住所精度は、PCやスマホ等の利用環境に影響を受ける為、 自動入力後、手修正が必要。 <html> <head> <meta charset="utf-8"> <title>input address test</title> </head> <body> <h1>end0tknr's input address test</h1> ブラウザの Geolocatio</body></html>…

centos8 on aws へ ssh する際のlogin user は、centos

以下の通り、user=centos であれば、ssh可能です $ ssh -i ~/.ssh/end0tknr_202008.pem centos@18.183.233.??? Activate the web console with: systemctl enable --now cockpit.socket Last login: Sun Aug 30 07:53:17 2020 from 61.24.125.??? [centos@ip…

AWS における CentOS8 by centos.org 利用は、Ami ID で直接検索

2020/8時点、AWS Console の EC2 新規作成画面において「centos8」で検索しても centos.org による centos8 は、すぐには見つかりません。 ( centos.org 以外による centos8 の方が先に見つかると思います ) どうやら https://wiki.centos.org/Cloud/AWS に…

Sublist3r for python によるsubdomain 探索 サブドメイン

以下の通り。後はご自身でお試し下さい https://github.com/aboul3la/Sublist3r 以下、install & 実行 git clone https://github.com/aboul3la/Sublist3r.git cd Sublist3r ## 依存library install $ sudo /usr/local/python3/bin/pip install -r requiremen…

openam 12 における 持続cookie の設定

forgerock社のdocumentによれば、上記urlで 「iPSPCookie」「 DProPCookie」によるページ内検索。 または、「2.3.18. Hints for the Persistent Cookie Module」を読めば、よいのかも。 ただ、ssoadm コマンドでは set-realm-svc-attrs -e sso -s iPlanetAMA…

clang-format による java source code 整形

clang-format は、コマンドラインでも使用できるようですので、メモ https://clang.llvm.org/docs/ClangFormat.html https://clang.llvm.org/docs/ClangFormatStyleOptions.html install from source code もできますが... 以下の手順で、src からinstallで…

logging.config for python の 設定fileを yaml で記載

python の logging には、様々な設定が可能ですが、とりあえずは、以下で動作します。 # -*- coding: utf-8 -*- import logging.config import yaml log_conf = './log_conf.yaml' def main(): logging.config.dictConfig(yaml.load(open(log_conf).read(), …

IdP by OpenAM - SP by OpenAM による SAML連携

SAMLシングル・サインオン構成において、 IdP(Identity Provider)にのみ OpenAM を用い、 SP(Service Provider)にOpenAM以外(SalesforceやG-Suite、cybozu)を用いた例は、 インターネット上によく見かけます。 一方、SP に OpenAMを用いた例は、あまり見かけ…

unittest by selenium for python のオレオレ sample

参考url https://www.seleniumqref.com/ #!/usr/local/bin/python # -*- coding: utf-8 -*- import copy import getopt import os import random import re # chromedriver の入手先-> http://chromedriver.chromium.org/getting-started from selenium impo…

input type=radioは selenium for python でclearできない為、javascriptを使用しましょう

つまり、以下の execute_script() で OK です def subtest_input_radio(self,test_url): for elm_name in ["build_time"]: self.driver.get(test_url) # 対象urlへaccess self.input_all_valid(test_url) # まず全項目に正しく入力 form_elms = self.driver.…

python で、asciiやかな、漢字、機種依存文字を含むランダム文字列を生成

とあるweb入力formのseleniumによる自動テストを作成する際に役立つかと思い。 次の通りかと思います。 #!/usr/local/bin/python # -*- coding: utf-8 -*- import random def main(): make_random_str(30,["number","kanji","kishuizon"]) def make_random_s…

python における byte文字列<->unicode文字列の変換は、encode("unicode-escape") / decode("unicode-escape")

#!/usr/local/bin/python # -*- coding: utf-8 -*- def main(): str_org = "あいうえお" print(str_org) bytes = str_org.encode("unicode-escape") print(bytes) str_new = bytes.decode("unicode-escape") print(str_new) if __name__ == "__main__": main…

keystore / keytools for java オレオレ入門

サーバ証明書作成の際、これまで、openssl を使用してきましたが、 keystore / keytools for java は、殆ど利用したことがない為、メモ。 keystore / keytools for java とは 鍵fileや証明書fileを複数保管できるfileで、keystoreのfile全体もpasswordで暗号…

aws application load balancer (alb / elb)で http & https を listen. ただし、http -> https へredirect

以下の通り、port:80をlistenするルールにおいて、port:443へredirectするようにすることでOK

yum install httpd で adduser された apache を su - 可能にする

以下の通り、/etc/passwd で「 /sbin/nologin」を「 /bin/bash 」とすれば、OK # su - apache This account is currently not available. # vi /etc/passwd apache:x:48:48:Apache:/var/www:/bin/bash # CHANGE from /sbin/nologin

AWS Certificate Manager(ACM)で、既存のSSL証明書をimport

忘れるので、メモ。 証明書 & 秘密鍵 & 中間証明書を用意した上で、以下の画面遷移の通り。 ちなみに、証明書チェーン = 中間証明書 です STEP1/4 STEP2/4 STEP3/4 STEP4/4

install postgres 12.3 from source code to centos8

前準備 : yum install systemd-devel centos8ですので、自動起動には systemd (systemctl)を使用します。 postgresでは、systemd による自動起動を行う場合、 configure時に「--with-systemd」を指定します。 更に「--with-systemd」は「systemd-devel」を必…

python仮想環境(venv)の作成、および起動/停止

$ /usr/local/python3/bin/python3 -m venv venv_django_rest $ cd venv_django_rest/bin (venv_django_rest)$ source activate (venv_django_rest)$ deactivate $

JAVA_HOME設定の為、readlinkとdirnameで yum installしたjavaの場所を調べる

よく忘れるので、メモ $ sudo yum install java-1.8.0-openjdk-devel.x86_64 $ sudo alternatives --config java $ /usr/bin/java -version openjdk version "1.8.0_252" OpenJDK Runtime Environment (build 1.8.0_252-b09) OpenJDK 64-Bit Server VM (buil…

OpenAM Community edition

↓ココです。 github.com インターネットで検索すると、以下の日本国内にあるOpenAMコンソーシアムのページの方が上位に表示されますが、 上記の https://github.com/OpenIdentityPlatform/OpenAM が該当します。 OpenAMコンソーシアム github.com

jQuery.validation (javascript)の練習

やはり調べた範囲では、client側のvalidationは jQuery.validation が、よさそ 参考url https://jqueryvalidation.org/ https://jqueryvalidation.org/validate/ https://kudakurage.hatenadiary.com/entry/20091211/1260521031 html & javascript source 詳…

microsoft の signtool.exe での署名方法

とある exe ファイルに対して、電子署名(デジタル署名)をする必要があった為、メモ https://knowledge.digicert.com/ja/jp/solution/SO23053 DOS> signtool.exe sign /f $pfx_filename /p $pfx_pw /v $target_file その他、参考 https://docs.microsoft.com/…

php で conf 形式のfile読込み - ただし、「:」セパレータ

perlでは、Config::Auto という moduleがあり、 セパレータとして「=」や「:」を指定できます。 https://metacpan.org/pod/Config::Auto phpにも、parse_ini_file() がありますが、セパレータは「=」のみのようです。 https://www.php.net/manual/ja/functio…

php (PDO)による DB接続~SQL実行

以下の通りです。 先日の 問合せフォーム用 ajax web api server side php code - end0tknr's kipple - 新web写経開発 に続く、手習い 'mysql:dbname=xing;host=localhost;charset=utf8', 'user' =>'root', 'pw' =>'ないしょ', 'option'=>array(PDO::ATTR_AU…

mysql 8.0.17 で テンプレート となる db table から、テーブルを複製 - CREATE TABLE ~ LIKE ~;

mysql> CREATE TABLE new_table_name LIKE contact_form_template;