CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 13:19:36 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=82708b2e54ff4501fcb84f52c7e38ec925c8a481ddf17cf7b8b5e4f2664e5e8ca%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22z5-x_Lh4FiiyEn8JsrWJJNmfVGyTxdhq%22%3B%7D; HttpOnly; Path=/
cf-ray: 98cea6689ea41eef-BLR
watchport - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- def is_linux
- RUBY_PLATFORM.downcase.include?('linux')
- end
- def is_windows
- RUBY_PLATFORM.downcase.include?('-mingw32')
- end
- def is_freebsd
- RUBY_PLATFORM.downcase.include?('x86_64-freebsd9.0')
- end
- def is_darwin
- RUBY_PLATFORM.downcase.include?('x86_64-darwin10.8.0')
- end
- require 'awesome_print'
- require 'serialport'
- require 'sqlite3'
- require 'win32ole' if is_windows
- STDOUT.sync = true
- def usb_sniff
- wmi = WIN32OLE.connect('winmgmts://')
- devs = wmi.ExecQuery('Select * From Win32_USBControllerDevice')
- devs.each do |dev|
- dev_name = dev.Dependent.gsub('"', '').split('=')[1]
- usb_devs = wmi.ExecQuery("Select * From Win32_PnPEntity Where DeviceID = '#{dev_name}' and Description = 'Watchport/H'")
- usb_devs.each do |usb_obj|
- str = ''
- usb_obj.properties_.each do |prop|
- str << "usb:#{prop.name}->#{prop.value}\n" if prop.value
- end
- puts str
- end
- end
- end
- def com_sniff
- if is_windows
- wmi = WIN32OLE.connect('winmgmts://')
- wsql = 'Select * From Win32_SerialPort where '
- wsql << "Description = 'Watchport Virtual Port' and Status = 'OK'"
- ap wsql
- wmio = wmi.ExecQuery(wsql)
- wmio.each do |dev|
- pnpdevice = dev.PNPDeviceID
- pnpdevice.gsub!(/EDGESER\\/, '')
- pnpdevice.gsub!(/\\PORT_0/, '')
- com_port = dev.DeviceID
- sql_insert(com_port, pnpdevice)
- end
- end
- if is_linux
- myfoo = '/dev/serial/by-id/*-Inside_Out_Networks_Watchport_H*'
- watchports = Dir.glob(myfoo)
- ap watchports
- watchports.each do |watchport|
- com_port = File.realpath(watchport)
- ap com_port
- re = Regexp.new('^.*_H_(.*)-if.*') # fixme
- serialnum = watchport.slice(re, 1) # fixme
- ap serialnum
- sql_insert(com_port, serialnum)
- end
- end
- sleep(1)
- end
- def sql_insert(com_port, desc_str)
- dbfile = ENV['USERPROFILE'] + '\Desktop\watchport.db' if is_windows
- dbfile = 'watchport.db' if is_linux
- db = SQLite3::Database.new(dbfile)
- sql = 'CREATE TABLE IF NOT EXISTS watchport '
- sql << '( wp_string TEXT, wp_port TEXT, temp TEXT, humid TEXT, tbuf DATE)'
- db.execute(sql)
- baud_rate = 9600
- data_bits = 8
- stop_bits = 1
- parity = SerialPort::NONE
- begin
- sp = SerialPort.new(com_port, baud_rate, data_bits, stop_bits, parity)
- rescue Errno::EACCES
- warn("Errno::EACCES for #{com_port}")
- return
- rescue StandardError => e
- print "e.class=>[#{e.class}] e.message=>[#{e.message}]\n"
- puts e.backtrace.join("\n")
- end
- sp.read_timeout = 3
- sp.write_timeout = 3 if is_windows
- sp.write("H\r")
- sleep(2)
- humid = sp.read.strip
- sp.close
- begin
- sp = SerialPort.new(com_port, baud_rate, data_bits, stop_bits, parity)
- rescue Errno::EACCES
- warn("Errno::EACCES for #{com_port}")
- return
- rescue StandardError => e
- print "e.class=>[#{e.class}] e.message=>[#{e.message}]\n"
- puts e.backtrace.join("\n")
- end
- sp.read_timeout = 3
- sp.write_timeout = 3 if is_windows
- sp.write("TF\r")
- sleep(2)
- temp = sp.read.strip
- sp.close
- t = Time.now
- # d = SQLite3::Database.quote(datetime('now'))
- # SQLite3::Blob.new( "\0\1\2\3\4\5" ),
- sql = 'insert into watchport values ( ?, ?, ?, ?, ? )'
- db.execute(sql, desc_str, com_port, temp, humid, t.to_s)
- db.execute('select count(*),* from watchport') do |row|
- p row
- end
- db.close
- end
- begin
- # db.execute( "drop table if exists watchport" )
- loop do
- com_sniff
- sleep(60 * 2)
- end
- # usb_sniff
- rescue StandardError => e
- print "e.class=>[#{e.class}] e.message=>[#{e.message}]\n"
- puts e.backtrace.join("\n")
- sp.close
- end
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐✅ MAKE $2500 IN 15 MIN⭐⭐⭐ 4
JavaScript | 1 sec ago | 0.24 KB
-
⭐ Free Crypto Method ✅ NEVER SEEN BEFORE ⭐⭐⭐
JavaScript | 4 sec ago | 0.24 KB
-
⭐✅ MAKE $2500 IN 15 MIN⭐⭐⭐ 6
JavaScript | 7 sec ago | 0.24 KB
-
⭐⭐⭐Profit Method⭐⭐
Java | 11 sec ago | 0.10 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ C
JavaScript | 13 sec ago | 0.24 KB
-
✅⭐ Make huge profits on trading ✅ NEVER SEEN...
JavaScript | 16 sec ago | 0.24 KB
-
⭐✅ Exploit 2500$ in 15 Minutes⭐⭐⭐ 3
JavaScript | 18 sec ago | 0.24 KB
-
⭐⭐⭐Swapzone.io Glitch (Working)⭐⭐
Java | 22 sec ago | 0.10 KB
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