Jump to content

HexDecode() from py to autoit


Kyan
 Share

Recommended Posts

Hi here :D

Can some one who know how to work with UINT8 whats the difference between the convertion/decode from this function: https://github.com/sloonz/pil-py3k/blob/master/libImaging/HexDecode.c

to this: BinaryToString("0xFFF",4) ?

Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

Link to comment
Share on other sites

Bump

No one knows how do I get the same output from both functions?

Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

Link to comment
Share on other sites

What do you want to achieve with the hex data? Put it back as an image data and use it in your GUI?

I don't know Python...

Br,

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Can you give to us an hex coded image?

Hi!

Edit:

Something like this?

$Hex = BinaryString()

FileWrite(@ScriptDir & "\My Image.jpg", _HexToString($Hex))

Func BinaryString()
Local _
$BinaryString = '0xFFD8FFE000104A46494600010100000100010000FFFE003B43524541544F523A2067642D6A7065672076312E3020287573696E6720494A47204A50454720763632292C207175616C697479203D2039300AFFDB0043000302020302020303030304030304050805050404050A070706080C0A0C0C0B0A0B0B0D0E12100D0E110E0B0B1016101113141515150C0F171816141812141514FFDB00430103040405040509050509140D0B0D1414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414FFC000110800B400B403012200021101031101FFC4001F0000010501010101010100000000000000000102030405060708090A0BFFC400B5100002010303020403050504040000017D01020300041105122131410613516107227114328191A1082342B1C11552D1F02433627282090A161718191A25262728292A3435363738393A434445464748494A535455565758595A636465666768696A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F0100030101010101010101010000000000000102030405060708090A0BFFC400B51100020102040403040705040400010277000102'
$BinaryString &= '031104052131061241510761711322328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728292A35363738393A434445464748494A535455565758595A636465666768696A737475767778797A82838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9FAFFDA000C03010002110311003F00FD4EDA0127BF4CD19E86A2BAB88ED6232484841D78CD670D6D27B179616F2981381229E9F4A00D6E71C565DC41AA89A4304F0ED272BE629E05735AA7C4636A0AC56EE19792CC9C1FA573971E2DF13EB5183656CC19F382AB8DBE99A00F508259A1555BB788B91CB2F03359FA9789E3D3E6822488DCBB9C1F28E42FD6BC826F04F8DF53962B9B8BB9894396855B1907AD771A0F85359B4B73F3476F9C00A46E63EEC68036BFE1339269024366DD4AB127A11ED5A36777A8DD23EE8A30BD15B38AE1E5F863AB45AACDA95B6AF279CF922194E5013E9577FE121D77C3922C7771FDAE21C12A3A1F5A00DDBAB4D696E14C12A2AE7EE1E869469DADF9C656BB5C6384038AE447C4C7B8BAB8B49C4F14ABD244846173E9EB5D2687AF7DB210A2F9C903F89067EB400E99FC45681D228639830E1D8F4359BABA78C35189238634B70386657C576114CF6B07EF257B9EFBF68181F8561E'
$BinaryString &= 'BBE2C92DE322DE3719E0305C9FAD0078F7883E0CF893C421CBDDC904992564673C9ABBE11F845E29D223557D4DE5E3397738523A574E3C617515C46D2DECACB8C189A31C9FAF6A827F1578AF51D4A23A7AB0B74E0E5461B3D2803AFF000FD9EB7A6CF1437252640A016C9E4F735D3DD5F456685A660A077AF3EB7D63C6905DBBCD6A925B646C18E4FAFD2BAA9E39757B3315EC25646C0DA9D81A00E5BC65F15A3D1AD48B0DB35C13850BCE6BE4DF8F5F15FE2BEB16860F0BE94F6CEE0FFA70EA0027A57D6EDE02D3ACEF0F9D1923FE59A819FCEAD597C3FB437124F36E40C02A21036FD6803F209FC29F1EDF5C4D46F67D5374C30EAAEE015F4E2BD0B4DB1F8C77D70112FEF6DEDA33B445B0FA74191D09EE7D6BF50F5BF0369576C8ED29B46E3714C00C3F2AE0FE2558DE780EC63D5F43D26E3C4D708F1C5F638DD559959802DD3B039A00F8487C1BF893E2DD4F7EA535C44DB31BC93C1FA67A0F5A8A4FD91FC5D77142A2FA3371131258BB720F6C62BF4CB43D32DF57D3216BBB1FB2CAE9F32771ED9AB8FE16D22C416F2504A17018E7205007E60C1FB1DF89110E6E5371396DADC67F2A2BF4B60D1F49850AB14539CE0D1401B51789A0B8202DADC90C320B4440ABD2DD2445034121DDC0DA9903EB5E3F27ED7BF0D20D85F5862B21F90C70B3E7F21C56F787FF00690F879E23859ADBC476B1B0241499B6118FAD007A2B5A'
$BinaryString &= '5B5CFDF811B1FDE5153470244B844551E8062BC735EFDAA7C0FA6CB35BD9EA70EA172A995589C10C7D05797789BF6EF8341805C47A034F08E5B326180FA5007D6F4D77118C91915F18782FFE0A0171E3CD5CD859784EF62666088EA85979F7C57D0DE16F19F887C43A42DCDDE9CD65BFEEABAE0E3DE803D21A60AA09CF3E9514A219212EE80AF53B8570DAF78967D2AD95AEB538AD140C9181D2B846F8A1A56A9A8BDAA78AE1F317E658CCAA38C7D68037BE22FC61F09781D647BD96D639C293B64E0B01ED5E7B61FB5D780351B88D2DE0BB2AC07EF638494CE71D6BB9B4F87DE00F1B5F47A96A515A6A5780650CCE1B3F41D2B6A2F839E10B6937C1696B6E31C222281D7D28034B4BF89DA75FC636811C5B03EE73B460FD6B55FC59A618D5AE504511385770304FB1AE3B59F086856D1BC519F365720F963A6076A92FEEF4DD42286C2EE0730C18951F04221031826803A08B5CD0D9259523B79B664EE5C1FA5635EFC4DD23C3B6D133C3CEDDC4C6A4D66C3A9E87A3801CC6237395048E79E6BA0D27C51E18BD8191BEC817EEB70A7340177C39E3C8FC5D6AF36988650071B862B13C6DE33F1378434AB8D41B4937DE5FDD8AD9371619F6AEA2CAE74EB681DB4936A8ACBB86C2307F01532DEEA6F1AB7931DC230E41E2803E32D7BF6FB7D1F57962BFD12F2CE4198D2192021BEA7DBDEBB8F0A7EDEDE1AF10E9B9B9D36F6DA7'
$BinaryString &= '8C65CA445862BDF353F0268FE20B859F51F0E69EF320E64789493ED9C55397E17F85A1595A0F0D59C4CC30C638D411FA50078D6A9FB62780EEAC562BF92F34F99BA19616073DB3E95E79E21FDB7B47D1F4895B43B8BDBE9D58ED8CDB139F6E9F4AFA1AE3E07785E6266B8D12299A400B30504835B9A0FC1DF0858DA058F41B50FB8B65E25273EBD2803E42F0CFEDC3E36F1449F67B0F0C5CC93603090C0C9819E460D75769F1AFE28789753FDF787E3B5B723E59657DB8F7AFA1754F85566677FEC9B4B7B469012EFB47CC7D85788F8F7F67BF1F6A9A949F62F13269964C398E11966E38EBD2803461D5FC472C61F51B964BA3CB04618FC28AF2FB8FD9CFC7424DB71F116F04AA029022CE3F1CD1401F635A7C0BF01D932B5BF86AC22006004886054373F003C0573F7BC3968A4B6E255719FCABBE8228ED6258D4E1470327352E41A00F1DD5FF00663F87CEE278B408A3947568D49C8AC69FE08F8374C2A87C351CF1FCC4F991640031FE15EF64535954839008F71401E0AF7FE1DF865A6CB3E97E1358E104CAA2280021B1D7A578878DBF6D5F1009A6163E1F960B61F2EC7F91881DC6457DBD71A7D8DE26D9A08651E8CA0D723ABFC2BF066A1307BCD2ED9D812705062803E158BE33BFC4CDF16A905CA9E1592273C023241E9C5777A2FC21D0BC58F05CD85B3C72051F3608E457D176DF05FE1D58DF3CCB6B6F1BBF54550A'
$BinaryString &= '0F6EC2BA8B24F05F862D83426D2DA20BD3D00A00F28F06FC0CD434FB5FDCDD3293CFDE385FA57553FC35F139B5856DAF523789812646E5B15D527C66F034520817C49A72393809E7A83F95692FC49F0BBB068B5BB29198676ACEA781D4F5A00E56E7C11AF5CDDC65EEE28D1554330E0E4569FF00C2BA37F1B09AEDB6B0C1C0EA7BD6C49E3EF0E18C48759B3F2D8FDE130E7F1ACC9FE30785610506B5643B02B329CD00723AF7C12D16FEE60826BB9D523520007AFAD43A17C13D06C14C71EA44C8410E03633E9DEB7E6F1E6897537996B324D1BE4170727DF153C5AE585DE9F2CF6F6BF6A540466338618A009748F08D8E80915BC2CD3BA8C0707A8F4ADB8A3D56172D0A868CFDC463C0AF08F197ED363C313C96765A0CF2DE020468E0E5F9C71C553B2F8F9E37D58F1A5DAE991797D2690EEC9E9C62803DEEEE5F155CB010456D00E992C483505C5C6B16D0A9BED42D6DCA0E58719F5EB5E7363E21F8B3AEE9E92D88D1A21B76E1CB13F5AF2DF89BFB36FC52F8AB65241AB78F65D3629BE46B4B14202F3DCE73FAD007D0F79F11349D3202B73E21B085D46E6532A923DFAD729A8FC6D8A52BFD8DAADAEA67925E1391C57CC5A37FC12CEC098C6A9E3DD6269C12ECE1D8EEE738EBC0AFAC7E177C14F0E7C34D16D7488AD96EDA1E16790658FD6803CB7C63FB41F89FC37A04FA9DB696D7E633811431962C7F2AF31F057ED13F'
$BinaryString &= '173E21EA124F2782AEB4DB0562C92CE87732FA8C8AFB1F58D234DB5482131410A190701064FA9C536EB42B486D4986711E53281145033C4EC24F12DF41F68B87BA49243B8A98BA515EB5A7E937B25BEE5BF3C93C0038A2811D36A7A541624CF35F4EADFC383DCD4B6F7F05988CA4F2488472EDC8AC8975ABABA944779673C7171F3795906A7BEB4D3F5B83C886E9E174E0AA645003B56F88F67A4B857825738C90AB508F88AF731A3DBE9171711B8C923B735CBEB1E088EEE79275D4661F2ED0AD9EDDEAE7877518F438D2DE794B84FE2009E7D6802FEA1AD5E6AEAF0C1A0DE46F91B65DD8193FE158F1786FC64352E191ADD8F495F903EB5D41F89BA2C0A2333379A0E0AEC20FD68BAF1DE993467373344BB41E17A50055D47C2FA6D8D94B75AA5D2DB109891F78016BCE6FAFBE185DABDACFAF59601218B5D0C81E9D6B4BC456BE09D6D6E2DB55B8BEBC493E6917CC7DA335CDE99F013E0BC3E5DC47A32CCE18B1694B9249F5CD00605F7ECA5F063C54F0EA28F0CD26D382971C303D7A1ED5E7DE3CFD903C371F9977E1DB9CEC51B63170D81EA057D3DA6F843C13A48FF43D2E18628C0518E1547B0ADD9BC41E0ED3A11166CC9001D800A00FCB7D63E19F8B86A92689A1F87759BF19C1733911AFD32401F9D779F0EFF65BF1A2FD906A7A64BA5CE0EF0669431521BA119E6BEFB9FE23784232E92DD5B41229F953014D65EB'
$BinaryString &= '1AAE8BE2B84BDBEBB1C2982DBA370AC38C73ED401E6DE13F831AD68F6EEA9ADA64A8DD1BA8C13EA2BB1D1746D77C350F970A5ADE891CE49936838F6FC6BE46F8D7F1AFC27E1BF1DDB785CFC52FF4BB9976CAB04AC52DCE060338E075F5AF56F00FC04F1C5CDBC37F61E3E96F6D6E0878F126F4284678F5C8A00F69D45EEAE044CDA269EB3C6DBBCC2C0F39CF158DACCA6E6E5447A3D8237DE79D88273ED5ABA5FC0FD42DECB136B124B72DF7999FF3C0AD8F0DFC23B2D0EF2496E35069A42C4EC99811D3B500717A5F8875EF0FCA556F2289589D9114273F97B5749A2FC40D46EA5733B34E579C2A100FE75E956DA268C5E3262B692551C1E093EB44D65A5C63F76D12156390B8C9A00E734EF8896CF0B2496D20948CA9DBD4F719AE7F52F889756F78FBACE58A3DBBE3006E2715DE4DF61B18FCD686178C0249001635951DE695792896658E06033B5C678A00F2EBBF1D7DB7C416535F4D3451CB22C0A8AB8504F5CD751AAE912CC667B5BF76675C01BC80B5B9ABDD785CC312C91DB798F2878CAA8C820D5A9A38AE2D5E5B66B64403EF3919CF618A00E362F0C7888C6BE5EA12A2638DA383EF457576BAE5FF0090A1DA1C818CA1E0D1400BE20F8ADF6084FD92D5269090023BF35C8CFF001DEEF4EB5B89EEB4BB68CA1EAB91915F3E68BF1AB40D6F55789A4B94954E198A1C7D47BD7A8D84BA7789A1530A3CC8C98DCDDCFD'
$BinaryString &= '2801C3F6B37B9B86B536905BC8C4EC7653903B679AE63C4DF1DBC53ABDBDC0B35B4B467CAC7D8BFB8AD9B8F867A75ECAEC9A516BA6231B1791F4AD5D2BE01CB232086DDF2814AACC3A7FF5E803E68D7353F895E27127D9AF12099C007CB383BB38CE7BD71308F8E105F4B17F6D4C04206CF39FE4619E777AD7DDC9F05751DCC23B68502A8080E39A4BEF837A9A44638ADE39085E595B1B8D007CA3E1BF1DFC5CD32D6692FC59DD190AA64A80ABCE07BE3A57792F8A7E21EB364D6C971A7C3708ABB768EF9E73F857AEDD7ECF5AAEAD0C892BC303100ED4EC6A4D1BF679D5349DEC258D57EF1E7966FF000A00F9E352F87DF17756BF0C9E27B78EDE53F3AC79C0CE7A572169F02BE2C0BBB817FACF9A320825999540EE3DEBEB75F086B5A3C8E242B2A020FEE931CD6AD9EAFAA0430CF626384F0A4A7045007C7F37C20D62D6C2E351D73594B7B7B4532DC4EF90A880124D7C2BF19FF68DD5353F12EA1A6F87B56BB834388F9692C1298DA7E39DC47383935F73FF00C1507E23B781FE0CE9DE1FB16305E7886E764AA067302825867EB8AFCE1FD9C3E15BFC6AF8DBE10F072E160D4AFE34B97271B200774873FEE83F9D03B9D3FC32FD943E21FC6AD1DB5ED174A31D839204D72E54CA7D573C9EFCD7DDBFB1FF00C39FDA2BE115BB685A94A4E851F30452482431E3B29F4F6AFBB7C3FF000A34DF0AD9C163A68FB3D9DBA2C50A'
$BinaryString &= '228015178000FA5763A5E86B1B872EF228E15480314EE23E65D73C4DF1BE59163B2B6B65906E55639CE3D4F35E69A9F8CBF6858F52961BDD2E09622DB4BAE738EA71CE057DFAF671C0A5C47BE4EA368E6B9F7BCB957D8FA41688939EF9CF7A407C4F6DE24F88D0DAACF7B67768D2128123FBD8CF18C74AE9B4C5F1D5EDB9338BDB6DEA0945192B91D49AFAD25B7678B16DA42A18FE6DACA393ED5C5788BC47ACC12C6ABA72C10349B773F03DA803C023F0C78B85B4B1B5FDFB387CB3393B4FA62B0EEBC25E34FB5079B5ABA11A8FBC84A9207AD7D097DA678875498CA9A92DB5B9FF0096781C7A76CD516D17E22D9472CB6D2695A874F9A68F6E474C63E9401F266BBE1AF10B5C477CDADDE878DB7226F638ED9AEDBC3DA378AEFACDDEDF54BE0B2005773E46FF00539E715EABE2CF8893F87AD603A9786EDD6F3704F32DD036DE7B56EE81F13FC1D711A45A86FB695F2CC3C9DBCFE1401E3D6F6BF10ED95A2935968D9188C22F1457BB5EFC4DF00C32A833799950436C3D3F2A28036ED3F668F0ED9C90CA88A258C104841CE6BB0D03E1AD8E871A2AE0AA1C8C2E39EF5B36BABDC88565BB87C9F90168C7241A7C9E20E144567712B1E785A00BD6F616F6AC4C71221273902A632C61F6EE5DDE99AC3BDD6A78BE57096F8EE5C66AA2788746B69C3DD5EC2B239C2B33F1D3B50074CD32AB8524648CF3E9514E2547DE1BF74179'
$BinaryString &= '1EF5831F88EC2F752B55B6911A37DC59B7761EB5AF7B72EF6ECB6CCACE4607719A00B0A5DD15810A0F35180DB1C99C152727D85524D4A292D5A1B825642D82071C5566B4B49EE51D2EC855C8D9BE8034FECF12A8F2D0306EE4D1770C51418F2D1D4718C726AB2C96F3A4B6CB7251DD480CA794C8EA2B3D2EAC341B15B696FA5BA78936F9D3BE5DBAF5A00FC65FF82B6FC476F14FED0F6DE1C8C04B5D02C513605C62493E66FAF18A8FFE0931E16875CF8FFAAEA122EE934FD2CF964FF0977009FAE148FC6BE77FDAABC5B2F8DFF686F1DEAF2BB39975396352DD950ED1FA2D7D3FFF000486D56C749F8C1E2E92F5DC2B6951AA2A7527CCEBF87F5A00FD8686DD6C19183BB6E1C07E6B4E3D4E31E5B6D011B81CF7AE4AE7C69A5D9289CAB3E17EF67F4AE49BE2469DA94D35BDBC1246CB264991B00FD2803D81F518222CD24CA9B7B13C0A81750B7B96C1B9500838D8DD6B8AD35ACF51B3335E4459490BB77F53F9D69BE89A5A156B693CA7EA02B648F5A00E92291925501BF77D8F5FD6A0D474EB4D4227171186553B811CD63CDA6DEBDA95B5D436962762919238AA52693E24B5B2666BB46940C0057823DE802D85D351268CEE89A3F5073F5ACCBBF1258401C5B4E5D54025641DFDA882EEE23545D44C0673C172D8C8FA54F7FA4E83B08DD0191978627001A00E2F56F1168DACCC3EDB6624585D4EE080E7DAB5E2D17C1FAE'
$BinaryString &= '428DF65B759A3E9B9402BF855AB3D0F4689FCB69ED1D80DE0A3724F6ABD0F84F4D96297744BE71C90C09CAE6801A9E01F0C4C8A4D95AC9818CF068AC3BBD0AF2098ADAC6DE4F62ADD4D1401EAF3DDDB2316D865703AAAE735CEF8867D6F532D6BA50366B804CECBFA575AA88A02A8000EC050E4A8C85CFE3401E592FC38B9BD759750BCB899B6FCF8908FD2AAEA5A2E81A78579994BC6094467C9E2BD0F585866864B89E529044BBDB6B7200EB5F9EBF1D7FE0A1765F0DB5CBCB5D13C072EACB048618AE6EA428928E72D9C1F6E2803ED1F0F6BDA4B0B8FF0047C48623B0A8C83ED5B106A97D1B27916CBB5FF85CE315F8F7E28FF82A6FC41D5AEDE2D23C35A5699B9B6A81B9D87FB3C601A7E91FF051CF8DDA96AD1E9AB069B1CCE4E24303E318F5DD4EC3B1FB117ADA9DCDA1999228B6E4B7B7A0ACCD3F564372CBF62319538C8EA78EB5F107803F6D9F13E97E0A9AE3E21B42850978FEC59CCAB9E32A7383F8D76D69FB6A7862FF00C3773AC687ABDB4F7918DE6D67F91CFF009CD211F572EA234CB5697C891C31E7B579C7C69F8A76BF0F7C03E20F125DDBC620D3AD1E508F2005980381F89AF90358FF008293CFE1EB19EE6FB4F966849C2C3063A1E84B1FC6BE47FDA77F6D6BEF8F1E1C8B44B0B29F46B17944B768D2EE1363A0FA77A00F9BBC45AC3F8835ED4753941125E5C49704139C6E62D8FD6BECBFF8251789B4'
$BinaryString &= '8D1BE38EB561A9DB79D2DFE998B76F464901231EE0D7C495E9FF00B3478D22F00FC6FF0009EAF3BC91DBA5E2472346E5480C71D7F11401FD06AE81A4EB164E226F204ABF364722B87D5FE0F5F2DC2369F7E1A16CEE529C9C8AC5B6F8CDE104D362BA83589270B18DDE51DC47D40AD6F087C5DD0F5CBB30DBEBDF68E4058DB872493C63AD006AF867E1FEA92225BDCDDCF6F0C5F28507AB0EF5DDDAF858D841299EFC9DE000CD8183EB9AAD6DE203305F22195BE63F31E33F4ABF36B31D842C6F8F9907DE3B96801D61A72453E4DE3144FBBB8F5AAFAB6AD3DBCE22FB42ED4CB67BFB66B93D6BC7BA4C7744DACFC2FF00003F74FD2B0E4F8D1E1ED38BC5A94B23BCADF7C213B47F85006B6A9637BABA35CF9B0C6D9CAB3A9AD8B0D26D6EB4989AFAD05C4C0153FDDC7AD64DB78C34DBBB086E99C25B487313750CBD4715D2E95E2CD3D2E16311E14A655B391401C778A34AB9B585468F6080A825320924D614BF12FC45E1FB528345696441891B0457B25B4F05EDD6EB775656E783F98A6EB3616925B48184284A9C9931F9D0078FD87C5EBEBDB6124BA6BC2D9C6C6041C515DDDAE83A7CB0AB3488CC7A95518FE7450073FA478EB585F10C56B79F698E6980CC5B08503EB5DFF9D7D7D0CCD1CFBD7A2FCF8C56E4CFA6C93ABCA912CC780CCBF37E754EF74DD3ADB2CAC1588C9C38E9401C57D92FEFAF8C173783ECA809318EFF'
$BinaryString &= '008F7AE4BC49FB2D7813C7B6DE5DF69D05C46C0F1E528E49EF8AF49BDBD8EF2DE5B5B5484DCED2A921C6471D6B1F53D3F52D3EDA2B8B28243731AF211B00F7E7D6803C3FFE1DCDF0D2DE732D9E950864F982E3760FB66BCFFC51FF0004FCF0F5BEA2BA8DA58086657DF90386E7A57BCF8A7E2478BBC36F672269D2CA24C1778FA01DC1AF49F87DE26BAF15689FDA379098D9C168A3987200ED8A00F9DFC1BFB2BE9BABF87CD8EA9A2DB5C5A46C5865065BDB9A82E7F616F05E9AF2CB168312923EEAA6339AFA263F89161776D72111ED65190A540C706BC9FE24FC68D674B59E23A65EDDE9F1AE44FA7A9321FA500730BFB017C3FD4F42993FB3544F20C794FF00300BF8D7E5CFEDC3FB294FFB32F8E20856547D3752DD25AAA8E40079FCBA57DEF65FB7445E14D7EDE0D4F4CF11C16DD5DDA0DC31EF8E6BE78FF82937ED1FE0EF8FBE17F0F45E18B2BDBCBBB494CD25FC96CD1A44B820A7CC01CE7D38A00FCF6ADAF0668D7DE20F15E93A7E9914935F4F751A44B12EE6CEE1CE3DAB16BEE6FF00825C7C01B0F883F11E7F1BEAB7FF006683C3D229B6B752332CA79E73D80ED401F70FC17FD92EF3C39E14378D7427D7E58048166521036DCFCC3F1AF24F813FB3B7C73B1FDA92FF00C43AFF00D9ED7C35E63799200A222A33B42AE78FAD7E85DBCA6DA39367CDD3183C918AB5697B24D6FE5496D211D0B119DD400917D874AB'
$BinaryString &= '7537334455470C6A6B6BBB1D757C9289244C3182335CAF8A6CAF66476B4B04BA41D15F8C0AA5A3CFAD5B9848B58ED8B100633B40CD00747A87C3AF0F292FFD9F0AC8E7258AD664FE0CF0E5EB185ECE12E461A6DA091ED5AAB1CD7370C2EAE8ED1C121B0BF8549FD8763315F2A7C8CE7721A00E135CD1FC33A1992D961DB1C4BF7D73807D001ED5E61AA7C55D27C39ACDC452AB246465727680B8AFA325B1D163DC25B7460BCE58673F5AF39F15DBF83A2BDF266D0E2BDB9620642827F51401E477BF1C3CCD35AF7459677489F90AA720572BFF000BAFC59ACE9925C59A4971C14D8724F3C679AF5F9757D1B4879A2B4F09B456ED9DFBA30391ED8E735D4F87E4F0B43651DC5C69A968275DC209A3018FD05007CED65AA78DE2B65569AE19BAB14720668AFA56DFC63E1165609A7C68A8C576B6D18A2803B2F15496B77681ED8E6E5F843E86BCBF57F865E2AD4984969A9328761BB7499F97B815EE17766B0C5BA0B74771C609038ACF9F579448A915AA90072C1C71401E01FF000AEBC7D6372E96D781E11C6F2FF362A78354F1EE8F7823BB8A695621D636DCA07D2BDBFF00E127B7B78C46AA44CA72723B54975ABE937506F72BB4F7DBC8A00F31B6F1CC9A9C71DBEA11C62660064A6081DEBBE852DEDEDD155D5208E1DCB838CD73171A8E83A8EA53C4A22F307C8727071F4A8D1218EE05A5BDD3B5BE388CFCDF87D2802EF8'
$BinaryString &= '23C1965FF08C9596DC4ACDE6333E72C77313566F342B7D2F4D945ADA6FB8651B5643F281EA6AF9D727B0D3B65BC20065DAA47001F7ACFD6BC457575A2116D6FBAF986C24F41C75A00C7B8F0B6877F6CB26ADA4D9DCB95C10D10383DF1ED5E7DF17FE06F803C65F0FB52D38787ECADE7BA85E24786155285948DDC7A66BA4B1B7F13EA97650948D36E0A91C9FC2A8EA1F0E3C45ADDC01737CD68A40511AF7F7A00FC1EF8C5F0F1BE1778FF53F0EBDC2DCB5A498DCA315F68FFC1287C556F6FADF89F44B908448AB346304313900E0E6B67F69CFF826F6BFAAF89AF35ED175C8AE2E6E5B7CB15E90BF3312782067BF4AC1FD927F665F17FC21F89935CF886486D9405DA6CEE370600FAE07E5401FAB17C891D8C2B199222CC149DC734697E38B3B1BC7B7375BE384E1D646C6D27B735CD69FE20B2F146976B04FA9476F3C60A98F382F9E87F4AD1D23E15D87DA64BAB8BAFB4A93B8A67209A00D7BFF00895636D32C492090B1F9BCB20903DE9977F1016E99A18A25B762010CFC8DBEB51A7C22D1669DE489C79BBC332FA7B53B55F86A97523389C451EDD84A8C1EB40199A978CC496E163DB2143FC2386AC6BAF19DFC30B0B6531B8E400878F73562F6D2CFC1C302E60971CEF761938E2B8CD4BE3259D94EE9B2D17F80EE947CC4D0032FFC5F752991A6D5A4DF9C14C1F5AA963730C7A8CD7FF3DD5C1F951DF2703FA5558FC731'
$BinaryString &= 'DD5F46C9616D2B1192DD78ABADE3DD4A1B39A3B0D36C95D4EE67719DC33400DF12F8CE5F0E5836A3AC24F222AEEC44A4A903DAB8FB4F8A96BE2375BA4BBF36644F94C8A40E4F0066BD0743F1EEA3A9DBA0BDD3ADD979C91196FAD4BE27537F147241A2C775346A768861C7BD0079D584DADDDACD28D19650D2B1DEAFD68AEE746B0D466B20F368BE4BB31250C98FD28A00EFE3F8C93789F408E4B3D266374EBBB637CA57DB15C969775E3BD52E0C49A63592492024349920679AF6817FE19D3E359A258104BDD455AB1F10E87348CE2EA04901C12EC01A00E2ECFC09A965E732BA4AC7A337CB523F80B5698217B98DF2F8DAB9185AF443AA58EE0167899B1C056069A751B5981512A33723603CD00797C5F08216D54CB33224B8CEE049CD775A07836D747B440E8B2CD8C6F1E95A36853ED0D2B38C74504F5153ACB133B2B3753D33D0FA500509B45B63295F2F2483C1FE754CE9515A16036A2F6E78ABF35C40B3EF6BB4523B96E4564DDCDA6F9CFF0068BD52554B121B838A00CBBF86F74A89DED4A4A6538DFE958F17887560024F6F1A95254381C9F7ADE4D434B8EDC6D9D6553CF3DAB027F165BC37214C0CEA31964E814F7A00F32F88B65A92FDAAF25D51989198142E4138AF9B60F1FDEF85BC60D2EA3A55FDEA11B4168F0A84FF00157D7DA9EB905D968E2B412C8BCAEE3F2FAE2B89D5609752B90E74F866DA768C71B6'
$BinaryString &= '8032FC3DA9A6B7690EA3FD9D2C1BD46309919F5AEB2CEFF5BD3D83C0F2F964FC801E315A1A245269F6D2457502246AA0AA275FA5161ACCED7EDBED556DA2F9BE63838A0096EFC7DAE6884B6F96598AE426C1F31AB1A75F6BBE31B66792F64B36EA63DDC0CFB56FC7E28F0DA5A799756E5DBD4F3D7D2B4F4EBBF0ECAED22831291DF8CD007396FF0007ECF5A31A6A5766ED54F08C78F706A6BFFD99FC1DAAB6D9EC4382C0E718E31D056FDAB6981A4963BA0993950CDD79EB5A03C7DA3DA2959B52440BD99A803274AF831A0E851470DAD8471451E1432E4F1E95B36BF0E745876A0B68D90139C2F359F7DF1A7C3365665E4BB11460F2C4F3F5AE79BF695F06C69E6BDDC8507032847278A00F4183C21696F06C8A15B74E7A0E4D67FF00C2353AC8E62B9C478C005726B9F5F8E1A7CF62D716D0CF346A33B8467031DAB3E1F8DB68650D2C529F314B22C4B9C7D7D2800D53C0BACB5F4AE9A980AC77018231ED45249F16E491CBC5692C91B72AC53068A00E5F571E219E375FB0F96BD049E592C0FA62B03505D53CD657D3A4DB2039210F1E86BEAB96DA29482C8ADCE7A530D8DB31E608C93EAA2803E4CD2350B892458E3B6BE8EE5410645048381D7DABACD0EDA47922DD7772AC080CD29239279E7D2BE843A459649FB2459C632105517D1AC882A6CA3DA4E768504D0079DCBE0BD7EEAF05D5AEB40432636211C28F6A47F87B'
$BinaryString &= 'E2C8E53247AAACA4B641271B462BD284A60750D0F971646D0074ABF148245240DA338E6803C69FC0FE2ABA891A59D3786DB9231BBDEA3BBF873AC0668922465651D1C81EFCD7AFDE453CE4C6AD85C67774ACA974EBF6C16BA181C0553838A00E1F49F857A8B966BD91028E154311C574561F0E74B1194747DBD30589CFBE6BA9B7B09C46375C12B8E57FFAF538B20AA02BB211E8680314F81F471191F675047195EDC5605FF852CB4D263B3B46937719C64B1FE95D5CAE3EDAD1EFDC980443DCFBD5C8E649B319DA48E42E2803CAEF7C1DABCB0DC5CBE9A902C6D94449033C8A0743EF5E71E2BF1BBE8E5E1974E0F28500A03DBD303BD7D09A9CF7B68AF24F341E593BA25906067B2D705AEFC1783C4DA845A94AD15BCD8DCD10620127DE803E7FBEF897ABDCDCA4767047661977889E3DDC0E80D3743F1CF892E9956EEE2306525B6C29F37D318AF6C4FD9EE0B5BB375F6A5918FDE62738E7A0CD6E691F052C22945DB9899FAA84E0500798E9FA8EB579A6BC06D18C9236E597EEED1E87DEAAC5E05D7EEAE1249ACCC818E47058103B9F7CD7D316BE19B086C9226B588918E71DFD6AC5C5ED9E9101694796A3D0673401F30DBFC19D5B548A4334291C2E08F2E55CF35D1691FB3F416D650C7770A92A33B5C70315ECFF00F094E98D1FC9FEAC1C961D8D526F88DA38998BBEF0A391B0E47E940193A2F82AD34CD1E4B768FCD6'
$BinaryString &= '61D33D0541A7F85AD34DB89D574D32B2FCC36F7AD6B6F1AE9B3EA6156E208CCC008B71C7E87BD74F1040A1F77CCDD5BD680385B8692C5C44BA4230C678028AEB2FA4CDC318678913B861CE68A00F2ED43E2AEBF1CEC89344A0E4711F4FA7356ED3E286B988226781C1600B18F9EDE868A2803BDF0F788EF3528D9A6D99033F2AE2BA6B63BD771EBEB4514012346AE3E619A6AA2852B8E28A28012685648F0C3A546BA74087704E7D734514013A2845C0181E94A7BD14500674FA75BC9751DCB4799A3FBAD9F5A96EE20997525588E71451401C878C2465BFB35CE446199437383EBF5AABA35B1B8D40092E2765C0C8DFC1A28A00EE2D6DA38ED506DDDB41C16E6996D0AB0031803A0145140D13825F0093806A86A8C0CB1C6C8ACA719DC33D8D1450239F30C3F686020880071F76B02F750920BA95523842F97D3CB1451401985D20D9308217914654BA0383D78AE82CF5CBB75858C9FC3D3B51450064DE6BD766EE51B9786C74A28A2803FFD9'
Return Binary($BinaryString)
EndFunc

