Exploit databaseDownload repository ZIP
GH-1391d93dbe22e2db8d7a5c06ccddac22
aclarke25/polyintothedeep
Sources for CVE-2019-11358
1,181 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files90
aclarke25/polyintothedeepRevision 48965e77c5b9
- ↑..Parent directory
- images/
- obsolete/
- samples/
- FtcBlocksProjects_common.js
- FtcBlocks_common.js
- acceleration.js
- acceleration_sensor.js
- analog_input.js
- analog_output.js
- android_accelerometer.js
- android_gyroscope.js
- android_orientation.js
- android_sound_pool.js
- android_text_to_speech.js
- angular_velocity.js
- april_tag.js
- bno055imu.js
- bno055imu_parameters.js
- clipboard_util.js
- color.js
- color_blob_locator.js
- color_range_sensor.js
- color_sensor.js
- compass_sensor.js
- cr_servo.js
- dbg_log.js
- dc_motor.js
- digital_channel.js
- distance_sensor.js
- elapsed_time2.js
- exposure_control.js
- file_manager.js
- focus_control.js
- gain_control.js
- gamepad.js
- gyro_sensor.js
- hardware_util.js
- husky_lens.js
- images.css
- imu.js
- imu_parameters.js
- ir_seeker_sensor.js
- led.js
- led_effect.js
- light_sensor.js
- limelight_3a.js
- linear_op_mode.js
- locale.js
- magnetic_flux.js
- matrix_f.js
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
TeamCode/build/intermediates/assets/debug/blocks/hardware_util.js
JavaScript · 3,673 bytes/**
* @license
* Copyright 2016 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Hardware utilities.
* @author lizlooney@google.com (Liz Looney)
*/
// Note: This file is misnamed. It includes some utilities not related to hardware.
/**
* Fetches the JavaScript code related to the hardware in the active configuration and calls the
* callback.
*/
function fetchJavaScriptForHardware(callback) {
if (window.location.protocol === 'http:' || window.location.protocol === 'https:') {
// html/js is in a browser, loaded as an http:// URL.
fetchJavaScriptForHardwareViaHttp(callback);
} else if (window.location.protocol === 'file:') {
// html/js is in a browser, loaded as an file:// URL.
fetchJavaScriptForHardwareViaFile(callback);
}
}
function getConfigurationName(callback) {
if (window.location.protocol === 'http:' || window.location.protocol === 'https:') {
// html/js is in a browser, loaded as an http:// URL.
getConfigurationNameViaHttp(callback);
} else if (window.location.protocol === 'file:') {
// html/js is in a browser, loaded as an file:// URL.
getConfigurationNameViaFile(callback);
}
}
//..........................................................................
// Code used when html/js is in a browser, loaded as a http:// URL.
// The following are generated dynamically in ProgrammingModeServer.fetchJavaScriptForServer():
// URI_HARDWARE
// PARAM_NAME
function fetchJavaScriptForHardwareViaHttp(callback) {
var xhr = new XMLHttpRequest();
xhr.open('GET', URI_HARDWARE, true);
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
var jsHardware = xhr.responseText;
callback(jsHardware, '');
} else {
// TODO(lizlooney): Use specific error messages for various xhr.status values.
callback(null, 'Fetch JavaScript for Hardware failed. Error code ' + xhr.status + '. ' + xhr.statusText);
}
}
};
xhr.send();
}
function getConfigurationNameViaHttp(callback) {
var xhr = new XMLHttpRequest();
xhr.open('POST', URI_GET_CONFIGURATION_NAME, true);
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
var className = xhr.responseText;
callback(className, '');
} else {
// TODO(lizlooney): Use specific error messages for various xhr.status values.
callback(null, 'Get configuration name failed. Error code ' + xhr.status + '. ' + xhr.statusText);
}
}
};
xhr.send();
}
//..........................................................................
// Code used when html/js is in a browser, loaded as a file:// URL.
function fetchJavaScriptForHardwareViaFile(callback) {
setTimeout(function() {
callback('// See FtcOfflineBlocks.js', '');
}, 0);
}
function getConfigurationNameViaFile(callback) {
setTimeout(function() {
callback(getOfflineConfigurationName(), '');
}, 0);
}