
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
github.com/files-com/files-sdk-go/v2
The Files.com Go client library provides convenient access to the Files.com API from applications written in the Go language.
Make sure your project is using Go Modules (it will have a go.mod
file in its
root if it already is):
go mod init
Then, reference files-sdk-go in a Go program with import
:
import (
"github.com/Files-com/files-sdk-go/v2"
"github.com/Files-com/files-sdk-go/v2/folder"
)
Run any of the normal go
commands (build
/install
/test
). The Go
toolchain will resolve and fetch the files module automatically.
export FILES_API_KEY="XXXX-XXXX..."
import (
"github.com/Files-com/files-sdk-go/v2"
)
files_sdk.APIKey = "XXXX-XXXX..."
import (
"github.com/Files-com/files-sdk-go/v2"
"github.com/Files-com/files-sdk-go/v2/file"
)
config := files_sdk.Config{APIKey: "XXXX-XXXX..."}
client := file.Client{Config: config}
import (
files_sdk "github.com/Files-com/files-sdk-go/v2"
folder "github.com/Files-com/files-sdk-go/v2/folder"
"fmt"
)
func main() {
it, err := folder.ListFor(files_sdk.FolderListForParams{})
if err != nil {
// deal with error
}
for it.Next() {
entry := it.Folder()
fmt.Println(entry.Path)
}
}
import (
files_sdk "github.com/Files-com/files-sdk-go/v2"
file "github.com/Files-com/files-sdk-go/v2/file"
)
func main() {
client := file.Client{}
uploadPath := "file-to-upload.txt"
destinationPath := "file-to-upload.txt"
err := client.Upload(UploadWithFile(uploadPath), UploadWithDestinationPath(destinationPath))
if err != nil {
panic(err)
}
}
import file "github.com/Files-com/files-sdk-go/v2/file"
func main() {
client := file.Client{}
io := strings.NewReader("my file contents")
destinationPath := "my-file.txt"
err := client.Upload(UploadWithReader(io), UploadWithDestinationPath(destinationPath))
if err != nil {
panic(err)
}
}
import file "github.com/Files-com/files-sdk-go/v2/file"
func main() {
client := file.Client{}
downloadPath := "file-to-download.txt"
fileEntry, err := client.DownloadToFile(files_sdk.FileDownloadParams{Path: "file-to-download.txt"}, downloadPath)
if err != nil {
panic(err)
}
}
docker build . --tag files-sdk-go:latest
docker run --workdir /app --volume ${PWD}:/app -it files-sdk-go
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
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.