Hi!

Edited by Nessie

My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Link to comment
Share on other sites

@UEZ a image or a zip file embedded in sctipt, but i should use ntcompress + b64 :ermm:

@Nessie, it works :thumbsup:

#include <String.au3>
$bImage = "0x89504E470D0A1A0A0000000D4948445200000020000000200806000000737A7AF4000000097048597300000EC400000EC401952B0E1B000002714944415458C3ED96CD6B134118C69F3061FF85D239C4B454A588896E2420E231A510" & _
"50DA8BC56B6EDEF4A424F6A4987FC2534E5E3DA637A9D2ACE68356B44231A5346B0F424242BE36D979BD64CB669BDDCE461B2F7D21CC6461F7F9EDF37ECC06E0124CE17100AF6C9732A6A16B98553085E735AD4C44449A5626A6F03C66194CE1640F" & _
"A670BA089D20FE735C0204FDD60580AD9974C5A42274760553B8B5E6476D7BB100E700D961F84C009CFF0B8512ED148AF44F20FC00082188299C86C3210D0603FAF849931E5C7FD5054474FA030021048410506FDF048084140053780AC0A3D10D5B" & _
"6ED5BD99793626FC32FD1442883100D33441441042F8B3BAA69F1011514D3FB1F217775A6E596D9AE6A9D5866150BFDFA76EB74B99CD2CB5DB6D6AB55AD46C36E547375378DE02B0E537EFCCF124E15EAF479D4E674CB8D16850BD5E97060802C884" & _
"C22A8E0E4B093E3F070018F66B8974E6CD99FCDA736E59ED5CADBDF424340D5D630A7F170AABC6D16129C9E7E7404478F86075A2989BF0D40000601AFA5BA67084C22A06BDE3241121168B8C3D7092B8DBBE54DE03806F320001473DFCDCFEF07EE1" & _
"4E2C2AF5D66EFB2B8BF1ECE8C55EF805480158EBB4AA492F9BCF0358BC7AB70A60DD34F48AAF41344A455AD34A50D588949813AC52F90A005D19F1330ED85DA8FFDE4F4E03706DF9BEB4FD6EA3380720FDF94B05B7A2377C038CA6EAFAD41F24A6A1" & _
"1B4CE1AF575637D67E1D579232A2D6BABBF7DD97FD5E87510E40BA58DC4524B2EC597CF62ED978FC24EBF7400B788CE81480A5EAC1CE73AF6EB0EFA3EA8A74F5CB1CC73900FBF613CE29ECC83D00303FE29E00A35A3858BA7E6FC1C7F37EE0322EC3" & _
"67FC014A18D5CCF9B2326F0000000049454E44AE426082"
FileWrite(@ScriptDir & "\Click.png", _HexToString(Binary($bImage)))

