World: r3wp
[Core] Discuss core issues
older newer | first last |
GrahamC 12-Feb-2011 [936x2] | I don't need accuracy! |
I just to block every spammer that lives in Eastern Europe | |
Andreas 12-Feb-2011 [938] | then replace every non-255 occurence with * :) |
GrahamC 12-Feb-2011 [939] | eh? 2.60.0.0 => * ?? |
Andreas 12-Feb-2011 [940x2] | from the mask :) |
this will match several million false positives too, but well :) | |
GrahamC 12-Feb-2011 [942x2] | vbulletin doesn't use masks |
ok, so where there isn't a 255 in the mask, then replace the same point in the ip address with a * | |
Andreas 12-Feb-2011 [944x3] | 2.60.0.0/255.252.0.0 is 2.60.0.0/22 |
2.60.*.* will match less than 2.60.0.0/22 | |
2.*.*.* will match more than 2.60.0.0/22 | |
GrahamC 12-Feb-2011 [947x2] | well, I think I would use 2.* |
will that stop Putin posting? | |
Andreas 12-Feb-2011 [949] | blocking several gazillion non-eastern europe users as well :) |
GrahamC 12-Feb-2011 [950x3] | collaterall damage |
Rebol [] data: {# Country: AFGHANISTAN # ISO Code: AF # Total Networks: 22 # Total Subnets: 98,560 27.116.56.0 - 27.116.59.255 58.147.128.0 - 58.147.159.255 61.5.192.0 - 61.5.207.255 111.125.152.0 - 111.125.159.255 111.223.244.0 - 111.223.247.255 117.55.192.0 - 117.55.207.255 117.104.224.0 - 117.104.231.255 119.59.80.0 - 119.59.87.255 121.100.48.0 - 121.100.55.255 121.127.32.0 - 121.127.63.255 124.199.112.0 - 124.199.127.255 125.213.192.0 - 125.213.223.255 175.106.32.0 - 175.106.63.255 180.94.64.0 - 180.94.95.255 180.222.136.0 - 180.222.143.255 182.50.176.0 - 182.50.191.255 202.56.176.0 - 202.56.191.255 202.86.16.0 - 202.86.31.255 203.174.27.0 - 203.174.27.255 203.215.32.0 - 203.215.47.255 210.80.0.0 - 210.80.31.255 210.80.32.0 - 210.80.63.255 } output: copy "" foreach line parse/all data "^/" [ if line [ trim/head/tail line if not find/part line "#" 1 [ ranges: parse/all line "-" from-ip: load trim/head/tail ranges/1 to-ip: load trim/head/tail ranges/2 ; they diverge on the 3rd number from: from-ip/3 to: to-ip/3 for i from to 1 [ append output rejoin ["" from-ip/1 "." from-ip/2 "." i ".*^/"] ] ] ] ] print output | |
gives ... 27.116.56.* 27.116.57.* 27.116.58.* 27.116.59.* 58.147.128.* 58.147.129.* 58.147.130.* 58.147.131.* 58.147.132.* 58.147.133.* 58.147.134.* 58.147.135.* etc .. Does that look okay? | |
Andreas 12-Feb-2011 [953x2] | looks ok :) |
maybe someone has CIDR enumeration code already lying around :) | |
GrahamC 12-Feb-2011 [955x6] | 8000 lines of IP ranges |
going to be a big file! | |
oops .. 3Mb file of ip addresses to block | |
the VID editor just died on that | |
222,000 lines of addresses | |
let's hope vbulletin doesn't choke | |
Andreas 12-Feb-2011 [961] | -> ~Chit Chat |
Brock 16-Feb-2011 [962x2] | Does anyone know why modifeid? and info? return a date without the time when accessing a file through ftp lon a windows ftp server? Is this a limitation of windows, the ftp scheme, the ftp server, or the version of Rebol (I'm using the latest 2.7 - activated ODBC connection all dll access)? Are there any known fixes to this - a quick google didn't find anything? |
ecall there is a ftp update out there, does anyone know if that fixes this limiation? | |
Maxim 16-Feb-2011 [964] | it should return the time, I've got ftp synching routines which use info? and use date/time. so I'd bet its a limitation on the server, or its using a non-standard date string in its LIST command. |
Brock 16-Feb-2011 [965] | Okay, I'll see if our server admin can change something that will help. Using Romano's FTP-Patch.r shows the date for files, but there is some code in place to get it to work from what I can tell. |
BrianH 16-Feb-2011 [966] | You might also try connecting with the FTP server with a command line client like NcFTP and looking at the listings directly. |
GrahamC 16-Feb-2011 [967x2] | or just modify the existing ftp client ... the formatting is a parse rule |
ftp protocol ... | |
BrianH 16-Feb-2011 [969] | I meant, look at the listings directly, so you know what to look for when modifying that parse rule :) |
Brock 16-Feb-2011 [970] | thanks for the input. I'll see what I can do. |
TomBon 22-Feb-2011 [971] | how to prevent binary data from spanning multiple lines? this #{ 3A 18 92 56 } should be this #{3A189256} is this possible? |
BrianH 22-Feb-2011 [972] | Afaik, binaries don't keep the info about how they were laid out on the page like blocks do. The whitespace won't be preserved when they are printed out. And there is no whitespace internally in the binary, just binary data. |
TomBon 22-Feb-2011 [973x2] | according to the above example I would like to store the binary via a tcp. any other possibility to transform the binary? while using enbase I have also todo a dehex after retrieving. would like to avoid this. |
the best would be if I could store just 3A189256 and then reform ist back to a binary. is this in general possible brian? | |
GrahamC 22-Feb-2011 [975] | tombon, the binary is not spanning mulitiple lines .. that's just a display issue? |
TomBon 22-Feb-2011 [976x4] | unforunatly not. when I compose the value pairs to transmit there occur a crlf within. so the key/value just store #{ |
for example: the store sequence is this {key^-1 value^-#{ 789CCBCA2E4EC9485348CC2ECE82D059C53960460E9005666465E74018C559D9 296919501A48A50000B5BE16913C000000 } | |
to lines separated by a tab for the key/value | |
is there any other compression which returns a string instead a binary? | |
GrahamC 22-Feb-2011 [980x3] | You can just form a binary ... to get a string |
Mind blank ..anyone got a routine to trim a particular character from the end of a string? I want to remove trailing pipe characters | |
I could reverse the string and then parse it using a charset .. but that seems crude ( any reason why the parse direction can not be made an option ? ) | |
BrianH 22-Feb-2011 [983x3] | That's one of the proposals that hasn't been implemented yet. |
Why not use FIND with the charset? | |
All trailing pipe characters? Do you want to remove any other characters other than | ? | |
older newer | first last |