Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
A client for the HAFAS endpoint of Berliner Verkehrsbetriebe (BVG), the largest public transport provider in Berlin. It acts as a consistent and straightforward interface on top of their verbose API.
This project is actually a thin wrapper around hafas-client@6
. Its docs document the API in general.
Note: The BVG HAFAS endpoint covers Brandenburg as well.
npm install bvg-hafas
Check the docs for hafas-client@6
as well as its BVG-specific customisations.
import {createBvgHafas} from 'bvg-hafas'
const client = createBvgHafas('my-awesome-program')
As an example, we will search for a route from Berlin Jungfernheide to Tempelhof. To get the station IDs, use locations(query, [opt])
.
const journeys = await client.journeys('900020201', '900068201', {
results: 1,
})
console.log(journeys[0])
The output will be an array of journey
objects in the Friendly Public Transport Format 1.2.1
format:
{
type: 'journey',
legs: [ {
id: '1|62072|0|86|14082018',
origin: {
type: 'stop',
id: '900020201',
name: 'S+U Jungfernheide',
location: {
type: 'location',
latitude: 52.530273,
longitude: 13.299064
},
products: {
suburban: true,
subway: true,
tram: false,
bus: true,
ferry: false,
express: false,
regional: true
}
},
departure: '2018-08-14T15:05:00.000+02:00',
departurePlatform: '6',
departureDelay: 0,
destination: {
type: 'stop',
id: '900068201',
name: 'S+U Tempelhof',
location: {
type: 'location',
latitude: 52.470692,
longitude: 13.385756
},
products: { /* … */ }
},
arrival: '2018-08-14T15:27:00.000+02:00',
arrivalPlatform: '2',
arrivalDelay: 0,
direction: 'Ringbahn S 42',
line: {
type: 'line',
id: 's42',
name: 'S42',
public: true,
mode: 'train',
product: 'suburban',
operator: { /* … */ },
// …
},
cycle: { min: 300, max: 300 }
} ],
refreshToken: '…'
}
Check hafas-client
's related projects.
If you have a question, found a bug or want to propose a feature, have a look at the issues page.
FAQs
JavaScript client for the BVG HAFAS API.
The npm package bvg-hafas receives a total of 5 weekly downloads. As such, bvg-hafas popularity was classified as not popular.
We found that bvg-hafas demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.