Path: blob/dev/pkg/js/libs/smb/memo.smb_private.go
2070 views
// Warning - This is generated code1package smb23import (4"errors"5"fmt"67"time"89"github.com/praetorian-inc/fingerprintx/pkg/plugins"1011"github.com/projectdiscovery/nuclei/v3/pkg/protocols/common/protocolstate"12)1314func memoizedcollectSMBv2Metadata(executionId string, host string, port int, timeout time.Duration) (*plugins.ServiceSMB, error) {15hash := "collectSMBv2Metadata" + ":" + fmt.Sprint(host) + ":" + fmt.Sprint(port) + ":" + fmt.Sprint(timeout)1617v, err, _ := protocolstate.Memoizer.Do(hash, func() (interface{}, error) {18return collectSMBv2Metadata(executionId, host, port, timeout)19})20if err != nil {21return nil, err22}23if value, ok := v.(*plugins.ServiceSMB); ok {24return value, nil25}2627return nil, errors.New("could not convert cached result")28}293031