daily pastebin goal
39%
SHARE
TWEET

moRFeus Tracking Generator Python Script

rtlsdrblog May 31st, 2018 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import sys
  2. import telnetlib
  3. import os
  4. import time
  5.  
  6. HOST = "localhost"
  7. PORT = "7356"
  8.  
  9. FREQ_MIN = 85
  10. FREQ_MAX = 1500
  11.  
  12. tn = telnetlib.Telnet(HOST, PORT)
  13.  
  14. def writeCommand(cmd):
  15.     tn.write(('%s\n' % cmd).encode('ascii'))
  16.     return tn.read_some().decode('ascii').strip();
  17.  
  18. def setMorfeusFreq(freq):
  19.     os.system("~/morfeus_tool_linux_x32 setFrequency " + str(freq))
  20.  
  21. def trackFreq(freq):
  22.     freq_hz = freq * 1000000
  23.     setMorfeusFreq(freq_hz)
  24.     writeCommand("F " + str(freq_hz))
  25.  
  26.  
  27. os.system("~/morfeus_tool_linux_x32 Generator")
  28. os.system("~/morfeus_tool_linux_x32 setCurrent 1")
  29.  
  30. f = open("out.txt", "w+")
  31.  
  32. for x in range(FREQ_MIN, FREQ_MAX):
  33.     trackFreq(x)
  34.     time.sleep(0.5)
  35.     pwr =  writeCommand('l')
  36.     f.write(str(x) + ', ' + pwr + '\n')
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top