Example #1
0
    firstUpdate = False


app = QtGui.QApplication(sys.argv)
MainWindow = QtGui.QMainWindow()
mainUi = ui.main.Ui_MainWindow()
mainUi.setupUi(MainWindow)

prepareUI(mainUi)
loadSettings()

MainWindow.show()
app.processEvents()

rootproxy.start(asRoot=True)
if not rootproxy.isStarted():
    messageui.doMessageWindow(
        "Process explorer has no root privileges. TCPIP traffic monitoring (using tcpdump) will not be available."
    )

reader = procreader.reader.procreader(int(settings["updateTimer"]),
                                      int(settings["historySampleCount"]))

timer.start(int(settings["updateTimer"]))

if onlyUser:
    reader.setFilterUID(os.geteuid())

systemOverviewUi = systemoverview.systemOverviewUi(
    reader.getCpuCount(), int(settings["historySampleCount"]), reader)


app = QtGui.QApplication(sys.argv)
MainWindow = QtGui.QMainWindow()
mainUi = ui.main.Ui_MainWindow()
mainUi.setupUi(MainWindow)

prepareUI(mainUi)
loadSettings()


MainWindow.show()
app.processEvents()

rootproxy.start(asRoot=True)
if not rootproxy.isStarted():
  messageui.doMessageWindow("Process explorer has no root privileges. TCPIP traffic monitoring (using tcpdump) will not be available.")

reader = procreader.reader.procreader(int(settings["updateTimer"]), int(settings["historySampleCount"]))

timer.start(int(settings["updateTimer"]))

if onlyUser:
  reader.setFilterUID(os.geteuid())

systemOverviewUi = systemoverview.systemOverviewUi(reader.getCpuCount(), int(settings["historySampleCount"]), reader)
networkOverviewUi = networkoverview.networkOverviewUi(reader.getNetworkCards(), int(settings["historySampleCount"]), reader)

systemOverviewUi.setFontSize(int(settings["fontSize"]))
networkOverviewUi.setFontSize(int(settings["fontSize"]))
Example #3
0
import rootproxy
import os
import uuid
import threading


def readFifo(f):
    theFile = open(f, "r")
    while True:
        print theFile.readline(),


fifo = "/tmp/test" + str(uuid.uuid4())  #ParentTOChild
os.mkfifo(fifo)

t = threading.Thread(target=readFifo, args=(fifo, ))
t.daemon = True
t.start()

rootproxy.start()

rootproxy.doContinuousCommand(
    ["tcpdump", "-U", "-l", "-q", "-nn", "-t", "-i", "any"], fifo)

for _ in xrange(300):
    rootproxy.doCommand(["sleep", "1"])
rootproxy.end()
Example #4
0
import rootproxy
import os
import uuid
import threading

def readFifo(f):
  theFile = open(f,"r")
  while True:
    print theFile.readline(),

fifo = "/tmp/test"+str(uuid.uuid4()) #ParentTOChild
os.mkfifo(fifo)

t = threading.Thread(target=readFifo, args=(fifo, ))
t.daemon = True
t.start()

rootproxy.start()

rootproxy.doContinuousCommand(["tcpdump", "-U" , "-l", "-q", "-nn", "-t", "-i",  "any"], fifo)

for _ in xrange(300):
  rootproxy.doCommand(["sleep", "1"])
rootproxy.end()