403Webshell
Server IP : 172.67.134.114  /  Your IP : 162.159.115.41
Web Server : Apache/2.4.37
System : Linux almalinux.duckdns.org 4.18.0-553.111.1.el8_10.x86_64 #1 SMP Sun Mar 8 20:06:07 EDT 2026 x86_64
User : ricodeal ( 1046)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/libexec/webmin/virtualmin-git/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/libexec/webmin/virtualmin-git/help.cgi
#!/usr/bin/perl
# Show commands for using some repository
use strict;
use warnings;
our (%text, %in);

require './virtualmin-git-lib.pl';
&ReadParse();

# Get the domain and repository
my $dom = &virtual_server::get_domain($in{'dom'});
&can_edit_domain($dom) || &error($text{'add_edom'});
my @reps = &list_reps($dom);
my ($rep) = grep { $_->{'rep'} eq $in{'rep'} } @reps;
$rep || &error($text{'delete_erep'});
my @users = &list_rep_users($dom, $rep);
my $user = @users ? $users[0]->{'user'} : "\$username";

&ui_print_header(&virtual_server::domain_in($dom), $text{'help_title'}, "");

&print_git_commands($text{'help_init'},
	"mkdir ~/public_html/git/$rep->{'rep'}",
	"cd ~/public_html/git/$rep->{'rep'}",
	"git init");

&print_git_commands($text{'help_remote'},
	"cd ~/public_html/git/$rep->{'rep'}",
	"git config remote.upload.url http://$user\@$dom->{'dom'}/git/$rep->{'rep'}.git/",
	"echo machine $dom->{'dom'} login $user password \$password >> ~/.netrc");

&print_git_commands($text{'help_first'},
	"cd ~/public_html/git/$rep->{'rep'}",
	"git --bare init",
	"echo hello > hello.txt",
	"git add hello.txt",
	"git commit -m 'initial checkin'",
	"git push upload master");

&print_git_commands($text{'help_pull'},
	"cd ~/public_html/git/$rep->{'rep'}",
	"git pull upload master");

&print_git_commands($text{'help_push'},
	"cd ~/public_html/git/$rep->{'rep'}",
	"git add somefile.pl",
	"git commit",
	"git push upload master");

&print_git_commands($text{'help_anon'},
	"cd ~",
	"git clone remote.upload.url http://$user/git/$rep->{'rep'}.git/ ~/anontest");

&ui_print_footer("index.cgi?show=$in{'show'}",
		 $text{'index_return'});

sub print_git_commands
{
my ($header, @lines) = @_;
print "<b>$header</b><p>\n";
print &ui_table_start(undef, "width=100%", 2);
print "<pre>".join("\n", @lines)."</pre>\n";
print &ui_table_end();
print "<p>\n";
}

Youez - 2016 - github.com/yon3zu
LinuXploit