404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.12.147.104: ~ $
#!/usr/bin/perl
# -*- perl -*-

use strict;
use warnings;

package MyStrictObject;

use base qw(Net::DBus::Object);
use Net::DBus::Exporter "org.example.MyObject";

sub new {
    my $class = shift;
    my $self = $class->SUPER::new(@_);

    $self->{name} = "Joe";
    $self->{salary} = 100000;

    bless $self, $class;

    return $self;
}

dbus_method("name", [], ["string"]);
sub name {
    my $self = shift;
    return $self->{name};
}

sub salary {
    my $self = shift;
    return $self->{salary};
}

package MyFlexibleObject;

use base qw(Net::DBus::Object);
use Net::DBus::Exporter qw(org.example.MyObject);

dbus_no_strict_exports;

sub new {
    my $class = shift;
    my $self = $class->SUPER::new(@_);

    $self->{name} = "Joe";
    $self->{salary} = 100000;

    bless $self, $class;

    return $self;
}

dbus_method("name", [], ["string"]);
sub name {
    my $self = shift;
    return $self->{name};
}

sub salary {
    my $self = shift;
    return $self->{salary};
}

package main;

use Net::DBus;
use Net::DBus::Reactor;

my $bus = Net::DBus->session;
my $service = $bus->export_service("org.cpan.Net.Bus.test");
my $object1 = MyStrictObject->new($service, "/org/example/MyStrictObject");
my $object2 = MyFlexibleObject->new($service, "/org/example/MyFlexibleObject");

Net::DBus::Reactor->main->run();

Filemanager

Name Type Size Permission Actions
dump-object-xml.pl File 393 B 0644
dump-object.pl File 419 B 0644
example-client-async.pl File 1.01 KB 0644
example-client-no-introspect.pl File 666 B 0644
example-client.pl File 894 B 0644
example-proxy-service.pl File 1.71 KB 0644
example-service-async.pl File 1.27 KB 0644
example-service-magic.pl File 1.54 KB 0644
example-service-no-introspect.pl File 1014 B 0644
example-service.pl File 1.5 KB 0644
example-signal-emitter.pl File 949 B 0644
example-signal-receiver.pl File 1.16 KB 0644
lshal.pl File 643 B 0644
notification.pl File 516 B 0644
strict-exports.pl File 1.29 KB 0644