New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

github.com/things-go/cdpui

Package Overview
Dependencies
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/things-go/cdpui

Source
Go Modules
Version
v0.0.1-rc1.0.20210722133434-9dd117abf94a
Version published
Created
Source

cdpui

only support headless_shell,chrome,chromium

GoDoc Go.Dev reference codecov Action Status Go Report Card License Tag

example

package main

import (
	"fmt"
	"net/http"
	"time"

	"github.com/things-go/cdpui"
)

func main() {
	ui := cdpui.New("http://localhost:8080")
	defer ui.Close()

	go func() {
		http.HandleFunc("/", func(w http.ResponseWriter, _ *http.Request) {
			fmt.Fprint(w, indexHTML)
		})
		http.ListenAndServe(":8080", nil)
	}()
	time.Sleep(time.Millisecond * 5)
	ui.Run()
	// go func() {
	// 	time.Sleep(time.Second * 15)
	// 	ui.Close()
	// }()
	<-ui.Wait()
}

const indexHTML = `<!doctype html>
<html>
<head>
  <title>example</title>
</head>
<body>
  <div>
	<input id="input1" type="submit" value="dian">
  </div>
  <div id="box3">
	<textarea id="textarea1" style="width:500px;height:400px">textarea</textarea><br><br>
	<input id="input2" type="submit" value="Next">
	<select id="select1">
		<option value="one">1</option>
		<option value="two">2</option>
		<option value="three">3</option>
		<option value="four">4</option>
	</select>
  </div>
</body>
</html>`

FAQs

Package last updated on 22 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts