Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/elcinzorlu/generate-pdf-and-upload-s3-go
The most commonly used file type is pdf and storage space is AWS S3. And this repository, which we use both, is a project where I can convert html files to pdf and upload our pdf files to AWS S3.
In this repository, to obtain the html file to the pdf file with golang code blocks and upload it to AWS S3 as a repository.
Install wkhtmltopdf using below command,
sudo apt install wkhtmltopdf
- for Ubuntu https://htmlpdfapi.com/blog/free_html5_invoice_templates
- I used html5 template in this link.go get github.com/SebastiaanKlippert/go-wkhtmltopdf
go get github.com/aws/aws-sdk-go/aws
go get github.com/aws/aws-sdk-go-v2/service/s3
go get github.com/aws/aws-sdk-go/aws/credentials
go get github.com/aws/aws-sdk-go/aws/session
acl := "public-read" - can use this code block
and save changes.
If you dont have one already then go to your account and click on My Security Credentials
And then select Access keys (access key ID and secret access key) section.
There is an important notification on the section, which recommends you to create an IAM Role instead of creating root access keys.
Click on Create New Access Key
Download the Key pairs to your system for future use.
Click on Show Access key and you will get your Access Key ID and Secret Access Key.
Once your account is setup login to your aws console https://console.aws.amazon.com
and select S3 from services menu.
You can select S3 from the Storage section.
And then create a bucket in your S3.You could for example create one with your project name similar to . projectnameS3bucket788.
Select a region near to you and the click create.
You will have an S3 bucket created under your Amazon S3 section.
go run main.go
How to create an S3 Bucket and AWS Access Key ID and Secret Access Key for accessing it https://medium.com/@shamnad.p.s/how-to-create-an-s3-bucket-and-aws-access-key-id-and-secret-access-key-for-accessing-it-5653b6e54337
How to fix ACLs problems
https://stackoverflow.com/questions/70333681/for-an-amazon-s3-bucket-deployment-from-github-how-do-i-fix-the-error-accesscont
How to convert html to pdf
https://github.com/c-seeger/Golang-HTML-TO-PDF-Converter
How to updload aws s3
https://gist.github.com/hiyali/6e3dd0b17d44ae92c1222011d6a6df8f
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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.