
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
github.com/WalterPaes/go-pagseguro
import "github.com/WalterPaes/GoPagSeguro"
integration := pagseguro.NewIntegration(
{PAGSEG_URL},
{PAGSEG_TOKEN},
{PAGSEG_API_VERSION}
)
// Create a boleto charge struct to payload
boleto := pagseguro.NewBoletoCharge(
"ex-10001",
"Charge reason",
&pagseguro.Amount{
Value: 100,
Currency: "BRL",
}, &pagseguro.Boleto{
DueDate: "2021-05-01",
InstructionLines: &pagseguro.BoletoInstructionLines{
Line1: "Instruction One",
Line2: "Instruction Two",
},
Holder: &pagseguro.Holder{
Name: "Walter Paes",
TaxID: "65763916093",
Email: "email@email.com",
Address: &pagseguro.Address{
Country: "Brasil",
Region: "São Paulo",
RegionCode: "SP",
City: "São Paulo",
PostalCode: "88025011",
Street: "Rua Teste",
Number: "123",
Locality: "Pinheiros",
},
},
}, nil)
// Call function to do request
newCharge, err := integration.GenerateBoleto(boleto)
// Create a credit card charge struct to payload
card := pagseguro.NewCardCharge(
"ex-10001",
"charge reason",
1,
false,
nil,
&pagseguro.Amount{
Value: 1000,
Currency: "BRL",
},
&pagseguro.Card{
Number: "5306941322840724",
ExpMonth: "11",
ExpYear: "2022",
SecurityCode: "123",
Holder: &pagseguro.Holder{
Name: "Walter Paes",
},
}, nil)
// Call function to do request
newCharge, err := integration.Authorization(card)
chargeID := "CHAR_344a0907-8aa6-4b7a-943c-897383adf45f"
amount := &pagseguro.Amount{
Value: 1000,
Currency: "BRL",
}
// Call function to do request
newCapture, err := integration.Capture(chargeID, amount)
chargeID := "CHAR_344a0907-8aa6-4b7a-943c-897383adf45f"
// Call function to do request
newCapture, err := integration.GetCharge(chargeID)
chargeID := "CHAR_344a0907-8aa6-4b7a-943c-897383adf45f"
amount := &pagseguro.Amount{
Value: 1000,
Currency: "BRL",
}
// Call function to do request
charge, err := integration.RefundAndCancel(chargeID, amount)
This project was developed with the following technologies:
Made by Walter Junior
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
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.