Zodiac Discussion Forum

Notifications
Clear all

AZdecrypt 1.22

297 Posts
23 Users
17 Reactions
108.2 K Views
Jarlve
(@jarlve)
Posts: 2547
Famed Member
Topic starter
 

Hey Largo,

That sucks. Thanks for looking into it!

I can’t imagine the problem being "destroywindow" since that is a Windows function so it must be "window_event_close", (found in wingui.bi):

Function Window_Event_Close(ByVal hWnd As HWND, ByRef msg As MSG) As Long
	'Returns 1 when the close button (X) of the window has been clicked. Parameters:
	'- hWnd = handle of the window
	'- msg = Message (see Sub WaitEvent)
	
	If msg.hwnd = hWnd And msg.message = 161 Then
		If msg.wParam = 20 Then Return 1 Else Return 0
	End If
	
End Function

161 WineHQ: WM_NCLBUTTONDOWN https://wiki.winehq.org/List_Of_Windows_Messages

Could this be because you have a one-button mouse on Mac?

AZdecrypt

 
Posted : June 5, 2020 8:36 pm
(@largo)
Posts: 454
Honorable Member
 

I can’t imagine the problem being "destroywindow" since that is a Windows function so it must be "window_event_close", (found in wingui.bi)

Right, that’s what I meant by "the messages are not passed through correctly." I did a little test and rewrote the function "Window_Event_Close" in wingui.bi:

Function Window_Event_Close(ByVal hWnd As HWND, ByRef msg As MSG) As Long
	'Returns 1 when the close button (X) of the window has been clicked. Parameters:
	'- hWnd = handle of the window
	'- msg = Message (see Sub WaitEvent)
	
	If msg.hwnd = hWnd And msg.message = 161 then
		MessageBox(0, "161", "161", MB_YESNO)
		If msg.wParam = 20 then
			MessageBox(0, "20", "20", MB_YESNO)
			Return 1 
		else 
			Return 0
		End If
	End If
	
End Function

This way I can test whether the messages work correctly without the development environment and without breakpoints. It works under Windows. If you click on the "x", both messages (161 and 20) are received. But if I execute the program in Wine, Window_Event_Close is not called at all.

To check if this is a problem in AZDecrypt, I have compiled and tested a minimum working example:

https://www.freebasic.net/forum/viewtop … =8&t=24617

The problem also occurs in this example. So it is not a bug in AZDecrypt. I will contact the author of the WinAPI library. I assume that the problem is in the library.

Could this be because you have a one-button mouse on Mac?

That cannot be the reason. It also occurs on a PC with Linux. Other Windows programs do not have this problem under Wine. Therefore I am quite sure that there is a bug in the WindowsGui-Library of FreeBasic.

Translated with http://www.DeepL.com/Translator (free version)

 
Posted : June 6, 2020 2:27 pm
Jarlve
(@jarlve)
Posts: 2547
Famed Member
Topic starter
 

Thanks Largo.

Could you try the following code?

Function Window_Event_Close(ByVal hWnd As HWND, ByRef msg As MSG) As Long
   'Returns 1 when the close button (X) of the window has been clicked. Parameters:
   '- hWnd = handle of the window
   '- msg = Message (see Sub WaitEvent)
   
   If msg.hwnd = hWnd then
   	if msg.message = 161 or msg.message = 162 or msg.message = 513 or msg.message = 514 then
      	If msg.wParam = 20 Then Return 1 Else Return 0
   	end if
   End If
   
End function

AZdecrypt

 
Posted : June 6, 2020 4:36 pm
(@largo)
Posts: 454
Honorable Member
 

Unfortunately, that didn’t work, but you were on the right track. Checking WM_NCRBUTTONUP, WM_LBUTTONDOWN and WM_LBUTTONUP was a good idea. For further testing I displayed message IDs when clicking Close and found out the following:

When the close button is clicked when using Wine, the messages shown above are not sent, but WM_SYSCOMMAND (ID = 274). In this case msg.wParam = SC_CLOSE. See: https://docs.microsoft.com/en-us/window … syscommand

