generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Hash.

Previous Thread :: Next Thread 
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
18 Apr 2014 03:37 PM
I don't know if this belongs here, but SH are clueless.

Is it possible to run a script directly from it's hash (aka script:GetHash())?

I know that the animation editor spits out a hexadecimal that I can use instead of uploading an animation.

Could I somehow use loadstring() or something to use a script's hash? Thanks.
Report Abuse
RyanDolan123 is not online. RyanDolan123
Joined: 05 Mar 2009
Total Posts: 17919
18 Apr 2014 03:46 PM
no
Report Abuse
Seranok is not online. Seranok
Joined: 12 Dec 2009
Total Posts: 11083
18 Apr 2014 04:08 PM
Your question can be generalized to: Is it possible to get the original string from an MD5 hash?

No, it is not possible. But if you can call Script::GetHash, you might as well just read the Source property directly.
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
18 Apr 2014 04:39 PM
So then how do the animations work? If I were to set an AnimationId to

a78a43fafb55081c200c931c00d3b3cc

It results in a flying/jumping animation. Are these MD5 hashes, or are the hexes created by the animations something completely different?
Report Abuse
Seranok is not online. Seranok
Joined: 12 Dec 2009
Total Posts: 11083
18 Apr 2014 05:03 PM
I'm not sure, but I imagine it's because such animations are preloaded by the server so given a hash it can find the corresponding animation and play it.
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
18 Apr 2014 05:12 PM
I found a method called RegisterKeyframeSequence(). Trying to figure out how to use it, I can't find much about it online. Here's what I'm trying:

