{"id":19755726,"url":"https://github.com/fofapro/vulfocus-go","last_synced_at":"2025-06-29T06:04:18.209Z","repository":{"id":45948571,"uuid":"430959498","full_name":"fofapro/vulfocus-go","owner":"fofapro","description":null,"archived":false,"fork":false,"pushed_at":"2021-11-25T14:14:44.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-06T00:51:22.630Z","etag":null,"topics":["golang","vulfocus"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fofapro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-23T04:35:26.000Z","updated_at":"2022-01-11T13:31:59.000Z","dependencies_parsed_at":"2022-09-06T16:22:52.982Z","dependency_job_id":null,"html_url":"https://github.com/fofapro/vulfocus-go","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fofapro/vulfocus-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fofapro%2Fvulfocus-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fofapro%2Fvulfocus-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fofapro%2Fvulfocus-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fofapro%2Fvulfocus-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fofapro","download_url":"https://codeload.github.com/fofapro/vulfocus-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fofapro%2Fvulfocus-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262545027,"owners_count":23326656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","vulfocus"],"created_at":"2024-11-12T03:12:54.597Z","updated_at":"2025-06-29T06:04:18.170Z","avatar_url":"https://github.com/fofapro.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vulfocus-go\n\n[![GitHub (pre-)release](https://img.shields.io/github/release/fofapro/vulfocus-go/all.svg)](https://github.com/fofapro/vulfocus-go/releases) [![stars](https://img.shields.io/github/stars/fofapro/vulfocus-go.svg)](https://github.com/fofapro/vulfocus-go/stargazers) [![license](https://img.shields.io/github/license/fofapro/vulfocus-go.svg)](https://github.com/fofapro/vulfocus-go/blob/master/LICENSE)\n\n[中文文档](https://github.com/fofapro/vulfocus-go/blob/master/README_zh.md)\n\n## Vulfocus API\n\n[`Vulfocus API`](https://fofapro.github.io/vulfocus/#/VULFOCUSAPI) is the `RESUFul API` interface provided by [`Vulfocus`](http://vulfocus.io/) for development, allowing Developers integrate [`Vulfocus`](http://vulfocus.io) in their own projects.\n\n## Vulfocus SDK\n\nThe `GO` version of `SDK` written based on the [`Vulfocus API`](https://fofapro.github.io/vulfocus/#/VULFOCUSAPI) makes it easy for `Golang` developers to quickly integrate [`Vulfocus`](http://vulfocus.io/)  into their projects.\n\n\n## Add dependency\n\n```bash\ngo get github.com/fofapro/vulfocus-go\n```\n\n## Use\n|field|description|\n| ---- | ---- |\n|`addr`|[`Vulfocus`](http://vulfocus.io/) URL|\n|`username`|User login [`Vulfocus`](http://vulfocus.io/) userbox `username`|\n|`licence`|Please go to the [`personal center`](http://vulfocus.fofa.so/#/profile/index) to view `API licence`|\n\n### Pull Images\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/fofapro/vulfocus-go\"\n)\n\nconst (\n    addr     = \"http://vulfocus.fofa.so\"\n    username = \"\"\n    licence  = \"\"\n)\n\nfunc main() {\n    client := vulfocus.NewClient(addr, username, licence)\n    err, images := client.GetImages()\n    if err != nil {\n        return\n    }\n    fmt.Printf(\"get %d images\", len(images))\n    if len(images) == 0 {\n        return\n    }\n}\n```\n\n### Start\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/fofapro/vulfocus-go\"\n)\n\nconst (\n    addr     = \"http://vulfocus.fofa.so\"\n    username = \"\"\n    licence  = \"\"\n)\n\nfunc main() {\n    client := vulfocus.NewClient(addr, username, licence)\n    err, images := client.GetImages()\n    if err != nil {\n        return\n    }\n    fmt.Printf(\"get %d images\", len(images))\n    if len(images) == 0 {\n        return\n    }\n    err, exposed := client.Start(images[0].Name)\n    if err != nil {\n        return\n    }\n    println(exposed.Host, exposed.Port)\n}\n```\n\n### Stop\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/fofapro/vulfocus-go\"\n)\n\nconst (\n\taddr     = \"http://vulfocus.fofa.so\"\n\tusername = \"\"\n\tlicence  = \"\"\n)\n\nfunc main() {\n    client := vulfocus.NewClient(addr, username, licence)\n    err, images := client.GetImages()\n    if err != nil {\n        return\n    }\n    fmt.Printf(\"get %d images\", len(images))\n    if len(images) == 0 {\n        return\n    }\n    err = client.Stop(images[0].Name)\n    if err != nil {\n        return\n    }\n}\n```\n\n### Delete\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/fofapro/vulfocus-go\"\n)\n\nconst (\n    addr     = \"http://vulfocus.fofa.so\"\n    username = \"\"\n    licence  = \"\"\n)\n\nfunc main() {\n    client := vulfocus.NewClient(addr, username, licence)\n    err, images := client.GetImages()\n    if err != nil {\n        return\n    }\n    fmt.Printf(\"get %d images\", len(images))\n    if len(images) == 0 {\n        return\n    }\n    err = client.Delete(images[0].Name)\n    if err != nil {\n        return\n    }\n}\n```\n\n## Update Log\n\n2021-11-25\n\n```\n- Version release\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffofapro%2Fvulfocus-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffofapro%2Fvulfocus-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffofapro%2Fvulfocus-go/lists"}