Synced with Agent Repo
1. Capped smbios to 64k 2. Removed commented out code from win-console.js 3. Updated win-terminal to check for null before pushing
This commit is contained in:
parent
f5c5ebaf5e
commit
8550ca648b
|
@ -191,6 +191,12 @@ function SMBiosTables()
|
|||
catch(e)
|
||||
{
|
||||
}
|
||||
try
|
||||
{
|
||||
if (JSON.stringify(r).length > 65535) { r = {}; }
|
||||
}
|
||||
catch(ee)
|
||||
{}
|
||||
return r;
|
||||
}
|
||||
this.processorInfo = function processorInfo(data) {
|
||||
|
|
|
@ -145,7 +145,6 @@ function WindowsConsole()
|
|||
this.TrayIcon.remove();
|
||||
handled = true;
|
||||
}
|
||||
//if (!handled) { console.log(msg); }
|
||||
}
|
||||
});
|
||||
retVal.remove = function remove()
|
||||
|
|
|
@ -401,7 +401,8 @@ function windows_terminal() {
|
|||
}
|
||||
}
|
||||
}
|
||||
this._WriteCharacter = function (key, bControlKey) {
|
||||
this._WriteCharacter = function (key, bControlKey)
|
||||
{
|
||||
var rec = GM.CreateVariable(20);
|
||||
rec.Deref(0, 2).toBuffer().writeUInt16LE(KEY_EVENT); // rec.EventType
|
||||
rec.Deref(4, 4).toBuffer().writeUInt16LE(1); // rec.Event.KeyEvent.bKeyDown
|
||||
|
@ -478,23 +479,28 @@ function windows_terminal() {
|
|||
return (retVal);
|
||||
}
|
||||
|
||||
this._SendDataBuffer = function (data) {
|
||||
this._SendDataBuffer = function (data)
|
||||
{
|
||||
// { data, attributes, width, height, x, y }
|
||||
if (this._stream != null)
|
||||
{
|
||||
var dy, line, attr;
|
||||
for (dy = 0; dy < data.height; ++dy)
|
||||
{
|
||||
line = data.data[dy];
|
||||
attr = data.attributes[dy];
|
||||
line.s = line.toString();
|
||||
|
||||
var dy, line, attr;
|
||||
for (dy = 0; dy < data.height; ++dy) {
|
||||
line = data.data[dy];
|
||||
attr = data.attributes[dy];
|
||||
line.s = line.toString();
|
||||
|
||||
//line = data.data.slice(data.width * dy, (data.width * dy) + data.width);
|
||||
//attr = data.attributes.slice(data.width * dy, (data.width * dy) + data.width);
|
||||
this._stream.push(TranslateLine(data.x + 1, data.y + dy + 1, line, attr));
|
||||
//line = data.data.slice(data.width * dy, (data.width * dy) + data.width);
|
||||
//attr = data.attributes.slice(data.width * dy, (data.width * dy) + data.width);
|
||||
this._stream.push(TranslateLine(data.x + 1, data.y + dy + 1, line, attr));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this._SendScroll = function _SendScroll(dx, dy) {
|
||||
if (this._scrollTimer) { return; }
|
||||
this._SendScroll = function _SendScroll(dx, dy)
|
||||
{
|
||||
if (this._scrollTimer || this._stream == null) { return; }
|
||||
|
||||
var info = GM.CreateVariable(22);
|
||||
if (this._kernel32.GetConsoleScreenBufferInfo(this._stdoutput, info).Val == 0) { throw ('Error getting screen buffer info'); }
|
||||
|
|
Loading…
Reference in New Issue