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.
WordPress (version 3.x and I think there's a plugin for 2.x) can export xml with all your blog posts, comments, etc. This tool can parse the xml file and give you a convenient access to all your posts, comments, categories, etc in a ruby script that you have to write.
The cool thing is — you don't even need to have access to your own WordPress database, all you need is to download the xml file from your admin panel.
require 'wpxml_parser'
include WpxmlParser
# Blog
blog = Blog.new('dump_of_your_blog.xml')
blog.posts.size # => 51
post = blog.posts.first # => <Post>
# Post
post.title # => "Title of your post"
post.categories # => ["ruby", "rails"]
post.date # => <Time>
post.slug # => "title-of-your-post"
post.body # => "...shitload of text..."
post.post_id # => 27
# Comments
post.comments # => [<Comment>, <Comment>, ...]
comment = post.comments.first
comment.author # => 'dude'
comment.date # => <Time>
# Comments have parent and children
comment.parent_id # => 32
comment.parent # => <Comment>
comment.children # => [<Comment>, <Comment>]
# Conveniences
# You can quickly find a post or a comment by post_id or comment_id respectively
blog.find_post(27) # => <Post>
post.find_comment(32) # => <Comment>
# For more info and more accessible properties check out the source code, it's pretty straightforward.
Currently only published posts are included. Drafts, private, etc are skipped. This was done on purpose, since I didn't really use those wordpress features.
Currently only approved comments are included. This was done on purpose, since I didn't need spam.
FAQs
Unknown package
We found that wpxml_parser 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.