Index: trunk/extensions/TrustedXFF/generate.php |
— | — | @@ -50,17 +50,6 @@ |
51 | 51 | if ( $start === false ) { |
52 | 52 | // Try DNS |
53 | 53 | $names[] = array( $lineNum, $line ); |
54 | | - /* |
55 | | - // Is this a hostname? |
56 | | - $ips = gethostbynamel( $line ); |
57 | | - if ( $ips === false ) { |
58 | | - echo "Not a valid host or IP address on line $lineNum: $line\n"; |
59 | | - } else { |
60 | | - foreach ( $ips as $ip ) { |
61 | | - $hex = IP::toHex( $ip ); |
62 | | - dba_insert( $hex, '1', $outFile ); |
63 | | - } |
64 | | - }*/ |
65 | 54 | continue; |
66 | 55 | } |
67 | 56 | $ranges[] = array( $lineNum, $start, $end ); |
— | — | @@ -121,7 +110,7 @@ |
122 | 111 | continue; |
123 | 112 | } |
124 | 113 | for ( $j = $startNum; $j <= $endNum; $j++ ) { |
125 | | - $hex = base_convert( $j, 10, 16 ); |
| 114 | + $hex = strtoupper( base_convert( $j, 10, 16 ) ); |
126 | 115 | $hex = str_pad( $hex, $suffixLength, '0', STR_PAD_LEFT ); |
127 | 116 | dba_insert( $prefix . $hex, '1', $outFile ); |
128 | 117 | $numHosts++; |