I'm now confusing with one thing, this is hex: 0xff and this is binary: 0101101? if _HexToString() converts from hex to string (ansii or whatever) why do it are converting binary string? :huh:

Edited by DiOgO

Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

Link to comment
Share on other sites

From wikipedia:

Each hexadecimal digit represents four binary digits (bits), and the primary use of hexadecimal notation is a human-friendly representation of binary-coded values in computing and digital electronics.

It's all clear now?

Hi!

My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Link to comment
Share on other sites

Hex is just a positional numeral system with base 16. When you convert a file in "hex" you simply convert the binary data to hexadecimal.

Most computers manipulate binary data, but it is difficult for humans to work with the large number of digits for even a relatively small binary number. Although most humans are familiar with the base 10 system, it is much easier to map binary to hexadecimal than to decimal because each hexadecimal digit maps to a whole number of bits.

Hi!

My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Link to comment
Share on other sites

@UEZ a image or a zip file embedded in sctipt, but i should use ntcompress + b64 :ermm:

I think you mean not to use ntcompress + b64 right?

Br,

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Hex is just a positional numeral system with base 16. When you convert a file in "hex" you simply convert the binary data to hexadecimal.

Most computers manipulate binary data, but it is difficult for humans to work with the large number of digits for even a relatively small binary number. Although most humans are familiar with the base 10 system, it is much easier to map binary to hexadecimal than to decimal because each hexadecimal digit maps to a whole number of bits.

