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."pic.twitter.com/mkgxPWfNj2
  3. Verifying myself: I am sgnls on Keybase.io. UJa01G4v3YRJYB1LFjDRSf1Nh0bh1sOykCbq / https://keybase.io/sgnls/sigs/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 @SikthOfficialpic.twitter.com/P5houdf1yx

Kaseya RDP

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

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

#!/bin/bash
# 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 "127.0.0.1:9..." 2>/dev/null`
echo $prevOpenConnections
# Execute the noActiveX... file

kaseyatemp=~/kaseyatemp
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 127.0.0.1:9...` -gt $prevOpenConnections ]; do
  echo Current: `netstat -lnp 2>/dev/null | grep "wineserver\|noActiveX" | grep -c 127.0.0.1:9...`
  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 127.0.0.1:9...` -lt $prevOpenConnections ]; then
    prevOpenConnections=`netstat -lnp 2>/dev/null | grep "wineserver\|noActiveX" | grep -c 127.0.0.1:9...`
  fi
  sleep 1
done
# 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 "127.0.0.1:9..." 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
done
rm -f "$executable" 2>/dev/null

SGNLS.net © 2006-2017

Comments, submissions and errors to desk[at]sgnls.net.

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

v12.01151