from scapy.all import *

def get_interfaces():
	interfaces = []
	if platform == "linux" or platform == "linux2":
		for i in get_if_list():
			interfaces.append(i)
	elif platform == "darwin":
		for i in get_if_list():
			interfaces.append(i)
	elif platform == "win32":
		output = os.popen('route print').read()
		lines = output.split('\n')
		for line in lines:
			if ("......" in line):
				interfaces.append(line.split("......")[1])
	return interfaces