Skip to content

Commit

Permalink
Include basic script to search existing JS, along with findings
Browse files Browse the repository at this point in the history
  • Loading branch information
Zetaphor committed Aug 28, 2023
1 parent 4a8166e commit 9eb8ee9
Show file tree
Hide file tree
Showing 5 changed files with 910 additions and 0 deletions.
328 changes: 328 additions & 0 deletions RemovedApis.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,328 @@
Account
AddressManager
AnimationCache.updateTotalSize
Audio.devices
Audio.onContextChanged
Audio.setInputDevice
Audio.setOutputDevice
Audio.nop
Avatar.attachmentData
Avatar.getAttachmentsVariant
Avatar.setAttachmentsVariant
Avatar.getAttachmentData
Avatar.clearAvatarEntity
Avatar.attach
Avatar.detachAll
Avatar.detachOne
Avatar.resetLastSent
Avatar.sendAvatarDataPacket
Avatar.sendAvatarDataPacket
Avatar.sendIdentityPacket
Avatar.setSessionUUID
Avatar.setAttachmentData
Avatar.setForceFaceTrackerConnected
Avatar.setJointMappingsFromNetworkReply
Avatar.update
Avatar.updateAvatarEntity
AvatarBookmarks.deleteBookmark
AvatarBookmarks.updateAvatarEntities
AvatarBookmarks.deleteBookmark
AvatarInputs.cameraEnabled
AvatarInputs.cameraMuted
AvatarInputs.toggleCameraMute
AvatarInputs.avatarLeftIgnoreRadius
AvatarInputs.cameraEnabledChanged
AvatarInputs.cameraMutedChanged
AvatarList.processAvatarDataPacket
AvatarList.processAvatarIdentityPacket
AvatarList.processBulkAvatarTraits
AvatarList.processKillAvatar
AvatarList.sessionUUIDChanged
AvatarManager.findParabolaIntersectionVector
AvatarManager.findRayIntersectionVector
AvatarManager.getAvatarSortCoefficient
AvatarManager.setAvatarSortCoefficient
AvatarManager.updateAvatarRenderStatus
AvatarManager.PalData.isReplicated
Controller.captureJoystick
Controller.releaseJoystick
Controller.updateRunningInputDevices
Controller.Actions.LeftHandClick
Controller.Actions.RightHandClick
Controller.Actions.Shift
Controller.Actions.PrimaryAction
Controller.Actions.SecondaryAction
Controller.Actions.LEFT_HAND
Controller.Actions.RIGHT_HAND
Controller.Actions.BOOM_IN
Controller.Actions.BOOM_OUT
Controller.Actions.CONTEXT_MENU
Controller.Actions.TOGGLE_MUTE
Controller.Actions.TOGGLE_PUSHTOTALK
Controller.Actions.SPRINT
Controller.Actions.LONGITUDINAL_BACKWARD
Controller.Actions.LONGITUDINAL_FORWARD
Controller.Actions.LATERAL_LEFT
Controller.Actions.LATERAL_RIGHT
Controller.Actions.VERTICAL_UP
Controller.Actions.VERTICAL_DOWN
Controller.Actions.PITCH_DOWN
Controller.Actions.PITCH_UP
Controller.Actions.YAW_LEFT
Controller.Actions.YAW_RIGHT
Controller.Actions.LEFT_HAND_CLICK
Controller.Actions.RIGHT_HAND_CLICK
Controller.Actions.SHIFT
Controller.Actions.ACTION1
Controller.Actions.ACTION2
Controller.Actions.TrackedObject00
Controller.Actions.TrackedObject01
Controller.Actions.TrackedObject02
Controller.Actions.TrackedObject03
Controller.Actions.TrackedObject04
Controller.Actions.TrackedObject05
Controller.Actions.TrackedObject06
Controller.Actions.TrackedObject07
Controller.Actions.TrackedObject08
Controller.Actions.TrackedObject09
Controller.Actions.TrackedObject10
Controller.Actions.TrackedObject11
Controller.Actions.TrackedObject12
Controller.Actions.TrackedObject13
Controller.Actions.TrackedObject14
Controller.Actions.TrackedObject15
Entities.mouseMoveEvent
Entities.appendPoint
Entities.getMeshes
Entities.setAllPoints
Entities.ActionType
Entities.EntityProperties.acceleration
Entities.EntityProperties-Grid.pulse
Entities.EntityProperties-Grid.alpha
Entities.EntityProperties-Image.pulse
Entities.EntityProperties-Image.alpha
Entities.EntityProperties-Image.faceCamera
Entities.EntityProperties-Image.isFacingAvatar
Entities.EntityProperties-Line
Entities.EntityProperties-Model.modelScale
Entities.EntityProperties-ParticleEffect.pulse
Entities.EntityProperties-Shape.pulse
Entities.EntityProperties-Text.pulse
Entities.EntityProperties-Text.faceCamera
Entities.EntityProperties-Text.isFacingAvatar
Entities.EntityProperties-Web.pulse
Entities.EntityProperties-Web.faceCamera
Entities.EntityProperties-Web.isFacingAvatar
EntityViewer.getBoundaryLevelAdjust
EntityViewer.getVoxelSizeScale
EntityViewer.setVoxelSizeScale
EntityViewer.setBoundaryLevelAdjust
EntityViewer.setKeyholeRadius
GlobalServices
HifiAbout
LODManager.lodQualityLevel
LODManager.getBoundaryLevelAdjust
LODManager.getOctreeSizeScale
LODManager.setOctreeSizeScale
LODManager.setBoundaryLevelAdjust
LODManager.LODDecreased
LODManager.LODIncreased
LODManager.lodQualityLevelChanged
MaterialCache.updateTotalSize
Midi.midiNote
ModelCache.updateTotalSize
MyAvatar.attachmentData
MyAvatar.qmlPosition
MyAvatar.energy
MyAvatar.characterControllerEnabled
MyAvatar.userRecenterModel
MyAvatar.isSitStandStateLocked
MyAvatar.addThrust
MyAvatar.animGraphLoaded
MyAvatar.clearScaleRestriction
MyAvatar.getCharacterControllerEnabled
MyAvatar.getSimulationRate
MyAvatar.getThrust
MyAvatar.restrictScaleFromDomainSettings
MyAvatar.rigReady
MyAvatar.rigReset
MyAvatar.safeLanding
MyAvatar.setCharacterControllerEnabled
MyAvatar.setModelScale
MyAvatar.setModelURLFinished
MyAvatar.setThrust
MyAvatar.setToggleHips
MyAvatar.attachmentsChanged
MyAvatar.energyChanged
MyAvatar.transformChanged
MyAvatar.IKTargetType.HmdHead
MyAvatar.SitStandModelType
MyAvatar.analogPlusSprintSpeed
Paths
Picks.PICK_ENTITIES
Picks.PICK_OVERLAYS
Picks.INTERSECTED_OVERLAY
Picks.INTERSECTED_AVATAR method
Picks.INTERSECTED_ENTITY method
Picks.INTERSECTED_HUD method
Picks.INTERSECTED_LOCAL_ENTITY method
Picks.INTERSECTED_NONE method
Picks.INTERSECTED_OVERLAY method
Picks.PICK_ALL_INTERSECTIONS method
Picks.PICK_AVATARS method
Picks.PICK_AVATAR_ENTITIES method
Picks.PICK_COARSE method
Picks.PICK_DOMAIN_ENTITIES method
Picks.PICK_HUD method
Picks.PICK_INCLUDE_COLLIDABLE method
Picks.PICK_INCLUDE_INVISIBLE method
Picks.PICK_INCLUDE_NONCOLLIDABLE method
Picks.PICK_INCLUDE_VISIBLE method
Picks.PICK_LOCAL_ENTITIES method
Picks.PICK_OVERLAYS method
Picks.PICK_PRECISE method
Picks.ParabolaPickProperties.scaleWithAvatar
PlatformInfo.getCPUBrand
PlatformInfo.getGraphicsCardType
PlatformInfo.getNumLogicalCores
PlatformInfo.getOperatingSystemType
PlatformInfo.getTotalSystemMemoryMB
ParabolaPointerProperties.scaleWithAvatar
RayPointerProperties.scaleWithAvatar
Script._requireResolve
Script.callEntityScriptMethod
Script.entityScriptContentAvailable
Script.executeOnScriptThread
Script.formatException
Script.generateUUID
Script.loadEntityScript
Script.resetModuleCache
Script.unloadAllEntityScripts
Script.unloadEntityScript
Script.clearDebugWindow
Script.entityScriptDetailsUpdated
Script.errorLoadingScript
Script.loadScript
Script.reloadScript
Script.scriptLoaded
Script.stop marshal parameter
ScriptDiscoveryService.getLocal
ScriptDiscoveryService.onClearDebugWindow
ScriptDiscoveryService.onErrorLoadingScript
ScriptDiscoveryService.onErrorMessage
ScriptDiscoveryService.onInfoMessage
ScriptDiscoveryService.onPrintedMessage
ScriptDiscoveryService.onScriptFinished
ScriptDiscoveryService.onWarningMessage
ScriptDiscoveryService.errorLoadingScript
ScriptDiscoveryService.LocalScript
ScriptDiscoveryService.PublicScript.type
ScriptDiscoveryService.PublicScript.children
SoundCache.updateTotalSize
Stats.audioAudioInboundPPS
Stats.bgColor
Stats.activeFocus
Stats.activeFocusOnTab
Stats.anchors
Stats.antialiasing
Stats.baselineOffset
Stats.children
Stats.clip
Stats.containmentMask
Stats.enabled
Stats.focus
Stats.height
Stats.implicitHeight
Stats.implicitWidth
Stats.layer
Stats.opacity
Stats.rotation
Stats.scale
Stats.smooth
Stats.state
Stats.transformOrigin
Stats.visible
Stats.width
Stats.x
Stats.y
Stats.z
Stats.childAt
Stats.contains
Stats.forceActiveFocus
Stats.grabToImage
Stats.mapFromGlobal
Stats.mapFromItem
Stats.mapToGlobal
Stats.mapToItem
Stats.nextItemInFocusChain
Stats.update
Stats.activeFocusChanged
Stats.activeFocusOnTabChanged
Stats.antialiasingChanged
Stats.baselineOffsetChanged
Stats.childrenChanged
Stats.childrenRectChanged
Stats.clipChanged
Stats.containmentMaskChanged
Stats.enabledChanged
Stats.focusChanged
Stats.heightChanged
Stats.implicitHeightChanged
Stats.implicitWidthChanged
Stats.opacityChanged
Stats.parentChanged
Stats.rotationChanged
Stats.scaleChanged
Stats.smoothChanged
Stats.stateChanged
Stats.transformOriginChanged
Stats.visibleChanged
Stats.visibleChildrenChanged
Stats.widthChanged
Stats.windowChanged
Stats.xChanged
Stats.yChanged
Stats.zChanged
Stats.audioAudioInboundPPSChanged
Stats.bgColorChanged
TextureCache.updateTotalSize
TextureCache.spectatorCameraFramebufferReset
Window.domainLoadingProgress
location.goToViewpointForPath
location.lookupShareableNameForDomainID
location.refreshPreviousLookup
GraphicsMesh.getMeshPointer
GraphicsMesh.getModelBasePointer
GraphicsMesh.getModelProviderPointer
InteractiveWindow.emitWebEvent
InteractiveWindow.qmlToScript
InteractiveWindow.scriptEventReceived
OverlayWebWindow.clearDebugWindow
OverlayWebWindow.emitWebEvent
OverlayWebWindow.getEventBridge
OverlayWebWindow.hasClosed
OverlayWebWindow.hasMoved
OverlayWebWindow.initQml
OverlayWebWindow.qmlToScript
OverlayWebWindow.sendToQML
OverlayWebWindow.fromQML
OverlayWebWindow.scriptEventReceived
ScriptAvatar.isReplicated
ScriptAvatar.attachmentData
ScriptAvatar.getAttachmentData
ScriptAvatar.getSimulationRate
ScriptsModel.downloadFinished
ScriptsModel.reloadDefaultFiles
ScriptsModel.reloadLocalFiles
ScriptsModel.updateScriptsLocation
TabletProxy.desktopWindowClosed
TabletProxy.emitWebEvent
TabletProxy.initialScreen
TabletProxy.loadHTMLSourceOnTopImpl
TabletProxy.loadQMLOnTopImpl
TabletProxy.loadQMLSourceImpl
TabletProxy.onTabletShown
TabletProxy.returnToPreviousAppImpl
TabletProxy.gotoWebScreen
ToolbarProxy.addButton
ToolbarProxy.removeButton
41 changes: 41 additions & 0 deletions check_js.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import os
import csv

def search_js_files(directory, keyword):
matches = []
for root, dirs, files in os.walk(directory):
for file in files:
if file.endswith(".js"):
with open(os.path.join(root, file), 'r', encoding='utf-8', errors='ignore') as js_file:
lines = js_file.readlines()
for line in lines:
if keyword in line:
matches.append((os.path.join(root, file), keyword))
return matches

def record_findings_in_csv(filename, findings):
with open(filename, 'w', newline='') as csvfile:
writer = csv.writer(csvfile)
writer.writerow(["JS File", "Matched Line from Source"])
for finding in findings:
writer.writerow([finding[0], finding[1]])

def main():
source_file = 'RemovedApis.txt'
search_directory = '../overte-content'
output_csv = 'overte-content-findings.csv'

findings = []

with open(source_file, 'r') as f:
lines = f.readlines()
for line in lines:
line = line.strip()
matches = search_js_files(search_directory, line)
findings.extend(matches)

record_findings_in_csv(output_csv, findings)
print(f"Results written to {output_csv}")

if __name__ == "__main__":
main()
Loading

0 comments on commit 9eb8ee9

Please sign in to comment.