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 NodeJS CLI tool for uploading images to imgur.com anonymously via [imgur API](https://apidocs.imgur.com/).
A NodeJS CLI tool for uploading images to imgur.com anonymously via imgur API.
Have you ever wanted to link to an image from the Internet in your markdown but needed to go thur the tedious process of finding a place (usually a place like Dropbox or Google Drive) to upload it and obtain the image URL and finally use it in your markdown. But wait... what's the correct markdown syntax for displaying an image? 😬
Okay, maybe that's just me 😅 But with imgup
CLI, you can just:
npm install -g imgup
Usage: imgup [options] [command]
Options:
-v, --version output the current version
-h, --help display help for command
Commands:
upload <image> upload an image to imgur.com
config add your imgur client ID
help [command] display help for command
Here is an example of uploading an image from our test data directory:
Add your imgur app client ID via the config
command, see the API docs on how to obtain one.
Note that if you didn't provide a client ID, a default one will be used. But you might encounter API limit issue very quick since the ID is shared for all users who use this CLI. See Q&A for more info about this.
$ imgup config
Upload the image via the upload
command
$ imgup upload ./testData/big-cat.png
# The following output will be shown in your CLI once it's successfully uploaded
✔ Success
Image URL: https://i.imgur.com/mWbxxoM.png
Markdown: ![Big-cat image](https://i.imgur.com/mWbxxoM.png)
Big thanks to Rob Potter for the demo image
Generally speaking, no. Images are uploaded to imgur.com, and according to the announcement, those images will never be deleted unless a deletion request is made.
No. The imgur API we use has a rate limit, which can be quickly reached by users who use this CLI without adding their own imgur app ID. As a result, it's advisable to create your own imgur app ID to avoid exceeding the rate limit. But keep in mind, even with your own client ID added, you can still reach the rate limit if your usage exceeds their limit. From the imgur API docs:
The Imgur API uses a credit allocation system to ensure fair distribution of capacity. Each application can allow approximately 1,250 uploads per day or approximately 12,500 requests per day. If the daily limit is hit five times in a month, then the app will be blocked for the rest of the month. The remaining credit limit will be shown with each requests response in the X-RateLimit-ClientRemaining HTTP header.
Also, an API upload will deduct 10 credits instead of 1, and this CLI uses upload under the hood for $imgup upload
command:
Unless otherwise noted, an API call deducts 1 credit from your allocation. However, uploads have a significantly higher computational cost on our back-end, and deduct 10 credits per call. All OAuth calls, such as refreshing tokens or authorizing users, do not deduct any credits.
MIT
FAQs
A NodeJS CLI tool for uploading images to imgur.com anonymously via [imgur API](https://apidocs.imgur.com/).
The npm package imgup receives a total of 0 weekly downloads. As such, imgup popularity was classified as not popular.
We found that imgup 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.