Recently Added

Notes & Bookmarks

  1. Quasars; power and metrics beyond all comprehension. Staggeringly beautiful information... and very well written.
  2. "I'm sorry. I can't come in today. Religious holiday. The feast of...Maximum Occupancy."
  3. Verifying myself: I am sgnls on UJa01G4v3YRJYB1LFjDRSf1Nh0bh1sOykCbq /
  4. Be sure to take care of your own infrastructure(s); purge dumps, tunnel and lock-down egress transit, encrypt and permission CORRECTLY!
  5. It really doesn't matter what else gets released; Sikth's 'The Future in Whose Eyes?' is THE album of 2017. #albumoftheyear

Kaseya RDP

Updated : 12:17:31pm, 28th Feb 2016

Archived here as intention to tweak and adjust this for (current) requirements.

# Written by Shawn Jackson for i-worx Enterprises Inc on November 14, 2008
# Copyright 2008 i-worx Enterprises Inc.

# You may use and redistribute this script, in whole or in part, providing you
# include this notice and do not distribute it as a part of a commercial product.

# Get number of active Kaseya RDP connections
prevOpenConnections=`netstat -lnp 2>/dev/null | grep "wineserver\|noActiveX" 2>/dev/null | grep -c "" 2>/dev/null`
echo $prevOpenConnections
# Execute the noActiveX... file

mkdir -p "$kaseyatemp"
# get around a problem with noexec tmp and firefox.
executable="${kaseyatemp}/$(basename $1)"
cp "$1" "$executable"
chmod +x "$executable"
cd "$kaseyatemp"
wine "$executable" 2>/dev/null &
# Wait until there is another Kaseya RDP listening session/port
until [ `netstat -lnp 2>/dev/null | grep "wineserver\|noActiveX" | grep -c` -gt $prevOpenConnections ]; do
  echo Current: `netstat -lnp 2>/dev/null | grep "wineserver\|noActiveX" | grep -c`
  echo Prev: $prevOpenConnections
  # If fewer connections are open than initially (one was closed) then update prevOpenConnections 
  if [ `netstat -lnp 2>/dev/null | grep "wineserver\|noActiveX" | grep -c` -lt $prevOpenConnections ]; then
    prevOpenConnections=`netstat -lnp 2>/dev/null | grep "wineserver\|noActiveX" | grep -c`
  sleep 1
# Now that there is a new Kaseya RDP listening attempt to connect to each.
# This is a bit of a hack, but only the new session will accept your connection.
var=`netstat -lnp 2>/dev/null | grep "wineserver\|noActiveX" 2>/dev/null | grep "" 2>/dev/null`
listeningsessions=(`echo $var`)
for i in "${listeningsessions[@]}"; do
  echo /usr/bin/rdesktop -T $i -k en-gb -a 16 -g 1275x964 $i
  /usr/bin/rdesktop -0 -T $i -k en-gb -a 16 -g 1275x964 $i &
  sleep 1
rm -f "$executable" 2>/dev/null © 2006-2017

Comments, submissions and errors to desk[at]

Material and content adheres to the Creative Commons (NC-SA 4.0) license.