Benign alpine Download

iproute2 7.1.0-r0

Legitimate iproute2 package binaries

Alpine apk maintainer script basenameSubprocess import outside excluded contexts
SHA-256df4f1c37da95d010789f3086387119a2139ca744d15715dd5c54aae16a283e53

Evidence

imports subprocess routel · lines 1–48
1#! /usr/bin/env python3
2# SPDX-License-Identifier: GPL-2.0
3#
4# This is simple script to process JSON output from ip route
5# command and format it. Based on earlier shell script version.
6"""Script to parse ip route output into more readable text."""
7
8import sys
9import json
10import getopt
11import subprocess
12
13
14def usage():
15 '''Print usage and exit'''
16 print("Usage: {} [tablenr [raw ip args...]]".format(sys.argv[0]))
17 sys.exit(64)
18
19
20def main():
21 '''Process the arguments'''
22 family = 'inet'
23 try:
24 opts, args = getopt.getopt(sys.argv[1:], "h46f:", ["help", "family="])
25 except getopt.GetoptError as err:
26 print(err)
27 usage()
28
29 for opt, arg in opts:
30 if opt in ["-h", "--help"]:
31 usage()
⋯11 lines
43
44 cmd = ['ip', '-f', family, '-j', 'route', 'list', 'table'] + args
45 process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
46 tbl = json.load(process.stdout)
47 if family == 'inet':
48 fmt = '{:15} {:15} {:15} {:8} {:8}{:<16} {}'
Bind socket to address ifstat · 0xcaf–0xe8f
⋯8 more rows
0xd2f5f6661696c0066666c75736800667075_fail.fflush.fpu
0xd3f74730076667072696e746600736f636bts.vfprintf.sock
0xd4f657400736574736f636b6f7074006269et.setsockopt.bi
0xd5f6e6400676574736f636b6e616d650074nd.getsockname.t
0xd6f696d6500726563766d73670073747265ime.recvmsg.stre
0xd7f72726f720073656e646d73670069665frror.sendmsg.if_
0xd8f696e646578746f6e616d650066777269indextoname.fwri
0xd9f74650073656e64006765746f70745f6cte.send.getopt_l
0xdaf6f6e67006f70746172670061746f6900ong.optarg.atoi.
0xdbf6f7074696e64007374726e636d700067optind.strncmp.g
0xdcf657475696400657870006c697374656eetuid.exp.listen
0xddf006461656d6f6e007369676e616c0072.daemon.signal.r
0xdef616e646f6d0067657470696400676574andom.getpid.get
0xdff74696d656f6664617900706f6c6c0061timeofday.poll.a
0xe0f636365707400666f726b0066646f7065ccept.fork.fdope
0xe1f6e007761697470696400676574656e76n.waitpid.getenv
0xe2f00756e6c696e6b0066696c656e6f0066.unlink.fileno.f
0xe3f6c6f636b00667374617400666f70656elock.fstat.fopen
0xe4f00667363616e660066636c6f73650066.fscanf.fclose.f
0xe5f7472756e6361746500636f6e6e656374truncate.connect
0xe6f00676574736f636b6f70740072657769.getsockopt.rewi
0xe7f6e64006d6e6c5f617474725f6765745fnd.mnl_attr_get_
0xe8f753332006d6e6c5f6e6c6d u32.mnl_nlm
Converts network to host long genl · 0x3747–0x3847
0x3747696e0066707574730073746465727200in.fputs.stderr.
0x375765786974005f5f737461636b5f63686bexit.__stack_chk
0x37675f6661696c007374726c656e006e746f_fail.strlen.nto
0x3777686c00736e7072696e7466005f5f6572hl.snprintf.__er
0x3787726e6f5f6c6f636174696f6e00676574rno_location.get
0x3797656e760073747263707900666f70656eenv.strcpy.fopen
0x37a700667363616e660066636c6f73650066.fscanf.fclose.f
0x37b76765747300737363616e66006d616c6cgets.sscanf.mall
0x37c76f6300737472647570006f70656e6469oc.strdup.opendi
0x37d772007265616464697200737472636d70r.readdir.strcmp
0x37e7006c7374617400636c6f736564697200.lstat.closedir.
0x37f76670757463005f5f6173736572745f66fputc.__assert_f
0x380761696c00726563766d73670073747265ail.recvmsg.stre
0x381772726f72007265637600646c6f70656error.recv.dlopen
0x382700646c73796d0063616c6c6f63007374.dlsym.calloc.st
0x3837726e6370790073747263687200737472rncpy.strchr.str
0x3847746f6c007374 tol.st
Converts host to network long genl · 0x386d–0x392d
0x386d7472746f756c6c00737472746f6c6c00trtoull.strtoll.
0x387d68746f6e6c0068746f6e73007374726ehtonl.htons.strn
0x388d6c656e006d656d636d700061746f6900len.memcmp.atoi.
0x389d737973636f6e66006e746f6873007075sysconf.ntohs.pu
0x38ad7463686172006c6f63616c74696d6500tchar.localtime.
0x38bd61736374696d65006765747569640067asctime.getuid.g
0x38cd657465756964006361705f6765745f70eteuid.cap_get_p
0x38dd726f63006361705f6765745f666c6167roc.cap_get_flag
0x38ed006361705f636c656172006361705f73.cap_clear.cap_s
0x38fd65745f70726f63006361705f66726565et_proc.cap_free
0x390d00737464696e006672656f70656e0067.stdin.freopen.g
0x391d65746c696e6500737472636174007374etline.strcat.st
0x392d72737472007265616c6c6f630073 rstr.realloc.s
Parse IP with inet_ntop genl · 0x3941–0x3a61
0x39417374726373706e007374727263687200strcspn.strrchr.
0x3951696e65745f6e746f7000736574686f73inet_ntop.sethos
0x396174656e74007374646f75740066666c75tent.stdout.fflu
0x3971736800676574686f7374627961646472sh.gethostbyaddr
0x39810066696c656e6f006973617474790073.fileno.isatty.s
0x399174726368726e756c0076667072696e74trchrnul.vfprint
0x39a16600696e65745f70746f6e0070657272f.inet_pton.perr
0x39b16f720067657474696d656f6664617900or.gettimeofday.
0x39c17374726674696d650061737072696e74strftime.asprint
0x39d1660073656e646d736700667772697465f.sendmsg.fwrite
0x39e100736574736f636b6f707400736f636b.setsockopt.sock
0x39f165740062696e6400676574736f636b6eet.bind.getsockn
0x3a01616d650066726561640066656f660066ame.fread.feof.f
0x3a1174656c6c00666572726f72007374726ctell.ferror.strl
0x3a216370790069665f696e646578746f6e61cpy.if_indextona
0x3a316d650069665f6e616d65746f696e6465me.if_nametoinde
0x3a4178006d6e6c5f617474725f6765745f75x.mnl_attr_get_u
0x3a513332006d6e6c5f6e6c6d73675f67657432.mnl_nlmsg_get
0x3a615f _

Showing the top 5 files — 4 more files (35 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.