print (game:GetService('KeyframeSequenceProvider'):RegisterKeyframeSequence(function()
resetAnimation()
animationLength = 2
updateTimeLabels()
loopAnimation = true
animationPriority = "Movement"
local keyframe = nil
local part = nil
local pose = nil
keyframe = createKeyframe(0)
keyframe.Name = "Keyframe"
part = partListByName["Right Arm"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
part = partListByName["Right Leg"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
part = partListByName["Left Leg"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
part = partListByName["Head"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
part = partListByName["Torso"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
part = partListByName["Left Arm"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
keyframe = createKeyframe(1)
keyframe.Name = "Keyframe"
part = partListByName["Right Arm"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(-0.5, -0.20710676908493, 0, 0.70710676908493, 0.70710676908493, 0, -0.70710676908493, 0.70710676908493, 0, 0, 0, 1)
part = partListByName["Right Leg"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(-0.70710676908493, 0.29289323091507, 0, 0.70710676908493, 0.70710676908493, 0, -0.70710676908493, 0.70710676908493, 0, 0, 0, 1)
part = partListByName["Left Arm"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0.5, -0.20710682868958, 0, 0.70710676908493, -0.70710676908493, 0, 0.70710676908493, 0.70710676908493, 0, 0, 0, 0.99999994039536)
part = partListByName["Head"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, -0.14644661545753, -0.35355338454247, 1, 0, 0, 0, 0.70710676908493, 0.70710676908493, 0, -0.70710676908493, 0.70710676908493)
part = partListByName["Torso"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
part = partListByName["Left Leg"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0.70710676908493, 0.29289323091507, 0, 0.70710676908493, -0.70710676908493, 0, 0.70710676908493, 0.70710676908493, 0, 0, 0, 1)
keyframe = createKeyframe(2)
keyframe.Name = "Keyframe"
part = partListByName["Right Arm"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
part = partListByName["Right Leg"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
part = partListByName["Left Arm"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
part = partListByName["Head"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
part = partListByName["Torso"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 1.7484555314695e-007, 0, 1, 0, -1.7484555314695e-007, 0, 1)
part = partListByName["Left Leg"]
pose = initializePose(keyframe, part.Item)
pose.CFrame = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
partInclude["Left Leg"] = true
partInclude["Right Leg"] = true
partInclude["Left Arm"] = true
partInclude["Head"] = true
partInclude["Torso"] = true
partInclude["HumanoidRootPart"] = true
partInclude["Right Arm"] = true
cursorTime = 0
updatePartInclude()
updateCursorPosition()
nudgeView()
updateLoopButton()
updatePriorityLabel()
end))
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
18 Apr 2014 05:15 PM
By the way, I have two goals in this thread:

1) See how the animation hexadecimals work
2) To see if anyone can change the hex to something 'special' to create any undesired effects, along the lines of clearing the workspace. That way, a buyer of a certain animation would be 'infected'.
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
18 Apr 2014 05:16 PM
@Seranok You don't even have to upload the animation; it just gets spit out by the animation editor and it works without uploading.
Report Abuse
Seranok is not online. Seranok
Joined: 12 Dec 2009
Total Posts: 11083
18 Apr 2014 05:26 PM
For some reason, RegisterKeyframeSequence returns the same result for a given class. Run this code as many times as you want, and it will always return the same result:

print(Game:GetService("KeyframeSequenceProvider"):RegisterKeyframeSequence(Instance.new("Part")))
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
18 Apr 2014 05:26 PM
Anyone with Fiddler2 could use a hex instead of another url, right? Therefore, Fiddler2 users can make ANY animation occur (Without worrying about it becoming [Content Deleted])?
Report Abuse
Seranok is not online. Seranok
Joined: 12 Dec 2009
Total Posts: 11083
18 Apr 2014 05:27 PM
Let's not jump to that assumption. I still don't know enough about how animations work to really test it.
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
18 Apr 2014 05:30 PM
I don't think ANYONE knows enough to figure that out yet. I'm just throwing some thoughts out there..

Hey, you're right about the class objects. Interesting.
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
18 Apr 2014 05:32 PM
Actually, if you do it to part with different properties, it is a whole different story.
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
18 Apr 2014 05:34 PM
I almost thought we found a GetHash() for all classes, but

print(Game:GetService("KeyframeSequenceProvider"):RegisterKeyframeSequence(workspace.Script))

~=

print(workspace.Script:GetHash())
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
18 Apr 2014 05:37 PM
WOAH! I just tested a ff345a4ce51a43fca32eaa0c56d8482a, which I got from this:

Game:GetService("KeyframeSequenceProvider"):RegisterKeyframeSequence(workspace.Script))

And I put this script in a dummy NPC:

wait(5)
local x = Instance.new("Animation",script.Parent)
x.AnimationId = "ff345a4ce51a43fca32eaa0c56d8482a"
script.Parent.Humanoid:LoadAnimation(x):Play()

And it printed perfectly!

Therefore, if anyone could swap an animation url with a hex, then yes, they COULD easily exploit with scripts, etc!
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
18 Apr 2014 05:39 PM
Maybe... I think it's completely local from the looks of it right now.
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
18 Apr 2014 05:41 PM
Nvm false alarm, lol.
Report Abuse
Seranok is not online. Seranok
Joined: 12 Dec 2009
Total Posts: 11083
18 Apr 2014 05:44 PM
Just FYI, I believe GetHash returns a plain MD5 hash of the script's source (You can verify this yourself)
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
18 Apr 2014 05:46 PM
It probably does.
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
18 Apr 2014 05:47 PM
Maybe I should modify the animation editor to add a simple Hello World script inside of an animation, and export it to a file and see what happens?
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
18 Apr 2014 05:58 PM
Yes, GetScriptHash is a plain MD5 that you can calculate just fine. I assume that when you register the animation it gives back a hash simply for identification, and when you pass it back through AnimationID it pulls from the local database (hash table) for the corrosponding animation. There is no way to get the contents back from a hash, since you are truncating the contents when you convert to a hash (Google the Pigeonhole problem, for example)
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
18 Apr 2014 06:18 PM
@Render I was able to do this to get the pose objects directly from a hexadecimal:

local objects = {}
function getAll(m)
if #(m:GetChildren()) > 0 then
for _,v in pairs (m:GetChildren()) do
getAll(v)
end
else
table.insert(objects, m)
end
end
getAll(Game:GetService("KeyframeSequenceProvider"):GetKeyframeSequence('a78a43fafb55081c200c931c00d3b3cc'))
for i,v in pairs (objects) do
print (i .. " = " .. v:GetFullName() .. " (" .. v.ClassName .. ")")
end

Also, there is no information on the wiki about GetKeyframeSequence(). I had to figure it out myself. They should add that.
Report Abuse
RenderSettings is not online. RenderSettings
Joined: 16 Aug 2010
Total Posts: 2560
18 Apr 2014 07:07 PM
Running that same code locally throws "invalid request 5", so it's more then likely that it's requesting the corrosponding asset from the hash from the hash, and I'm not approved for your asset.
Report Abuse
DiamondBladee is not online. DiamondBladee
Joined: 24 Feb 2013
Total Posts: 3527
18 Apr 2014 07:37 PM
It did? It fine for me (obvious reasons), and I don't see why it shouldn't for you. The animation was never uploaded to the website at any point, so is it safe to assume it was written in a hash table somewhere?
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
18 Apr 2014 09:07 PM
Would be fun to get original script from hash. It would be like when those CSI folks enhance an image so you can see each individual particle. ;)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image