Git Product home page Git Product logo

Comments (5)

cfc4n avatar cfc4n commented on June 2, 2024

Can you give me a test environment?

from ecapture.

2539469416 avatar 2539469416 commented on June 2, 2024

我只能给你固件包的下载地址
https://fw3.koolcenter.com:5000/iStoreOS/rpi4/istoreos-22.03.6-2024031514-raspberrypi-rpi4-squashfs.img.gz
原谅我太穷了送不了你树莓派

from ecapture.

cfc4n avatar cfc4n commented on June 2, 2024

可以给我ssh 的帐号密码。

from ecapture.

2539469416 avatar 2539469416 commented on June 2, 2024

可以给我ssh 的帐号密码。

内网部署,可以远程我的电脑然后进去

from ecapture.

cfc4n avatar cfc4n commented on June 2, 2024

你可以自己debug一下看看是哪里的问题吗?
大概是

func (m *MOpenSSLProbe) detectOpenssl(soPath string) error {
f, err := os.OpenFile(soPath, os.O_RDONLY, os.ModePerm)
if err != nil {
return fmt.Errorf("can not open %s, with error:%v", soPath, err)
}
r, e := elf.NewFile(f)
if e != nil {
return fmt.Errorf("parse the ELF file %s failed, with error:%v", soPath, err)
}
switch r.FileHeader.Machine {
case elf.EM_X86_64:
case elf.EM_AARCH64:
default:
return fmt.Errorf("unsupported arch library ,ELF Header Machine is :%s, must be one of EM_X86_64 and EM_AARCH64", r.FileHeader.Machine.String())
}
s := r.Section(".rodata")
if s == nil {
// not found
return nil
}
sectionOffset := int64(s.Offset)
sectionSize := s.Size
r.Close()
_, err = f.Seek(0, 0)
if err != nil {
return err
}
ret, err := f.Seek(sectionOffset, 0)
if ret != sectionOffset || err != nil {
return err
}
versionKey := ""
// e.g : OpenSSL 1.1.1j 16 Feb 2021
// OpenSSL 3.2.0 23 Nov 2023
rex, err := regexp.Compile(`(OpenSSL\s\d\.\d\.[0-9a-z]+)`)
if err != nil {
return nil
}
buf := make([]byte, 1024*1024) // 1Mb
totalReadCount := 0
for totalReadCount < int(sectionSize) {
readCount, err := f.Read(buf)
if err != nil {
m.logger.Printf("%s\t[f.Read] Error:%v\t", m.Name(), err)
break
}
if readCount == 0 {
break
}
match := rex.Find(buf)
if match != nil {
versionKey = string(match)
break
}
// Substracting OpenSslVersionLen from totalReadCount,
// to cover the edge-case in which openssl version string
// could be split into two buffers. Substraction will,
// makes sure that last 30 bytes of previous buffer are considered.
totalReadCount += readCount - OpenSslVersionLen
_, err = f.Seek(sectionOffset+int64(totalReadCount), 0)
if err != nil {
break
}
clear(buf)
}
f.Close()
buf = nil
var bpfFile string
var found bool
if versionKey != "" {
versionKeyLower := strings.ToLower(versionKey)
m.logger.Printf("%s\torigin version:%s, as key:%s", m.Name(), versionKey, versionKeyLower)
// find the sslVersion bpfFile from sslVersionBpfMap
bpfFile, found = m.sslVersionBpfMap[versionKeyLower]
if found {
m.sslBpfFile = bpfFile
return nil
}
}
isAndroid := m.conf.(*config.OpensslConfig).IsAndroid
androidVer := m.conf.(*config.OpensslConfig).AndroidVer
// if not found, use default
if isAndroid {
// sometimes,boringssl version always was "boringssl 1.1.1" on android. but offsets are different.
// see kern/boringssl_a_13_kern.c and kern/boringssl_a_14_kern.c
// Perhaps we can utilize the Android Version to choose a specific version of boringssl.
// use the corresponding bpfFile
bpfFildAndroid := fmt.Sprintf("boringssl_a_%s", androidVer)
bpfFile, found = m.sslVersionBpfMap[bpfFildAndroid]
if found {
m.sslBpfFile = bpfFile
m.logger.Printf("%s\tOpenSSL/BoringSSL version found, ro.build.version.release=%s\n", m.Name(), androidVer)
} else {
bpfFile, _ = m.sslVersionBpfMap[AndroidDefauleFilename]
m.logger.Printf("%s\tOpenSSL/BoringSSL version not found, used default version :%s\n", m.Name(), AndroidDefauleFilename)
}
} else {
if strings.Contains(soPath, "libssl.so.3") {
bpfFile, _ = m.sslVersionBpfMap[LinuxDefauleFilename_3_0]
m.logger.Printf("%s\tOpenSSL/BoringSSL version not found from shared library file, used default version:%s\n", m.Name(), LinuxDefauleFilename_3_0)
} else {
bpfFile, _ = m.sslVersionBpfMap[LinuxDefauleFilename_1_1_1]
m.logger.Printf("%s\tOpenSSL/BoringSSL version not found from shared library file, used default version:%s\n", m.Name(), LinuxDefauleFilename_1_1_1)
}
}
m.sslBpfFile = bpfFile
return nil
}
函数中对m.sslBpfFile变量获取失败导致的。

from ecapture.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.