The following code solves the problem. But I haven’t tested it extensively yet and want to check if there are any side effects on Windows:

Function Window_Event_Close(ByVal hWnd As HWND, ByRef msg As MSG) As Long
	'Returns 1 when the close button (X) of the window has been clicked. Parameters:
	'- hWnd = handle of the window
	'- msg = Message (see Sub WaitEvent)
	
	'Windows
	If msg.hwnd = hWnd And msg.message = 161 Then
		If msg.wParam = 20 Then Return 1 Else Return 0
	End if
	
	'Fix for WineHQ
	If msg.hwnd = hWnd And msg.message = 274 Then
		If msg.wParam = 61536 Then Return 1 Else Return 0
	End if
	
End Function

When I have tested this in detail, I can give this information to the author of the WindowsGui-Library for FreeBasic. Or maybe you are already in contact with him? If I am not mistaken, it is him:
https://www.freebasic-portal.de/downloa … er/27.html

Thanks for the help, Jarlve! I am glad that I can now use AZDecrypt with Linux and macOS!

Translated with http://www.DeepL.com/Translator (free version)

 
Posted : June 6, 2020 6:06 pm
Jarlve
(@jarlve)
Posts: 2547
Famed Member
Topic starter
 

I’ve added your code to the current build and so far have not seen any side effects. Thanks allot Largo for getting a fix on this!

https://www.freebasic.net/forum/viewtop … 55#p272955

AZdecrypt

 
Posted : June 7, 2020 9:30 am
Jarlve
(@jarlve)
Posts: 2547
Famed Member
Topic starter
 

New record, stable 4 line Z408 solve, using AZdecrypt’s 1.18 (in development) "Substitution + sequential homophones" solver and unbiased Reddit letter 8-grams:

Score: 28037.47 IOC: 0.0610 Multiplicity: 0.6617 Minutes: 1.70
Repeats: KILLING ITIS TI ND IL LI
PT-to-CT cycles: 257

ILIKEKILLINGPEOPL
EBECAUSEITISSOMUC
HBUTITISMOREFUNDA
NDKILLINGWILDGAME

AZdecrypt

 
Posted : June 13, 2020 4:45 pm
doranchak
(@doranchak)
Posts: 2614
Member Admin
 

Wow! Incredible work, Jarlve. Can’t wait to play with these new features.
What does it mean that the 8-grams are unbiased?

And I’m curious how many different 4-line sections of Z408 can be solved.

http://zodiackillerciphers.com

 
Posted : June 13, 2020 5:01 pm
Jarlve
(@jarlve)
Posts: 2547
Famed Member
Topic starter
 

With unbiased I mean that these n-grams have not been amended with Zodiac frequencies.

I tried the 2nd and 3rd 4-line sections but it failed.

The even start of the cycles is probably a premium as well as the lower multiplicity of the 1st 4-line section due to the repeats on the first line. Still good though.

8-)

AZdecrypt

 
Posted : June 14, 2020 3:52 pm
doranchak
(@doranchak)
Posts: 2614
Member Admin
 

I tried the 2nd and 3rd 4-line sections but it failed.
The even start of the cycles is probably a premium as well as the lower multiplicity of the 1st 4-line section due to the repeats on the first line. Still good though.
8-)

I wanted to find another section that has similar length, multiplicity, and cycles, so I tested every possible substring of Z408 and calculated those measurements.
Then I calculated the distance between those measurements and those for the first 4 lines.

The results are here:
https://pastebin.com/raw/9hJ1Um5q

Sample line:

 0.007407740522402083 0.6666666865348816 760.5023765118437 66 254 320 P^=SrlfUe67DzG%%IMNk)ScE/9%%ZfAP#BVpeXqWq_F#8c+@9A9B%OT5RUc+_dYq_^
0

