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.
Python API wrapper for PATS, the Publishers Advertising Transaction System (http://www.pats.org.uk/)
Currently built for Python 3 only - please let me know if you require Python 2 support.
Installing from PyPI::
pip install -e git://github.com/bquinn/pats-api-python.git#egg=pats-api-python
Example::
import pats
pats_buyer = pats.PATSAPIClient(api_key=PATS_AGENCY_API_KEY, agency_id=AGENCY_ID)
pats_seller = pats.PATSAPIClient(api_key=PATS_PUBLISHER_API_KEY, vendor_id=VENDOR_ID)
# create a new campaign
campaign_details = pats.CampaignDetails(
organisation_id = 'xxxxxx',
person_id = 'yyyyy',
company_id = 'COMPANYID',
campaign_name = 'PATS API test campaign 1',
start_date = '2015-02-01',
end_date = '2015-02-28',
advertiser_code = 'AAB',
print_campaign=True,
digital_campaign=True,
campaign_budget = 1000000,
external_campaign_id= 'BQTESTCAMPAIGN1'
)
campaign_id = pats_buyer.create_campaign(campaign_details)
# returns PATS Campaign ID eg 'CPZVF'
insertion_order_details = InsertionOrderDetails(
order_id='MyTestOrder-0001',
publisher_id=PATS_PUBLISHER_ID,
agency_buyer_first_name='Brendan',
agency_buyer_last_name='Quinn',
agency_buyer_email='brendan@patsbuyer.com',
order_number='1111',
recipient_emails=['patsdemo@patsseller.com'],
terms_and_conditions=[{"name":"Test Ts and Cs", "content":"Test Ts and Cs"}],
respond_by_date='2015-01-27',
additional_info='No additional info',
message='This is the message sent with the order',
notify_emails=['brendan@patswatcher.com']
)
line_item_1 = InsertionOrderLineItemDigital(
lineNumber="1",
externalPlacementId="TestOrder-Monday-PATSTest-1-001",
placementName="Sport Banner",
costMethod="CPM",
unitAmount="2000000",
plannedCost="30000.00",
unitType="Impressions",
section="Sport",
subMediaType="Display (Digital)",
productId="PATSSPORTBANNER",
buyCategory="Standard",
packageType="Standalone",
site="mysite.co.uk",
rate="15.00",
flightStart="2015-02-01",
flightEnd="2015-02-28",
dimensions="468x60",
dimensionsPosition="Above the Fold",
servedBy="3rd party",
bookingCategoryName="Standalone",
flighting=[
{
"startDate": "2015-02-01",
"endDate": "2015-02-28",
"unitAmount": 2000000,
"plannedCost": "30000.00"
}
]
)
line_items = [ line_item_1 ]
response = pats_buyer.create_order(
agency_id=agency_id,
company_id=company_id,
person_id=person_id,
external_campaign_id=external_campaign_id,
media_type=media_type,
insertion_order_details=insertion_order_details,
line_items=line_items
)
# returns
# {
# "status":"SUCCESSFUL",
# "fieldValidations":[],
# "publicId":"MyTestOrder-0001",
# "version":1
# }
Buyer side:
Create campaign: create_campaign()
View campaign including RFPs: view_campaign_detail()
RFPs:
submit_rfp()
(coming soon)submit_product_rfp()
(coming soon)view_rfp_detail(user_email, rfp_id)
get_rfp_attachment(user_email, rfp_id, attachment_id)
search_rfps()
get_proposal_attachment(user_email, proposal_id, attachment_id)
return_proposal()
(coming soon)Orders:
create_order()
view_orders(start_date, end_date)
return_order_revision(order_public_id, order_major_version, order_minor_version, buyer_email, seller_email, revision_due_date, comment)
Product Catalogue:
list_products()
Entity classes:
CampaignDetails()
, InsertionOrderDetails()
, InsertionOrderLineItemPrint()
, InsertionOrderLineItemDigital()
Seller side:
Product Catalogue:
save_product()
list_products()
Orders:
view_orders(start_date, end_date)
view_order_detail(order_id)
respond_to_order(user_id, order_id, status, comments)
RFPs:
view_rfps(start_date, end_date)
view_proposals(rfp_id)
send_proposal(rfp_id, proposal_external_id, comments, digital_line_items, print_line_items)
FAQs
Client for the PATS API (www.pats.org.uk)
We found that pats demonstrated a healthy version release cadence and project activity because the last version was released less than 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.