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

正規表現って、人類にはまだ早かったのかな

ymzkei5
August 20, 2020

 正規表現って、人類にはまだ早かったのかな

セキュリティ昔話。

ymzkei5

August 20, 2020
Tweet

Other Decks in Programming

Transcript

  1. おじいさん調べ 有効となるIPアドレス • 1.1.1.1 • 11.11.11.11 • 111.111.111.111 • 222.222.222.222

    • 255.255.255.255 • 205.1.1.1 • 215.1.1.1 無効となるIPアドレス • 206.1.1.1 • 207.1.1.1 • 209.1.1.1 • 216.1.1.1 • 226.1.1.1 • 236.1.1.1 • 246.1.1.1 ※ すべて例示のための、無関係なIPアドレスです。
  2. おじいさん調べ 有効となるIPアドレス • 1.1.1.1 • 11.11.11.11 • 111.111.111.111 • 222.222.222.222

    • 255.255.255.255 • 205.1.1.1 • 215.1.1.1 無効となるIPアドレス • 206.1.1.1 • 207.1.1.1 • 209.1.1.1 • 216.1.1.1 • 226.1.1.1 • 236.1.1.1 • 246.1.1.1 ※ すべて例示のための、無関係なIPアドレスです。
  3. 犯人はオマエダ • 見つけた。 ipV4AllIp: function() { Ext.apply(Ext.form.VTypes, { ipv4AllIpValue: /^([0-9][0-9]{0,1}|1[0-9][0-9]|2[0-5][0-5])([.]([1-9]{0,1}[0-9]|1[0-

    9]{2}|2[0-4][0-9]|25[0-5])){2}[.](0|[1-9][0-9]{0,1}|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/, ipv4AllIpText: $L(" 何 – 見 – て – ん – だよ ", "Must be a numeric IPv4 address"), ipv4Mask: /[¥d¥.]/, ipV4AllIp: function(A) { return Ext.form.VTypes.ipv4AllIpValue.test(A) } });
  4. 犯人はオマエダ • 見つけた。 ipV4AllIp: function() { Ext.apply(Ext.form.VTypes, { ipv4AllIpValue: /^([0-9][0-9]{0,1}|1[0-9][0-9]|2[0-5][0-5])([.]([1-9]{0,1}[0-9]|1[0-

    9]{2}|2[0-4][0-9]|25[0-5])){2}[.](0|[1-9][0-9]{0,1}|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/, ipv4AllIpText: $L(" 何 – 見 – て – ん – だよ ", "Must be a numeric IPv4 address"), ipv4Mask: /[¥d¥.]/, ipV4AllIp: function(A) { return Ext.form.VTypes.ipv4AllIpValue.test(A) } });
  5. 犯人はオマエダ • 見つけた。 ipV4AllIp: function() { Ext.apply(Ext.form.VTypes, { ipv4AllIpValue: /^([0-9][0-9]{0,1}|1[0-9][0-9]|2[0-5][0-5])([.]([1-9]{0,1}[0-9]|1[0-

    9]{2}|2[0-4][0-9]|25[0-5])){2}[.](0|[1-9][0-9]{0,1}|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/, ipv4AllIpText: $L(" 何 – 見 – て – ん – だよ ", "Must be a numeric IPv4 address"), ipv4Mask: /[¥d¥.]/, ipV4AllIp: function(A) { return Ext.form.VTypes.ipv4AllIpValue.test(A) } }); お分かりいただけただろうか
  6. 犯人はオマエダ • 見つけた。 ipV4AllIp: function() { Ext.apply(Ext.form.VTypes, { ipv4AllIpValue: /^([0-9][0-9]{0,1}|1[0-9][0-9]|2[0-5][0-5])([.]([1-9]{0,1}[0-9]|1[0-

    9]{2}|2[0-4][0-9]|25[0-5])){2}[.](0|[1-9][0-9]{0,1}|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/, ipv4AllIpText: $L(" 何 – 見 – て – ん – だよ ", "Must be a numeric IPv4 address"), ipv4Mask: /[¥d¥.]/, ipV4AllIp: function(A) { return Ext.form.VTypes.ipv4AllIpValue.test(A) } }); 2[0-5][0-5] で 200~255 の意味・・・って、んなわけあるかーい
  7. 犯人はオマエダ • 見つけた。 ipV4AllIp: function() { Ext.apply(Ext.form.VTypes, { ipv4AllIpValue: /^([0-9][0-9]{0,1}|1[0-9][0-9]|2[0-5][0-5])([.]([1-9]{0,1}[0-9]|1[0-

    9]{2}|2[0-4][0-9]|25[0-5])){2}[.](0|[1-9][0-9]{0,1}|1[0-9]{2}|2[0-4][0-9]|25[0-5])$/, ipv4AllIpText: $L(" 何 – 見 – て – ん – だよ ", "Must be a numeric IPv4 address"), ipv4Mask: /[¥d¥.]/, ipV4AllIp: function(A) { return Ext.form.VTypes.ipv4AllIpValue.test(A) } }); 後ろの方はあってるのに、どうして・・・