0.007407740522402083: Overall distance of measurements to those for the 1st 4 lines.
0.6666666865348816: Multiplicity
760.5023765118437: Your homophone cycle score (for which the entire Z408 scores 2855.7341905151557)
66: Length of the substring
254: Start position of the substring (indices start at 0)
320: End position of the substring (indices start at 0)
P^=SrlfUe67DzG%%IMNk)ScE/9%%ZfAP#BVpeXqWq_F#8c+@9A9B%OT5RUc+_dYq_^: Substring of Z408

The results are sorted by distance, so maybe you can find another small section of Z408 that is also breakable by your new features!

http://zodiackillerciphers.com

 
Posted : June 15, 2020 3:04 pm
Jarlve
(@jarlve)
Posts: 2547
Famed Member
Topic starter
 

Thanks doranchak. Something for later perhaps.

It would be interesting to apply the same idea to the Z340 with a more reasonable multiplicity. Say, every sub string between multiplicity 0.25 and 0.35. And also do the same for the Z408 to get an expectancy for the solve rate.

AZdecrypt

 
Posted : June 15, 2020 11:33 pm
doranchak
(@doranchak)
Posts: 2614
Member Admin
 

In case it’s useful, here’s a file with every Z340 substring of minimum length 17, sorted by multiplicity:

http://zodiackillerciphers.com/z340-all … mscore.txt

The fields are: multiplicity, homScore, length, start position, end position, substring

http://zodiackillerciphers.com

 
Posted : June 16, 2020 1:53 pm
doranchak
(@doranchak)
Posts: 2614
Member Admin
 

Based on those results, the shortest substrings of Z340 with a multiplicity < 0.35 have length 158:

0.34810125827789307 1172.2768185835293 158 139 297 +b+ZR2FBcyA64K-zlUV+^J+Op7<FBy-U+R/5tE|DYBpbTMKO2<clRJ|*5T4M.+&BFz69Sy#+N|5FBc(;8RlGFN^f524b.cV4t++yBX1*:49CE>VUZ5-+|c.3zBK(Op^.fMqG2RcT+L16C<+FlWB|)L++)WCzWc
0.34810125827789307 1185.48133666938 158 138 296 M+b+ZR2FBcyA64K-zlUV+^J+Op7<FBy-U+R/5tE|DYBpbTMKO2<clRJ|*5T4M.+&BFz69Sy#+N|5FBc(;8RlGFN^f524b.cV4t++yBX1*:49CE>VUZ5-+|c.3zBK(Op^.fMqG2RcT+L16C<+FlWB|)L++)WCzW
0.34810125827789307 1194.6648156451845 158 137 295 <M+b+ZR2FBcyA64K-zlUV+^J+Op7<FBy-U+R/5tE|DYBpbTMKO2<clRJ|*5T4M.+&BFz69Sy#+N|5FBc(;8RlGFN^f524b.cV4t++yBX1*:49CE>VUZ5-+|c.3zBK(Op^.fMqG2RcT+L16C<+FlWB|)L++)WCz

Here are all the ones that fall in that range: http://zodiackillerciphers.com/z340-all … 5-0.35.txt

http://zodiackillerciphers.com

 
Posted : June 16, 2020 1:59 pm
(@mr-lowe)
Posts: 1197
Noble Member
 

doranchak
have you ever tried to splice the z32 into the end of the 408 in place of the "filler"

 
Posted : June 16, 2020 2:04 pm
doranchak
(@doranchak)
Posts: 2614
Member Admin
 

doranchac have you ever tried to splice the z32 into the end of the 408 in place of the "filler"

I haven’t. I wonder if anything interesting would turn up.

http://zodiackillerciphers.com

 
Posted : June 16, 2020 2:13 pm
(@mr-lowe)
Posts: 1197
Noble Member
 

YCOLLECTINGOFSLAVES

HI FUL NIX WH DAWN G
O AOESNBAL THET DIE I

OK just did it ….nothing apart from DIE…not sure if i did it right.

 
Posted : June 16, 2020 2:40 pm
Page 16 / 20
Share: