Hi all,
I'm using the cgi-lib.pl file to parse the data submitted from my HTML form.
The variables returned are $input{'nameOfFormItem'}
The dilemma i face is:
the posted data will only return -
$input{'mibOid'} OR $input{'mib'}
I would like to test which one does actually hold a...
Thanks.
Can you briefly explain this line (what does the 10 signify):
n = parseInt(s[x],10);
Does this mean i can remove this line now???
!s[x].length
from the condition if... || ... ||
Carl.
Thanks Guys,
I've implemented the answer Jemminger gave and works fine.
However.........
There is still a problem. It accepts characters.... (I presume it's taking the ascii value if between 1-255).
Is there a function to check for an integer ????
Thanks again.
Carl.
Hi all,
I have a piece of code that checks if a value entered is a valid IP address. I split the address into four part, which each part should be from 1 - 254.
This is the code where i actually check the value:
if (thisSegment < "0" || thisSegment > "254") {
I have an...
Actually.... please ignore the above. I have narrowed it down to:
if (thisSegment < "1" || thisSegment > "254") {
thisSegment holds the value 3. This loops through 4 times. If i remove the OR statement it seems to work.
Is there something wrong with the above.
Hi all,
Having a few problems regarding the folowing pattern matching code:
var ipV4Pattern = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
var ipArray = IPvalue.match(ipV4Pattern);
if i have IPvalue equal to 3.3.3.3 or 4.4.4.4, it places the value of ipArray to 3.3.3.3,3,3,3,3 &...
Jim,
I was trying to keep it as simple as possible.
I thought it might of been possible to use the open command with the name of another server.
i.e. open (INFILE, '10.10.10.2' '/files/mse.xml');
(I know the above line is VERY wrong, i thought it may help for demonstration) ;-)
Any...
Hi,
Slightly going off track for a second.... I have installed Zone Alarm earlier today and had already been notified of 6 attempted attacks (3 hours!).
In the alert log it logs the IP address of the attempted attacker.
How is it possible to find out where this address originates ??? for...
I have the following piece of code to assigned the $snmpCommand variable.
if ($miboid =~ /Table$/) {
my $snmpCommand = "snmptable -v 3 -Os -u $userName -a MD5 -A $authPass -l authPriv -x DES -X $privPass -CB $ipAddress $miboid |";
}
else {
my $snmpCommand =...
I'm actually 'printing' the $snmpCommand variable which is exactly correct. I have copied it straight to the command line and ran fine.
But for some reason the open () is dieing.......
Carl.
Jaa,
Yep, the other variables are assigned first.
I don't have any warning declarations... Is there 1 of the 2 i should be using do you think????
Thanks.
Carl.
ooooops, not sure what happened there....
yes sorry, I've actually tried both ways.
I'll just include the lines i'm having problems with again:
my $snmpCommand = "snmpwalk -v 3 -Os -u $userName -a MD5 -A $authPass -l authPriv -x DES -X $privPass $ipAddress $miboid |";
open...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.