What is ISO-2022-JP?

ISO-2022-jP is a character encoding system for Japanese characters used on the internet(especially e-mail). It is characterized by being a 7-bit code that switches the character set using the ISO / IEC 2022 escape sequence (the escape sequence of the announcement function is omitted). There are also sometimes called “JIS code”.

SCII letters, kanji for JIS x 2008 etc, can be used, but half size kana characters etc can not be used.

what is “sjis-win”??

sjis-win
When “sjis-win” is specified as character code in PHP, Windows-31J which is Shift_JIS extended by Microsoft.

Windows-31J is a character code based on “JIS X 0208-1990” by microsoft, incorporating some of NEC and IBM’s own extended letters, generally called SJIS “model dependent characters”.

What is difference between SJIS and SJIS-WIN?
sjis-win has more characters.
In frequently used places, the following characters are in sjis-win, but not in sjis.

-circle number(①②③…⑳)
-roman numerals(ⅠⅡⅢ…Ⅹ、ⅰⅱⅲ…ⅹ)
-stock with parentheses(㈱)
-High ladders(髙)

Characters that are in SJIS-WiN but not in SJIS
The following three types
– NEC special character
– NEC selection IBM extended character
– IBM extended letters

php explode function to split character string

The explode function divides a character string into an array by the specified delimiter.

$gold = "カンガルー金貨,ウィーン金貨ハーモニー,メイプルリーフ金貨";
var_dump(explode(",",$gold));
echo  "<br>";

$invest ="地金;金貨;金証券;金鉱株";
var_dump(explode(";",$invest));

It seems easy to use CSV comma separated etc, isn’t it?

php strip_tags($value);

strip_tags -> Remove HTML and PHP tags from string
The optional second argument allows you to specify a tag that should not be removed.

$value = "<p>賃貸マンションやマンスリーマンション・賃貸アパートの情報を豊富に取り揃えておりますので、あなたの<b>希望にピッタリの賃貸物件</b>がみつかります。新生活や<a href='https:\/\/wwww.hogehoge.com'>一人暮らし</a>などの賃貸に関するご相談も受け付けております。</p>";

echo $value;
// echo strip_tags($value);

strip_tags();

$value = "<p>賃貸マンションやマンスリーマンション・賃貸アパートの情報を豊富に取り揃えておりますので、あなたの<b>希望にピッタリの賃貸物件</b>がみつかります。新生活や<a href='https:\/\/wwww.hogehoge.com'>一人暮らし</a>などの賃貸に関するご相談も受け付けております。</p>";

// echo $value;
echo strip_tags($value);

show time~♪

SSL certificate renewal

1. Create CSR

openssl req -new -key example.com.key -out example.com.csr

2. Apply SSL certificate to certificate authority
Application of SSL certificate to certificate authority using CSR created.

3. When a certificate is issued from a certificate authority, replace to install.

4. apache server restart

5. Confirm the installation of the certificate.

新規の発行と然程変わらなそうですね。

install OpenVAS for centos

After installing the repository of OpenVAS, install OpenVAS with the following command.

yum -y install openvas

[vagrant@localhost app]$ sudo yum -y install openvas
読み込んだプラグイン:fastestmirror
インストール処理の設定をしています
Determining fastest mirrors
epel/metalink | 6.7 kB 00:00
* base: ftp.riken.jp
* epel: mirror.premi.st
* extras: ftp.riken.jp
* remi-safe: ftp.riken.jp
* updates: ftp.riken.jp
base | 3.7 kB 00:00
epel | 4.7 kB 00:00
epel/primary_db | 6.0 MB 00:11
extras | 3.4 kB 00:00
jenkins | 2.9 kB 00:00
jenkins/primary_db | 126 kB 00:01
mariadb | 2.9 kB 00:00
mysql-connectors-community | 2.5 kB 00:00
mysql-connectors-community/primary_db | 33 kB 00:00
mysql-tools-community | 2.5 kB 00:00
mysql-tools-community/primary_db | 48 kB 00:00
mysql56-community | 2.5 kB 00:00
nginx | 2.9 kB 00:00
nodesource | 2.5 kB 00:00
remi-safe | 3.0 kB 00:00
remi-safe/primary_db | 1.2 MB 00:02
updates | 3.4 kB 00:00
updates/primary_db | 3.0 MB 00:05
パッケージ openvas は利用できません。
エラー: 何もしません

なにいいいいいいいいいい???????
ドキュメントをみると、対象のIPを指定するとスキャンしてくれて、脆弱性レポートを作ってくれるらしい。なるほど。

HTTP Trace method

In HTTP1.1 (RFC2616), eight kinds of methods are defined. GET, POST, HEAD, etc. are familiar, but there are five other types PUT, DELETE, OPTIONS, TRACE and CONNECT.
Of these, the TRACE method returns an HTTP request as “HTTP Parallel” as an HTTP response, and requests the Web server as TRACE instead of GET etc. as follows.

Apache setting file
/etc/httpd/conf/httpd.conf

あれ?TraceEnableないぞ。。

403 404 500 503

There are HTTP status codes from 100 series to 500 series. The 400th to 500th are the codes returned when there is an error with respect to the server or request.

403

403 is the code returned when access restriction etc is set.

It is displayed when IP restriction is applied and access is made from an IP address that is not permitted.
It is considered when there is access from other on the page to be displayed only in the company environment.

404

The code returned if the page does not exist. It is often displayed when deleting a page.

500
500 is a code returned in the case of CGI setting or program mistake. In case of this error, setting is wrong often, so it is necessary to modify permissions and code.

503
503 is the code returned when the number of accesses to the server has been exceeded and the server is under load. It is displayed when a large amount of access to the server gather at the same time.
In the case of a site where there are many instantaneous accesses, it is necessary to consider a server corresponding to that. Also, there is a possibility that may be attacked by a site.

Other representative HTTP status code
200 series
The 200 series means that the request to the server was successful. If you have successfully accessed the WEB, the status code “200” will be returned.

300 series
The 300 series is the code returned when doing redirect processing. Representative items such as “301” and “302” are listed.