MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / interactiveReadLine

Function interactiveReadLine

cmd/inject-cli/main.go:319–330  ·  view source on GitHub ↗

interactiveReadLine uses a temporary readline instance for a single prompt (used inside interactive add/delete flows).

(prompt string)

Source from the content-addressed store, hash-verified

317// interactiveReadLine uses a temporary readline instance for a single prompt
318// (used inside interactive add/delete flows).
319func interactiveReadLine(prompt string) string {
320 rl, err := readline.NewEx(&readline.Config{
321 Prompt: prompt,
322 DisableAutoSaveHistory: true,
323 })
324 if err != nil {
325 return ""
326 }
327 defer rl.Close()
328 line, _ := rl.Readline()
329 return strings.TrimSpace(line)
330}
331
332func interactiveReadLineDefault(prompt, defaultVal string) string {
333 if defaultVal != "" {

Callers 4

cmdRulesAddFunction · 0.85
buildArgumentsFunction · 0.85
cmdRulesDeleteFunction · 0.85

Calls 1

CloseMethod · 0.65

Tested by

no test coverage detected