Well, you can actually just dump the keys of the namespace. i.e:
keys %{'IO::File::'}
and check what is defined as a function '&', but I'd personally just make use of the Class::Inspector module:
http://search.cpan.org/~adamk/Class-Inspector-1.25/lib/Class/Inspector.pm
Scott
Hiya,
you can still treat it like a hashref even though it's blessed:
foreach my $key (keys %{$obj}) {
print $key." => ".$obj->{$key}."\n";
}
The ref() will tell you want kind of object it is. Did you also want to print out the subs?
Cheers,
Scott
I'd try and keep it fairly readable rather than try some convoluted piece of logic that looks funky:
int units = num % 10;
int tens = num % 100 - units;
if(tens == 10) {
System.out.println(num+"th");
} else {
switch(units) {
case 1:
System.out.println(num+"st")...
hmmm.. my description of a_t.data was misleading. It can be used as a pointer, (i.e. in memcpy etc.) but it will be calculated as an offset from the base of the a_t struct, so the compiler will still prevent you from setting it to NULL.
ah... interesting... unfortunately you are at the mercy of the compiler - who ever wrote the original code for the assert must have assumed a_t.data would be a pointer. Whilst it looks like it is, the code produced by the compiler isn't going to use it like that at all, so it will not allow you...
doh... I missread the post.
forget my previous.
You need to allocate the data element in a_t and not define it as an array in the struct:
struct a_s{
u_int16_t cmd;
u_int16_t dataSize;
u_int8_t *data;
};
typedef struct a_s a_t;
Then you can either stick it on the stack if it's small...
Hi P.
You are trying to use payload as a pointer, when it is not. You are going to have to do one of two things:
1. re-write the b_s struct to make payload become a pointer to a_t i.e.
struct b_s {
u_int16_t part;
u_int16_t serial;
a_t *payload;
};
You then need to change all the...
Forgot one thing, can you also give us the output from the following if it has no sensitive info:
javap -classpath . -verbose com.mycompany.package1.MyClass
Cheers,
Scott
Hi again,
Don't worry about the lack of [Loaded ...] messages. They only show when an object is instantiated in the code.
I can see the error you are getting in the java.c source code:
mainClass = LoadClass(env, classname);
if(mainClass == NULL) { /* exception occured */...
I have to confess I am a bonafide geek and have been dissecting protocols for over 25 years now, so never really had to look at any tutorials for wireshark.
I took a quick look though and this one seems to be pretty good. It initially shows how to capture a simple web transaction and the...
Hi,
Would it be possible to see the javaCmdOutput.txt if it does not contain sensitive info?
Other than that, I'd be keen to know if I can execute the code outside the jar. i.e. after you have unjar'd the file, is it possible to modify the classpath according the the Class-Path line of the...
Hi Newbie,
You want to actually create an object for the character, not just use a hash. Try the following:
Create a file called Character.pm and put the following in it:
package Character;
#-------------------------------------------------------
sub new {
my($class, %args) = @_;
my...
Nice one Arvin! Just glad you got it fixed.
To be honest I don't think this a netgear issue. I think the routers you previously had did not correctly handle the subnets after manipulating the DNS queries.
Hopefully you can now use your experience with wireshark and port mirroring to solve...
Hi Pro,
I can see the requests, but no response. It looks like the router is not handling the DNS queries correctly when they are from a different subnet.
Can you just confirm one thing though. When you pinged 86.2.106.208 from VLAN3, did it work. You seem to mention that it did, but I...
Hi Pro,
Doh... I was vague again in my instructions. The trace is fine from the PC on VLAN2. I assume you resolved the IP address for www.google.com each time?
You need to do the same with a PC on VLAN3...
Sorry,
Scott
Hi Pro,
Was that trace from running the PC on VLAN2 only? I can only see DNS requests from 192.168.1.7. Both nslookups seem to work fine though.
Just so you are aware, the nslookup command overrides the DNS settings when you specify the server address at the end.
Cheers,
Scott
Previous failure was my mistake - I left ICMP blocking on my firewall....sorry!
Ok - this is good. I can see that the NAT'ing and routing are working fine from both vlans now.
Next, make sure DNS is working fine. Try the following from the command prompt on both a PC on VLAN2 and VLAN3...
Hi Pro,
Did you ping the address from a PC on vlan3? (i.e. step 4) I cannot see anything in mirror trace, but there is something in my traces.
All the source address are ok - so the NAT'ing seems to be working if that is the case.
Cheers,
Scott
You could use egrep I suppose
var1 = `echo $string | egrep -o -i '[A-Z]+'`
var2 = `echo $string | egrep -o '[0-9]+'`
but clunky though...
Cheers,
Scott
Sorry Pro.
I had seen the image, I should have been clearer in my question. I think the 'vlan pvid 2' is an important parameter and wanted to know if it is still missing in the current config. Usually this indicates which is the native VLAN the port belongs to. It might be confusing the...
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.