in reply to Re^9: Help with Lorcon XS library
in thread Help with Lorcon XS library
the only big problem stands when I tried to call the setInjectMode it produces a core dump (again). the code is:sub new { my (undef, undef, $interface, undef, $driver) = @_; my $self = shift->SUPER::new( driver => $driver, interface => $interface, @_, ); my $drv = lorcon_find_driver($self->driver); if (! $drv) { die "[*] new: lorcon_find_driver: failed\n"; return; } $self->driver( $drv ); my $context = lorcon_create($self->interface, $drv); #_drv if (! $context) { die "[*] new: lorcon_create: failed\n"; return; } $self->_context($context) or die $!; return $self; }
I think that there is something wrong in the $self->_context variable, perhaps I haven't understood the use of "_context" **update** dumping the Lorcon initialization variable the result was:sub setInjectMode { my $self = shift; my $r = lorcon_open_inject($self->_context);#->_context); if ($r == -1) { die "[*] setInjectMode: lorcon_open_inject: " . lorcon_get_error +( $self->_context ) . "\n"; return; } return 1; }
I think that the "undef" is referred to the _drv, the \152150320 is the $driver. the \152150320 changes to 'madwifing' modifyng those 2 lines$VAR1 = bless( [ \152150320, 'wlo1', undef, \152168944 ], 'Net::Lorcon2' );
regards Edoardo M.# $self->driver( $drv ) ; my $context = lorcon_create($self->interface, $drv); #_drv
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: Help with Lorcon XS library
by syphilis (Archbishop) on Jul 22, 2020 at 01:59 UTC | |
by Bpl (Scribe) on Jul 22, 2020 at 03:56 UTC | |
by syphilis (Archbishop) on Jul 22, 2020 at 09:25 UTC | |
by Bpl (Scribe) on Jul 22, 2020 at 09:40 UTC | |
by syphilis (Archbishop) on Jul 22, 2020 at 09:55 UTC | |
| |
|
Re^11: Help with Lorcon XS library
by AnomalousMonk (Archbishop) on Jul 21, 2020 at 16:36 UTC |