Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

spf_parse

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spf_parse

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

spf_parse

Code Climate Build Status Test Coverage

The spf_parse library searches the spf records for a host. We assume the host uses standard spf 'selectors', and also check if they use their own 'selector'.

Examples

###CLI


-use a single domain

spf google.com
____________________________
SPF record search for google.com
  - found SPF record for google.com at google.com:
  v=spf1 include:_spf.google.com ip4:216.73.93.70/31 ip4:216.73.93.72/31 ~all
____________________________

-or a bunch in a row

spf trailofbits.com facebook.com yahoo.com
____________________________
SPF record search for trailofbits.com
  - found SPF record for trailofbits.com at trailofbits.com:
  v=spf1 include:_spf.google.com ~all
____________________________

____________________________
SPF record search for facebook.com
  - found SPF record for facebook.com at facebook.com:
  v=spf1 redirect=_spf.facebook.com
____________________________

____________________________
SPF record search for yahoo.com
  - found SPF record for yahoo.com at yahoo.com:
  v=spf1 redirect=_spf.mail.yahoo.com
____________________________

###In a project


require 'spf_parse'

SpfParse.check_host('twitter.com')
 => {:record=>"v=spf1 ip4:199.16.156.0/22 ip4:199.59.148.0/22 ip4:8.25.194.0/23 ip4:8.25.196.0/23 ip4:204.92.114.203 ip4:204.92.114.204/31 ip4:107.20.52.15 ip4:23.21.83.90 include:_spf.google.com include:_thirdparty.twitter.com -all", :record_path=>"twitter.com"}
    

Install

rake install

License

See the {file:LICENSE.txt} file.

FAQs

Package last updated on 21 Nov 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc