
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
github.com/machinebox/graphql
Low-level GraphQL client for Go.
context.Context
timeouts and cancellationMake sure you have a working Go environment. To install graphql, simply run:
$ go get github.com/machinebox/graphql
import "context"
// create a client (safe to share across requests)
client := graphql.NewClient("https://machinebox.io/graphql")
// make a request
req := graphql.NewRequest(`
query ($key: String!) {
items (id:$key) {
field1
field2
field3
}
}
`)
// set any variables
req.Var("key", "value")
// set header fields
req.Header.Set("Cache-Control", "no-cache")
// define a Context for the request
ctx := context.Background()
// run it and capture the response
var respData ResponseStruct
if err := client.Run(ctx, req, &respData); err != nil {
log.Fatal(err)
}
By default, the package will send a JSON body. To enable the sending of files, you can opt to
use multipart form data instead using the UseMultipartForm
option when you create your Client
:
client := graphql.NewClient("https://machinebox.io/graphql", graphql.UseMultipartForm())
For more information, read the godoc package documentation or the blog post.
Thanks to Chris Broadfoot for design help.
FAQs
Unknown package
Did you know?
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.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.