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.
community-cordova-plugin-cpu
Advanced tools
I dedicate a considerable amount of my free time to developing and maintaining many cordova plugins for the community (See the list with all my maintained plugins). To help ensure this plugin is kept updated, new features are added and bugfixes are implemented quickly, please donate a couple of dollars (or a little more if you can stretch) as this will help me to afford to dedicate time to its maintenance. Please consider donating if you're using this plugin in an app that makes you money, or if you're asking for new features or priority bug fixes. Thank you!
This Cordova plugin provides a way to access basic CPU information of the mobile device. It supports both Android and iOS platforms, offering different sets of information based on the platform due to their respective system limitations and capabilities.
To install the plugin in your Cordova project, use the following command:
cordova plugin add community-cordova-plugin-cpu
To use the plugin, call the getCpuInfo
method. This method is asynchronous and returns a Promise that resolves with the CPU information.
document.addEventListener('deviceready', onDeviceReady, false);
function onDeviceReady() {
CpuManager.getCpuInfo().then(function(info) {
console.log('CPU Information:', info);
}).catch(function(error) {
console.error('Error getting CPU information:', error);
});
}
Returns a Promise that resolves with an object containing CPU information. The structure of the returned object varies between Android and iOS:
The response object includes:
cpuArchitecture
: The architecture of the CPU (e.g., ARMv7, ARMv8).cpuCores
: The number of CPU cores available on the device.cpuFrequencyMax
: The maximum CPU frequency (in MHz).cpuFrequencyMin
: The minimum CPU frequency (in MHz).cpuModel
: The model or identifier of the CPU.primaryABI
: The primary Application Binary Interface (ABI) of the device.secondaryABI
: The secondary ABI of the device, if available.cpuFrequencyInfo
: An array containing information about each CPU core, including core index and current frequency.Due to iOS restrictions, the response object includes a limited set of information:
cpuArchitecture
: The architecture of the CPU (e.g., ARM64, x86_64).cpuCores
: The number of active CPU cores.primaryABI
: The primary ABI based on the CPU architecture.Note: iOS does not allow access to certain details like CPU frequency or the exact CPU model.
Contributions to the plugin are welcome. Please ensure to follow the coding standards and submit your pull requests for review.
This project is licensed under the MIT License.
FAQs
A plugin for full detail for cpu
We found that community-cordova-plugin-cpu 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.