Hi!

okey :)

do you know what is a unsigned char? hextostring doesn't do the same as this function (not autoit code):

// decodes (to unsigned char) the hex encoded string in hex_string, in place
bool HexDecode(unsigned char *hex_string, int slen)
{
    if ( slen < 2 || slen % 2 != 0)
    {
        cout << "HexDecode: hex encoded string length NOT even! Aborting.";
        return false;
    }

    int      i, j;
    unsigned char c, newchar, hex_sub1, hex_sub2;
    hex_sub1 = unsigned char ('A' - 10);
    hex_sub2 = unsigned char ('a' - 10);

    for (i = 0, j = 0; i < slen; i++)
    {
        // get character and make sure a valid hex encoded character
        c = hex_string[i];
        if ( ! ( (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f') ) )
        {
            cout << "HexDecode: invalid (non hex) character " << c << " in string! Aborting.";
            return false;
        }
        // valid hex char, convert to binary value
        if (c >= '0' && c <= '9')
            c -= (unsigned char) '0';
        else
        if (c >= 'A' && c <= 'F')
            c = (unsigned char) (c - hex_sub1);
        else
            c = (unsigned char) (c - hex_sub2);

        // now see if 1st or second byte of 2 byte group
        if (i % 2 == 0)
            newchar = (unsigned char) (c << 4); // 1st byte of group (0 based: 0 is 1st, 1 is 2nd, 2 is 1st, 3 is 2nd, etc)
        else
        {
            // 2nd byte push together into single unsigned char byte
            newchar = (unsigned char) (newchar | c);    // low nibble of newchar = 0000, high nibble of c is 0000 so bitwise OR
            hex_string[j++] = newchar;// can overwrite hex_string as j < i so already processed
        }
    }

    // done decoding, value of j is 1/2 slen, 0 out hex_string from j to end;
    while (j < slen)
    {
        hex_string[j++] = 0;
    }

    // all done
    return true;
}


I think you mean not to use ntcompress + b64 right?

Br,

UEZ

nup, a hex string is 2x bigger than original string/data, ntcompress will reduze hex size and b64 put it in chars that can be on a script


EDIT: i got the same output from this:

ConsoleWrite(StringToBinary("AutoIT",1)&@LF)
ConsoleWrite(Binary("0x4175746F4954")&@LF)

Binary("0x4175746F4954") = 0x4175746F4954 (it wouldn't be just 1 and 0's?)

EDIT2: since a unsigned char goes from 0-255 using Chr() from autoit would perform the inverse of a unsigned char :think:

Edited by DiOgO

Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

Link to comment
Share on other sites

@DiOgO: then you can use e.g. to create smaller binary strings.

Br,

UEZ

wow, it does all the stuff :lol:

there's anyway to convert chars to unsigned chars in autoit?

Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there's InetRead and WinHTTP, way better
happy.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...