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.
Rails plugin for easily adding a binary plist format. The binary plist format is ideal for transferring data to an Objective-C based application.
Note: This is still a work in progress. It should be ready to use for most applications. The most noticeable issue is the lack of support for large integers.
Add the following line to your bundle and run bundle install
.
gem "binary_plist"
All you have to do is add the plist
format to your respond_to
block:
def index
@posts = Post.all
respond_to do |format|
format.html
format.plist { render :plist => @posts }
end
end
You can do the combined style if you're support multiple formats like json
or xml
.
def index
@posts = Post.all
respond_to do |format|
format.html
format.any(:json, :plist) { render request.format.to_sym => @posts }
end
end
On the Objective-C side, it's ridiculously easy to consume the plist data.
NSURL *url = [NSURL URLWithString:@"http://localhost:3000/posts.plist"];
NSArray *posts = [NSArray arrayWithContentsOfURL:url];
You can also use the more flexible syntax:
NSURL *url = [NSURL URLWithString:@"http://localhost:3000/posts.plist"];
NSDate *date = [NSData dataWithContentsOfURL:url];
id result = [NSPropertyListSerialization propertyListFromData:data
mutabilityOption:NSPropertyListImmutable format:NULL errorDescription:nil];
if ([result isKindOfClass:[NSArray class]]) {
// Handle array response
} else if ([result isKindOfClass:[NSDictionary class]]) {
// Handle dictionary response
} else {
// Etc...
}
The encoder is largely based on Apple Binary Property List serializer.
Copyright (c) 2010 Sam Soffes, released under the MIT license
FAQs
Unknown package
We found that binary_plist 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.