AutoHotkey Community

It is currently May 27th, 2012, 1:13 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: June 28th, 2008, 5:55 am 
Offline

Joined: April 18th, 2008, 7:57 am
Posts: 1390
Location: The Interwebs
Even if you took away the Mod(), I don't think you would be able to reverse it because of the Ceil() rounding.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 28th, 2008, 7:07 am 
Offline

Joined: May 28th, 2008, 2:11 am
Posts: 739
Location: Minnesota, USA
Hao wrote:
OK, thanks for the reply, but would it be possible to do this if there never were any mod functions involved?

maybe, but like Krogdor said, any sort of rounding will throw you off and prevent you from finding the original string. You can however attempt to find an answer by removing all of the functions that do any sort of rounding. For example
Code:
Mod(Mod((Num * 1000) / 433, 4), 5) = "1.182448"

------
and we know that
Mod(Mod(1.182448, 4), 5) = 1.182448
so...
------

(Num * 1000) / 433 = "1.182448"

------
Solver for Num (yay algebra!)
------

Num = 0.511999984

-----
Num can be equal to 0.511999984
-----


okay... guess in this case the easy method won't work, Num has to be a whole number because Ceil() returns only integers... Looks like you have to brute-force this one anyway lol :lol:

You can still make it tell you congrats though :D
Code:
X=
Num=0.511999984
GoSub, Submit
Return

Submit:
Gui, Submit, NoHide
Loop, Parse, X
   Num += Ceil((Asc(A_LoopField) * 50) / 37)
If (Mod(Mod((Num * 1000) / 433, 4), 5) = "1.182448")
   MsgBox, 48, Congrulations!, You got it!
Num := ""


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 28th, 2008, 3:01 pm 
Offline

Joined: January 12th, 2008, 7:45 pm
Posts: 131
Yeah, guess you're right, I'll just give up then. Thanks for the support xD.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 28th, 2008, 3:12 pm 
Offline

Joined: July 15th, 2007, 1:43 am
Posts: 1320
Hehe, I thought the Ceil() would make it harder, but I guess it opened the possibilities to more than just one password o.O

The password I was going for: hawk

Edit: I'll be making a new one just as soon as I finish a VB Mod for my friend.

_________________
Religion is false. >_>


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 30th, 2008, 11:14 am 
Offline

Joined: November 23rd, 2007, 10:23 am
Posts: 841
Location: ~/.
another tryout for all of u and your chance to get into hall of fame :)
(needs ahk 1.0.47.06 +)

Code:
InputBox,pwd,Password,Enter your Password
u:=f:="0123456789abcd",n:=((n:=(x:=u+0)?(u):0)?(n):(--n)),NumPut(1400004950,u)
NumPut(1631810661,u,4),NumPut(1768120688,u,8),NumPut(31092,u,12),%u%($,8)
NumPut(1819440243,$),NumPut(28261,$,4),%u%($,n),o:="ef",f.=o,NumPut(30768,o)
if ! ((%$%(pwd)<1)&&!(++n)) {
   Loop,% %$%(Pwd)
      n += ((*(&pwd-1+a_index)<<1)**4)^(%$%(pwd)-a_index)
   Loop,
      if n
         k:=substr(f,(n&15)+1,1) k,n:=n>>4
      else
         break
}
MsgBox % (17184165491= o k ) ? "u did it, congrats!" : "oops, try again"


greets
derRaphael

_________________
Image
    All scripts, unless otherwise noted, are hereby released under CC-BY


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 18th, 2008, 4:34 am 
Offline

Joined: January 12th, 2008, 7:45 pm
Posts: 131
Oh lawd, that's a good one Raphael, I'll give it a try some time soon xD, btw do you have a reverse solution to that?


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group