AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Scripting Challenges
Goto page Previous  1, 2
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat
View previous topic :: View next topic  
Author Message
Krogdor



Joined: 18 Apr 2008
Posts: 908
Location: The Interwebs

PostPosted: Sat Jun 28, 2008 5:55 am    Post subject: Reply with quote

Even if you took away the Mod(), I don't think you would be able to reverse it because of the Ceil() rounding.
Back to top
View user's profile Send private message AIM Address
Slanter



Joined: 28 May 2008
Posts: 264
Location: Minnesota, USA

PostPosted: Sat Jun 28, 2008 7:07 am    Post subject: Reply with quote

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 Laughing

You can still make it tell you congrats though Very Happy
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 := ""
Back to top
View user's profile Send private message Visit poster's website
300W



Joined: 12 Jan 2008
Posts: 27

PostPosted: Sat Jun 28, 2008 3:01 pm    Post subject: Reply with quote

Yeah, guess you're right, I'll just give up then. Thanks for the support xD.
Back to top
View user's profile Send private message
Ian



Joined: 15 Jul 2007
Posts: 1157
Location: Enterprise, Alabama

PostPosted: Sat Jun 28, 2008 3:12 pm    Post subject: Reply with quote

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.
_________________
ScriptPad/~dieom/dieom/izwian2k7/Trikster/God

Back to top
View user's profile Send private message
DerRaphael



Joined: 23 Nov 2007
Posts: 456
Location: Heidelberg, Germany

PostPosted: Mon Jun 30, 2008 11:14 am    Post subject: Reply with quote

another tryout for all of u and your chance to get into hall of fame Smile
(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
_________________
Back to top
View user's profile Send private message
300W



Joined: 12 Jan 2008
Posts: 27

PostPosted: Fri Jul 18, 2008 4:34 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> General Chat All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group