Greetings.

I'm not having much luck finding this, and it's been a long time since 
college math, so I thought I'd throw it at you folks and cross my 
fingers...

I'm looking for an algorithm that reverses the modulo function. That is, 
if x = y % 256, given x, what is y?

Broader picture is, I'm trying to back-figure a site number from an IP 
address. E.g., given number x = 12345, the IP's middle octets ( x/256 and 
x%256 respectively) come out to 48 and 57 . Is there an algorithm I can 
put the numbers 48 and 57 into and have 12345 come out?

I looked in cpan and got lost, I've tried a few math sites, they all talk 
about inverse of modulo, but I'm not sure that's what I'm asking for. 
Here's hoping the collective wisdom will rescue me.

Thanks in advance!

Deane Rothenmaier
Programmer/Analyst -- IT-StdCfg
Walgreens Corp.
2 Overlook Point #N5102D
MS 6515
Lincolnshire, IL 60069
224-542-5150

If you have to write your ethical rules down, it's already too late. -- 
Tom Clancy
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to