
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@mikaello/gpxfaketimer
Advanced tools
Create timestamps for every trackpoint in a GPX file.
import { createTimestampsEvenly } from "@mikaello/gpxfaketimer";
const exampleGpx = `
<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" version="1.0">
<name>Example gpx</name>
<trk>
<name>Example gpx</name>
<number>1</number>
<trkseg>
<trkpt lat="46.57608333" lon="8.89241667">
<ele>2376</ele>
</trkpt>
<trkpt lat="46.57619444" lon="8.89252778">
<ele>2375</ele>
</trkpt>
<trkpt lat="46.57661111" lon="8.89344444">
<ele>2376</ele>
</trkpt>
</trkseg>
</trk>
</gpx>
`;
console.log(createTimestampsEvenly(exampleGpx, 0, 100000));
// => will return the same GPX file, only with <time>date here</time> inside every trkpt:
/*
<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" version="1.0">
<name>Example gpx</name>
<trk>
<name>Example gpx</name>
<number>1</number>
<trkseg>
<trkpt lat="46.57608333" lon="8.89241667">
<ele>2376</ele>
<time>1970-01-01T00:00:00.000Z</time>
</trkpt>
<trkpt lat="46.57619444" lon="8.89252778">
<ele>2375</ele>
<time>1970-01-01T00:00:50.000Z</time>
</trkpt>
<trkpt lat="46.57661111" lon="8.89344444">
<ele>2376</ele>
<time>1970-01-01T00:01:40.000Z</time>
</trkpt>
</trkseg>
</trk>
</gpx>
*/
createTimestampsEvenly(gpxContent: string, startTime: number, endTime: number) => string
:
returns the incoming gpxContent
enriched with timestamps in every trkpt
element. startTime
and endTime
are milliseconds since epoch.Not specific for GPX, but just as helper functions
getUniformDistribution(count: number, intervalStart: number, intervalEnd: number) => number[]
:
returns an array of length count
with first element intervalStart
and last
element intervalEnd
, all elements in between is evenly distributed between
these extremeties.
You can use the ./example project to ease developing. If you run
yarn start
from that folder, you will start a server running a small
application which loads the code from this module. Run yarn dev
in another
terminal to start to continously watch the code and recompile (and reload
server) when any code changes.
Contributions are welcome :-)
FAQs
Create (or modify) timestamps in an GPX file
We found that @mikaello/gpxfaketimer 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.