Exploit databaseDownload repository ZIP
GH-f6dce893f919483355c418eab30c361d
aditswami/ftc_kryptons_pid_code
Sources for CVE-2019-11358
1,181 sourcesPreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars. Open preferred source
Repository files85
aditswami/ftc_kryptons_pid_codeRevision 03c2c6787761
- ↑..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_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
- linear_op_mode.js
- locale.js
- magnetic_flux.js
- matrix_f.js
- misc.js
- mr_i2c_compass_sensor.js
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
TeamCode/build/intermediates/assets/debug/mergeDebugAssets/blocks/acceleration_sensor.js
JavaScript · 6,929 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 FTC robot blocks related to acceleration sensor.
* @author lizlooney@google.com (Liz Looney)
*/
// The following are generated dynamically in HardwareUtil.fetchJavaScriptForHardware():
// createAccelerationSensorDropdown
// The following are defined in vars.js:
// functionColor
// getPropertyColor
Blockly.Blocks['accelerationSensor_getProperty'] = {
init: function() {
var PROPERTY_CHOICES = [
['XAccel', 'XAccel'],
['YAccel', 'YAccel'],
['ZAccel', 'ZAccel'],
];
this.setOutput(true); // no type, for compatibility
this.appendDummyInput()
.appendField(createAccelerationSensorDropdown(), 'IDENTIFIER')
.appendField('.')
.appendField(new Blockly.FieldDropdown(PROPERTY_CHOICES), 'PROP');
this.setColour(getPropertyColor);
// Assign 'this' to a variable for use in the tooltip closure below.
var thisBlock = this;
var TOOLTIPS = [
['XAccel', 'Returns the X Acceleration, in G\'s.'],
['YAccel', 'Returns the Y Acceleration, in G\'s.'],
['ZAccel', 'Returns the Z Acceleration, in G\'s.'],
];
this.setTooltip(function() {
var key = thisBlock.getFieldValue('PROP');
for (var i = 0; i < TOOLTIPS.length; i++) {
if (TOOLTIPS[i][0] == key) {
return TOOLTIPS[i][1];
}
}
return '';
});
}
};
Blockly.JavaScript['accelerationSensor_getProperty'] = function(block) {
var identifier = block.getFieldValue('IDENTIFIER');
var property = block.getFieldValue('PROP');
var code = identifier + '.get' + property + '()';
return [code, Blockly.JavaScript.ORDER_FUNCTION_CALL];
};
Blockly.FtcJava['accelerationSensor_getProperty'] = function(block) {
var identifier = Blockly.FtcJava.importDeclareAssign_(block, 'IDENTIFIER', 'AccelerationSensor');
var property = block.getFieldValue('PROP');
switch (property) {
case 'Acceleration':
var code = identifier + '.get' + property + '()';
return [code, Blockly.FtcJava.ORDER_FUNCTION_CALL];
case 'XAccel':
case 'YAccel':
case 'ZAccel':
var code = identifier + '.getAcceleration().' + Blockly.FtcJava.makeFirstLetterLowerCase_(property);
return [code, Blockly.FtcJava.ORDER_MEMBER];
default:
throw 'Unexpected property ' + property + ' (accelerationSensor_getProperty).';
}
};
Blockly.Blocks['accelerationSensor_getProperty_Number'] = {
init: function() {
var PROPERTY_CHOICES = [
['XAccel', 'XAccel'],
['YAccel', 'YAccel'],
['ZAccel', 'ZAccel'],
];
this.setOutput(true, 'Number');
this.appendDummyInput()
.appendField(createAccelerationSensorDropdown(), 'IDENTIFIER')
.appendField('.')
.appendField(new Blockly.FieldDropdown(PROPERTY_CHOICES), 'PROP');
this.setColour(getPropertyColor);
// Assign 'this' to a variable for use in the closures below.
var thisBlock = this;
var TOOLTIPS = [
['XAccel', 'Returns the X Acceleration, in G\'s.'],
['YAccel', 'Returns the Y Acceleration, in G\'s.'],
['ZAccel', 'Returns the Z Acceleration, in G\'s.'],
];
this.setTooltip(function() {
var key = thisBlock.getFieldValue('PROP');
for (var i = 0; i < TOOLTIPS.length; i++) {
if (TOOLTIPS[i][0] == key) {
return TOOLTIPS[i][1];
}
}
return '';
});
this.getFtcJavaOutputType = function() {
var property = thisBlock.getFieldValue('PROP');
switch (property) {
case 'XAccel':
case 'YAccel':
case 'ZAccel':
return 'double';
default:
throw 'Unexpected property ' + property + ' (accelerationSensor_getProperty_Number getOutputType).';
}
};
}
};
Blockly.JavaScript['accelerationSensor_getProperty_Number'] =
Blockly.JavaScript['accelerationSensor_getProperty'];
Blockly.FtcJava['accelerationSensor_getProperty_Number'] =
Blockly.FtcJava['accelerationSensor_getProperty'];
Blockly.Blocks['accelerationSensor_getProperty_Acceleration'] = {
init: function() {
var PROPERTY_CHOICES = [
['Acceleration', 'Acceleration'],
];
this.setOutput(true, 'Acceleration');
this.appendDummyInput()
.appendField(createAccelerationSensorDropdown(), 'IDENTIFIER')
.appendField('.')
.appendField(new Blockly.FieldDropdown(PROPERTY_CHOICES), 'PROP');
this.setColour(getPropertyColor);
// Assign 'this' to a variable for use in the tooltip closure below.
var thisBlock = this;
var TOOLTIPS = [
['Acceleration', 'Returns an Acceleration object representing acceleration in X, Y and Z ' +
'axes.'],
];
this.setTooltip(function() {
var key = thisBlock.getFieldValue('PROP');
for (var i = 0; i < TOOLTIPS.length; i++) {
if (TOOLTIPS[i][0] == key) {
return TOOLTIPS[i][1];
}
}
return '';
});
}
};
Blockly.JavaScript['accelerationSensor_getProperty_Acceleration'] =
Blockly.JavaScript['accelerationSensor_getProperty'];
Blockly.FtcJava['accelerationSensor_getProperty_Acceleration'] =
Blockly.FtcJava['accelerationSensor_getProperty'];
Blockly.Blocks['accelerationSensor_toText'] = {
init: function() {
this.setOutput(true, 'String');
this.appendDummyInput()
.appendField('call')
.appendField(createAccelerationSensorDropdown(), 'IDENTIFIER')
.appendField('.')
.appendField(createNonEditableField('toText'));
this.setColour(functionColor);
this.setTooltip('Returns a text representation of acceleration in X, Y, and Z axes.');
}
};
Blockly.JavaScript['accelerationSensor_toText'] = function(block) {
var identifier = block.getFieldValue('IDENTIFIER');
var code = identifier + '.toText()';
return [code, Blockly.JavaScript.ORDER_FUNCTION_CALL];
};
Blockly.FtcJava['accelerationSensor_toText'] = function(block) {
var identifier = Blockly.FtcJava.importDeclareAssign_(block, 'IDENTIFIER', 'AccelerationSensor');
var code = identifier + '.toString()';
return [code, Blockly.FtcJava.ORDER_FUNCTION_CALL];
};