
Security Fundamentals
Turtles, Clams, and Cyber Threat Actors: Shell Usage
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Retrieves and parses network statistics related to IPv4 TCP and UDP connection returns this information as a Pandas DataFrame
Retrieve and parse network statistics related to IPv4 TCP and UDP connections.
This function uses the 'netstat' command-line utility to gather information about
IPv4 TCP and UDP connections, including local and foreign addresses, ports, process
IDs (PIDs), and executable names. It then processes and returns this information
as a Pandas DataFrame.
Returns:
pd.DataFrame: A DataFrame containing the following columns:
- 'aa_proto': Protocol type ('TCP' or 'UDP').
- 'aa_local_address': Local IP address.
- 'aa_local_port': Local port number.
- 'aa_foreign_address': Foreign IP address.
- 'aa_foreign_port': Foreign port number.
- 'aa_pid': Process ID (PID) of the associated process.
- 'aa_executable': Executable name of the associated process.
- 'aa_status': Status of the connection (may be empty or NaN if unavailable).
Note:
- If any error occurs during the retrieval or parsing of network statistics,
the function returns an empty DataFrame.
Example:
>>> from netstat2df import get_netstat_ipv4_df
>>> df = get_netstat_ipv4_df()
>>> print(df.head())
FAQs
Retrieves and parses network statistics related to IPv4 TCP and UDP connection returns this information as a Pandas DataFrame
We found that netstat2df 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.
Security Fundamentals
The Socket Threat Research Team uncovers how threat actors weaponize shell techniques across npm, PyPI, and Go ecosystems to maintain persistence and exfiltrate data.
Security News
At VulnCon 2025, NIST scrapped its NVD consortium plans, admitted it can't keep up with CVEs, and outlined automation efforts amid a mounting backlog.
Product
We redesigned our GitHub PR comments to deliver clear, actionable security insights without adding noise to your workflow.