Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
SugarCRM REST v10 Summary: An effective tool to interact with SugarCRM through the REST v10 api Features: • Supports creating, updating, retrieving records from modules in SugarCRM • Lists records filtered by an expression • Access to related modules • Supports uploading and downloading documents via document module • Access API methods directly on the SugarCRM.connection object
Synopsis: Establishing a connection: SugarCRM::Connection.connect(,<consumer_key>,<consumer_secret>,,,) SugarCRM::Connection.connect(https://instance.sugarcrm.com,”testkey”,”sugar”,”admin”,”xxxx”,”sugarplatform”)
Create a new record to a module: SugarCRM::Connection.create_record(,) SugarCRM::Connection.create_record(“Contacts”,{ :first_name => “Shanker”, :last_name => “Raj”, })
Retrieve all records from a module: SugarCRM::Connection.fetch_all(,<max_num>,) #retrieves first 20 records SugarCRM::Connection.fetch_all(“Accounts”) #retrieves 10 records with offset 5 SugarCRM::Connection.fetch_all(“Accounts”,10,5)
Retrieve records by fields: SugarCRM::Connection.fetch_any_fields(,<max_num>,) #retrieves name and email addresses of 30 records with offset 2 SugarCRM::Connection.fetch_any_fields(“Contacts”,30,2,[”name”,”email_address”])
Retrieve a single record from a module:
SugarCRM::Connection.fetch_single_record(,)
#retrieves record with id 3
SugarCRM::Connection.fetch_single_record(“Accounts”,3)
#retrieves only first_name of the record
SugarCRM::Connection.fetch_single_record(“Accounts”,3).first_name
Update a record of a module: SugarCRM::Connection.update_record(,,) #updates billing address of a user SugarCRM::Connection.update_record(“Users”,2,{ :billing_address => “abc” })
Retrieve records by conditions: SugarCRM::Connection.filter_records(,<max_num>,,,)
#retrieves first 30 records with first_name ‘Ann’ SugarCRM::Connection.filter_records(“Contacts”, 30,0, { :first_name =>"Ann" }) #retrieves all ‘address’ and ‘phone’ whose first_name starts with‘A’ SugarCRM::Connection.filter_records(“Contacts”,nil,nil, [”phone”,”address”],{ :first_name =>{"$starts”=> ”Ann" }})
Filter records with and/or sub-expression types : SugarCRM::Connection.filter_by_and_or(,<max_num>,,,) #retrieves first 4 records whose last name is Hona and primary address state is CA SugarCRM::Connection.filter_by_and_or("Accounts",4,0,[ “name”,”title” ],{ "$and"=>{"last_name"=>"Hona", "primary_address_state"=>"CA" }})
#Add a meeting to a contact : SugarCRM::Connection.create_related(,,,<link_name>) SugarCRM::Connection.create_related("Contacts",3,{ "name"=>"Test Meeting4", "description"=>"SugarMeeting4", "duration_hours"=>2 },"meetings")
Retrieve related module fields : SugarCRM::Connection.fetch_related(,,,<link_name>) #retrieves all document id related to a contact SugarCRM::Connection.fetch_related("Contacts",9,”id”,"documents")
Download a document via document module : SugarCRM::Connection. download_document(<document_id>,<path_to_save>) SugarCRM::Connection. download_document(“2”,’E:/’)
Upload a file :
SugarCRM::Connection. upload_document()
SugarCRM::Connection. upload_document ("name" => 'E:\ filename.pdf',
"status_id" => "Active",
"doc_type" => "Forms",
"category_id" => "Application",
"document_name" => "filename.pdf",
"template_type" => "Forms",
"revision" => 1,
"active_date" => Date.today,
"subcategory_id" => "Other",
)
Using gem in Console :
Install : $ gem install sugarcrm_v10
FAQs
Unknown package
We found that sugarcrm_v10 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.