One Hat Cyber Team
Your IP :
216.73.216.148
Server IP :
194.44.31.54
Server :
Linux zen.imath.kiev.ua 4.18.0-553.77.1.el8_10.x86_64 #1 SMP Fri Oct 3 14:30:23 UTC 2025 x86_64
Server Software :
Apache/2.4.37 (Rocky Linux) OpenSSL/1.1.1k
PHP Version :
5.6.40
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
mellit
/
tests
/
Edit File:
t3
#! /usr/local/bin/perl use strict; use FileHandle; use vars qw($module $script $debug $user $file1_rev1); require 'tests/common.pl'; my $pathinfo = '/cvswebtests/file1'; $ENV{'PATH_INFO'} = $path_info my $scriptdir = cwd(); my $script='cvswebedit.pl'; my $user='mrjc'; my $debug =1; my $fh = new FileHandle "perl $script edit=start user=$user < /dev/null | "; die if !defined($fh); my @ans = <$fh>; close $fh; my $t3_not_created = grep /Path not recognised/, @ans; my $t3_already_exists = grep /$module/, @ans; print "# Checking to see whether $pathinfo already exists in CVS\n"; if ($t3_not_created > 0) { print "# it doesn't recreating it\n"; create_t3($module); if ($debug) { print @ans; } exit 1; } else { print "#it does\n"; } chdir $scriptdir || die $!; print "# trying again with file existing in CVS\n"; $fh = new FileHandle "perl $script edit=start user=$user < /dev/null | "; die if !defined($fh); @ans = <$fh>; close $fh; my $t3_created = grep m!Edit $module/!, @ans; status(!$t3_not_created, "should have found file in CVS, didn't"); print @ans; print "# checking whether user is given option to lock and download\n"; my $unlocked_ok = grep /lock-and-download/, @ans; status($unlocked_ok, join("",@ans)); sub create_t3 { # Create t3. use File::Path; my ($testmod) = @_; my $testdir = '/tmp/'.$testmod; chdir $testdir || mkpath $testdir || die $!; chdir $testdir; print "# importing into $testmod from $testdir\n"; my $import = `cvs import -m't3' $testmod mrjc initial`; my $file = 'file1'; my $new = grep m/No conflicts/, $import; my $old = grep m/conflicts created by this command/, $import; if (($old == 0) && ($new == 0)) { status($new, $import); } print "# checking out $testmod into $testdir\n"; my $checkout = `cvs checkout -d . $testmod`; my $co_ok = grep m/Updating ./, $checkout; status ($co_ok, $checkout); my $add_fh = new FileHandle $file, "w" || die $!; print $add_fh $file1_rev1; close $add_fh; print "# adding $file\n"; my $add = `cvs add -m"t3" $file`; # my $add_ok = grep m/ my $commit = `cvs commit -m"" $file`; #my $commit_ok = grep //; }
Simpan