PtokaX forum

Archive => Archived 5.1 boards => Finished Scripts => Topic started by: bastya_elvtars on 12 January, 2007, 01:50:32

Title: RangeFucker 3.0
Post by: bastya_elvtars on 12 January, 2007, 01:50:32
Hi all, I have updated RangeFucker. Here is the changelog for 3.0:
fixed: rightclick not being sent to ops
changed: script is lua 5.1.1-only (so is ptokax)
fixed: CIDR support is now fully compliant with RFC1518
added: dotted (x.x.x.x) netmask support
changed: using bitwise operations powered by luabit
changed: relicensed under the GPL
added: rightclick for netmask and CIDR, not only single IPs


This is a pre-release version, and it may contain bugs. If no objection comes, I will make this the final release in 1 week, so please test it thoroughly, thank you.
Title: Re: RangeFucker 3.0 preview release
Post by: bastya_elvtars on 13 January, 2007, 20:23:30
Here (http://lawmaker.no-ip.org/pages/manuals/rangefucker-v3-manual.php) you can find the manual.
No feedback at all? :(
Title: Re: RangeFucker 3.0 preview release
Post by: CHILLCODE? on 15 January, 2007, 14:37:19
Well I have a little question about

function getrange(decip,decmask)

now I think what you want to do here is calculate the range from a CIDR-Ranges,
but since you use bitwise anyways why not claculate them through bitwise a little exsample of how
to do so, in less steps


CIDR = 10.4.12.0/22

IP = 10.4.12.0
(00001010.00000100.00001100.00000000)
and subnetmask = 255.255.12.0
(11111111.11111111.11111100.00000000)

now to get the startIP we only have to AND these two
e.g. startIP = AND( IP, subnet), Results in
(00001010.00000100.00001100.00000000) = 10.4.12.0

okey now to calculate the end IP we first do a not on the subnet
notsubnet = NOT(subnet) which results in
(00000000.00000000.00000011.11111111)
then we do a OR( startIP, notsubnet) to get the End IP which results in
(00001010.00000100.00001111.11111111) = 10.4.15.255


and there you have your ranges, in a few little steps, which should boost the functions
performance.






Title: Re: RangeFucker 3.0 preview release
Post by: bastya_elvtars on 15 January, 2007, 14:50:25
Uhm, well, maybe I have overlooked the part of the linked documents that deals with this. I'll look into the topic a bit deeper, thanks for the hint.
Title: Re: RangeFucker 3.0 preview release
Post by: bastya_elvtars on 19 March, 2007, 22:48:45
Ah yes, I got the idea finally from here (http://www.ipprimer.com/bitbybit.cfm). Thanks for the hint, I've overlooked this.
OK, 3.0 has been released. Grab it from my brand new download page (http://lawmaker.no-ip.org/pages/downloads.php).