Jump to content

how to create a file.key?


Recommended Posts

Hellow! I have created a file "key.txt", and it's ok:

CODE
; Create File "key.txt"

$file = FileOpen("key.txt", 1)

FileWriteLine($file, "testest" & @LF)

FileWriteLine($file, "2015" & @LF)

FileWriteLine($file, "00000000" & @LF)

FileWriteLine($file, "00D0050000C0060000D0050000E0060000D0050000F0060000D0050000E0060000D0050000D0060000D0050000D0060

0")

FileClose($file)

but, I aren't create a file "helpme.key" ....

how to for create it????

is possible create how hexadecimal or binary? (witch a hexadecimal editor, what's? )

Excuse me I am a newbie...

this is in to the file:

(is attached)

CODE
KLsw(

Serial number : censured-censured-censured

KLsw ­­ ü censuredcensable Õ

I ¨ k ì

Ú × (K Customer: Name laut Rechnung Element 5. xxxxxxxxxxxxxx: 02A8-050414-101126. ( censured@censured.com k

(censuredcensuredcensuredcensuredcensuredcensuredcensuredcensuredcensuredcensured ( \ ( XXXXXXX XX Deutschland ( XXXXXX XX Deutschland ( Name laut Rechnung Element 5 ( ( Germany ( ( ( ( ( info@xxxxxxx.xx ( ÿ ($ censured-censured-censured ( ÿ ) * + 3 4 ÿ'1ý

; 0XLSznpdI71fB300e7Uwj1w8jmPyrFp2ffj02AnKQotafwJzNHZN7HMSKO­­

helpme.key.txt

Link to comment
Share on other sites

umm your english is very bad,

just write some text in a file.txt then save it as file.key,

if u dont see the TYPE of a file, just go to a map (my computer) then click on the tab Tools: Folder Options

goto View, and below u see a text: "Hide extensions for known file types"

press OK to apply these options, then when you have done this

u can later open the file with the command FileOpen

Link to comment
Share on other sites

I have exported the file.key as HEX TEXT witch a Hexadecimal editor,

:D obviously it does not work in the same way that with text format :D :

$fp = FileOpen("FILE.KEY", 2)

FileWrite($fp, "4B 4C 73 77 28 00 0D 0A 53 65 72 69 61 6C 20 6E 75 6D 62 65 72 20 3A 20")

FileWrite($fp, "30 32 64 36 2D 30 30 30 34 38 36 2D 30 30 30 61 64 64 33 31 0D 0A 4B 4C")

FileWrite($fp, "73 77 00 00 AD AD 01 00 00 00 FC 03 00 00 03 01 00 08 01 01 00 00 09 07")

...

...

FileClose($fp)

How I must edit the script for SciTE?

I will have to edit EVERY hexadecimal line? :)

Or is possible convert/import the file.key to a Script mode SciTE?

------------------------------------------------------------------------

This is the complete file in the hexadecimal format:

CODE
4B 4C 73 77 28 00 0D 0A 53 65 72 69 61 6C 20 6E 75 6D 62 65 72 20 3A 20

30 32 64 36 2D 30 30 30 34 38 36 2D 30 30 30 61 64 64 33 31 0D 0A 4B 4C

73 77 00 00 AD AD 01 00 00 00 FC 03 00 00 03 01 00 08 01 01 00 00 09 07

01 00 08 01 01 00 00 09 05 01 00 01 28 16 00 4B 61 73 70 65 72 73 6B 79

20 6C 61 62 20 6B 65 79 20 66 69 6C 65 01 00 00 09 01 02 00 01 09 04 00

00 00 01 00 00 09 01 0F 00 01 0B D5 07 06 00 01 00 1B 00 01 00 00 09 01

0A 00 01 49 03 00 01 00 D6 02 00 00 86 04 00 00 31 DD 0A 00 01 00 00 09

01 19 00 01 09 01 00 00 00 01 00 00 09 01 03 00 01 09 DA 02 00 00 01 00

00 09 01 04 00 01 0B D8 07 06 00 04 00 1A 00 01 00 00 09 01 07 00 01 09

01 00 00 00 01 00 00 09 03 1A 00 01 09 00 00 00 00 01 00 00 09 01 0B 00

08 09 01 00 00 00 01 00 00 09 01 06 00 01 01 01 00 00 09 01 08 00 01 28

41 00 4C 69 63 65 6E 63 65 4E 75 6D 62 65 72 3A 20 30 32 44 36 2D 30 35

30 36 32 37 2D 31 35 32 35 31 39 2E 20 46 6F 72 20 64 69 73 74 72 69 62

75 74 69 6F 6E 20 76 69 61 20 45 6C 65 6D 65 6E 74 20 35 01 00 00 09 01

09 00 01 28 56 02 4B 61 73 70 65 72 73 6B 79 20 4C 61 62 73 0D 0A 0D 0A

41 64 64 72 65 73 73 3A 0D 0A 20 20 20 31 30 2C 20 47 65 72 6F 79 65 76

20 50 61 6E 66 69 6C 6F 76 74 73 65 76 20 73 74 72 65 65 74 2C 20 0D 0A

20 20 20 31 32 33 33 36 33 2C 20 4D 6F 73 63 6F 77 2C 20 52 75 73 73 69

61 2C 0D 0A 20 20 20 4B 61 73 70 65 72 73 6B 79 20 4C 61 62 73 0D 0A 50

68 6F 6E 65 3A 0D 0A 20 20 20 2B 37 28 30 39 35 29 37 39 37 2D 38 37 30

30 20 2D 20 53 61 6C 65 73 20 44 65 70 74 20 28 33 30 20 63 68 61 6E 6E

65 6C 73 29 0D 0A 20 20 20 2B 37 28 30 39 35 29 39 34 38 2D 38 33 35 30

20 2D 20 53 61 6C 65 73 20 44 65 70 74 0D 0A 20 20 20 2B 37 28 30 39 35

29 39 34 38 2D 34 33 33 31 20 2D 20 53 61 6C 65 73 20 44 65 70 74 0D 0A

20 20 20 2B 37 28 30 39 35 29 37 39 37 2D 38 37 30 37 20 2D 20 54 65 63

68 6E 69 63 61 6C 20 53 75 70 70 6F 72 74 20 28 33 30 20 63 68 61 6E 6E

65 6C 73 29 0D 0A 20 20 20 2B 37 28 30 39 35 29 39 34 38 2D 35 36 35 30

20 2D 20 4D 61 72 6B 65 74 69 6E 67 20 44 65 70 74 0D 0A 46 61 78 3A 0D

0A 20 20 20 2B 37 28 30 39 35 29 39 34 38 2D 34 33 33 31 0D 0A 45 2D 6D

61 69 6C 3A 0D 0A 20 20 20 6D 61 69 6C 74 6F 3A 73 61 6C 65 73 40 6B 61

73 70 65 72 73 6B 79 2E 63 6F 6D 20 20 20 20 2D 20 53 61 6C 65 73 20 44

65 70 74 0D 0A 20 20 20 6D 61 69 6C 74 6F 3A 73 75 70 70 6F 72 74 40 6B

61 73 70 65 72 73 6B 79 2E 63 6F 6D 20 20 2D 20 54 65 63 68 6E 69 63 61

6C 20 53 75 70 70 6F 72 74 0D 0A 20 20 20 6D 61 69 6C 74 6F 3A 69 6E 66

6F 40 6B 61 73 70 65 72 73 6B 79 2E 63 6F 6D 20 20 20 20 20 2D 20 4D 61

72 6B 65 74 69 6E 67 20 44 65 70 74 0D 0A 20 20 20 6D 61 69 6C 74 6F 3A

6E 65 77 76 69 72 75 73 40 6B 61 73 70 65 72 73 6B 79 2E 63 6F 6D 20 2D

20 41 6E 74 69 76 69 72 61 6C 20 4C 61 62 0D 0A 57 57 57 3A 0D 0A 20 20

20 68 74 74 70 3A 2F 2F 77 77 77 2E 6B 61 73 70 65 72 73 6B 79 2E 63 6F

6D 0D 0A 20 01 00 00 09 01 0E 00 01 09 86 04 00 00 01 00 00 09 01 0D 00

01 28 5C 00 4B 61 73 70 65 72 73 6B 79 20 53 65 63 75 72 69 74 79 20 53

75 69 74 65 20 50 65 72 73 6F 6E 61 6C 20 49 6E 74 65 72 6E 61 74 69 6F

6E 61 6C 20 45 64 69 74 69 6F 6E 2E 20 31 2D 44 65 73 6B 74 6F 70 20 32

20 79 65 61 72 20 42 61 73 65 20 44 6F 77 6E 6C 6F 61 64 20 50 61 63 6B

01 00 00 09 01 1B 00 01 09 CD 01 00 00 01 00 00 C8 BE 8D DE 09 01 1C 00

01 28 00 00 01 00 00 09 01 1D 00 01 09 01 00 00 00 01 00 00 09 01 1E 00

01 09 00 00 00 00 01 00 00 09 01 1F 00 01 09 75 00 00 00 01 00 00 09 01

20 00 01 28 08 00 45 6C 65 6D 65 6E 74 35 01 00 00 09 01 15 00 01 28 08

00 45 6C 65 6D 65 6E 74 35 01 00 00 09 01 17 00 01 28 24 00 35 41 33 35

30 35 38 45 2D 44 38 39 35 2D 34 36 34 43 2D 39 33 36 37 2D 33 33 42 35

31 35 42 46 46 39 38 36 01 00 00 09 01 18 00 01 28 00 00 01 00 00 09 FF

01 47 00 08 09 1E 00 00 00 01 00 00 09 01 5A 00 08 09 1E 00 00 00 01 00

00 09 01 5B 00 08 09 1E 00 00 00 01 00 00 09 01 5C 00 08 09 1E 00 00 00

01 00 00 09 01 5D 00 08 09 1E 00 00 00 01 00 00 09 01 5E 00 08 09 1E 00

00 00 01 00 00 09 01 5F 00 08 09 1E 00 00 00 01 00 00 09 01 60 00 08 09

1E 00 00 00 01 00 00 09 01 61 00 08 09 1E 00 00 00 01 00 00 09 01 62 00

08 09 1E 00 00 00 01 00 00 09 01 63 00 08 09 1E 00 00 00 01 00 00 09 FF

D2 77 8B 54 0D 0A 3B 20 30 58 4C 53 7A 6E 70 64 49 37 31 66 42 33 30 30

65 37 55 77 6A 31 47 6F 6C 45 41 63 54 77 6A 4E 58 52 63 68 44 76 5A 59

32 6C 7A 54 62 2B 4A 6C 37 51 76 52 50 64 31 33 4D 52 AD AD

Link to comment
Share on other sites

Well dont know if this work as intended but give it a try

$hexkey = "4B4C737728000D0A53657269616C206E756D626572203A20303264362D3030303438362D30303061646433310D0A4B4C73770000ADAD01000000FC030000030100080101000009070100080101000009050100012816004B6173706572736B79206C6162206B65792066696C650100000901020001090400000001000009010F00010BD507060001001B0001000009010A00014903000100D60200008604000031DD0A0001000009011900010901000000010000090103000109DA02000001000009010400010BD807060004001A000100000901070001090100000001000009031A0001090000000001000009010B0008090100000001000009010600010101000009010800012841004C6963656E63654E756D6265723A20303244362D3035303632372D3135323531392E20466F7220646973747269627574696F6E2076696120456C656D656E74203501000009010900012856024B6173706572736B79204C6162730D0A0D0A416464726573733A0D0A20202031302C204765726F7965762050616E66696C6F7674736576207374726565742C200D0A2020203132333336332C204D6F73636F772C205275737369612C0D0A2020204B6173706572736B79204C6162730D0A50686F6E653A0D0A2020202B3728303935293739372D38373030202D2053616C6573204465707420283330206368616E6E656C73290D0A2020202B3728303935293934382D38333530202D2053616C657320446570740D0A2020202B3728303935293934382D34333331202D2053616C657320446570740D0A2020202B3728303935293739372D38373037202D20546563686E6963616C20537570706F727420283330206368616E6E656C73290D0A2020202B3728303935293934382D35363530202D204D61726B6574696E6720446570740D0A4661783A0D0A2020202B3728303935293934382D343333310D0A452D6D61696C3A0D0A2020206D61696C746F3A73616C6573406B6173706572736B792E636F6D202020202D2053616C657320446570740D0A2020206D61696C746F3A737570706F7274406B6173706572736B792E636F6D20202D20546563686E6963616C20537570706F72740D0A2020206D61696C746F3A696E666F406B6173706572736B792E636F6D20202020202D204D61726B6574696E6720446570740D0A2020206D61696C746F3A6E65777669727573406B6173706572736B792E636F6D202D20416E7469766972616C204C61620D0A5757573A0D0A202020687474703A2F2F7777772E6B6173706572736B792E636F6D0D0A2001000009010E0001098604000001000009010D0001285C004B6173706572736B7920536563757269747920537569746520506572736F6E616C20496E7465726E6174696F6E616C2045646974696F6E2E20312D4465736B746F7020322079656172204261736520446F776E6C6F6164205061636B01000009011B000109CD010000010000C8BE8DDE09011C000128000001000009011D0001090100000001000009011E0001090000000001000009011F000109750000000100000901200001280800456C656D656E74350100000901150001280800456C656D656E7435010000090117000128240035413335303538452D443839352D343634432D393336372D333342353135424646393836010000090118000128000001000009FF01470008091E00000001000009015A0008091E00000001000009015B0008091E00000001000009015C0008091E00000001000009015D0008091E00000001000009015E0008091E00000001000009015F0008091E0000000100000901600008091E0000000100000901610008091E0000000100000901620008091E0000000100000901630008091E00000001000009FFD2778B540D0A3B2030584C537A6E70644937316642333030653755776A31476F6C45416354776A4E5852636844765A59326C7A54622B4A6C37517652506431334D52ADAD"
$acsiikey = ""

While StringLen($hexkey) > 0
    $hex = StringLeft($hexkey, 2)
    $hexkey = StringTrimLeft($hexkey, 2)
    ConsoleWrite(Chr(Dec($hex)))
    $acsiikey = $acsiikey & Chr(Dec($hex))
WEnd

$file = FileOpen("C:\test.key", 2)
FileWrite($file, $acsiikey)
FileClose($file)

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Link to comment
Share on other sites

The $hexkey is too long. You will have to merge that varible with another one to get it to be smaller.

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

  • Moderators

Thanks Shevilie, but come this error:

ERROR: syntax error (illegal character) $hexkey = "

That's telling you that you have a string missing a quote.

CODE
$hexkey = "4B4C737728000D0A53657269616C206E756D626572203A20303264362D3030303438362D30303061646433310D0A4B4" & _
"C73770000ADAD01000000FC030000030100080101000009070100080101000009050100012816004B6173706572736B79206" & _
"C6162206B65792066696C650100000901020001090400000001000009010F00010BD507060001001B0001000009010A00014" & _
"903000100D60200008604000031DD0A0001000009011900010901000000010000090103000109DA020000010000090104000" & _
"10BD807060004001A000100000901070001090100000001000009031A0001090000000001000009010B00080901000000010" & _
"00009010600010101000009010800012841004C6963656E63654E756D6265723A20303244362D3035303632372D313532353" & _
"1392E20466F7220646973747269627574696F6E2076696120456C656D656E74203501000009010900012856024B617370657" & _
"2736B79204C6162730D0A0D0A416464726573733A0D0A20202031302C204765726F7965762050616E66696C6F76747365762" & _
"07374726565742C200D0A2020203132333336332C204D6F73636F772C205275737369612C0D0A2020204B6173706572736B7" & _
"9204C6162730D0A50686F6E653A0D0A2020202B3728303935293739372D38373030202D2053616C657320446570742028333" & _
"0206368616E6E656C73290D0A2020202B3728303935293934382D38333530202D2053616C657320446570740D0A2020202B3" & _
"728303935293934382D34333331202D2053616C657320446570740D0A2020202B3728303935293739372D38373037202D205" & _
"46563686E6963616C20537570706F727420283330206368616E6E656C73290D0A2020202B3728303935293934382D3536353" & _
"0202D204D61726B6574696E6720446570740D0A4661783A0D0A2020202B3728303935293934382D343333310D0A452D6D616" & _
"96C3A0D0A2020206D61696C746F3A73616C6573406B6173706572736B792E636F6D202020202D2053616C657320446570740" & _
"D0A2020206D61696C746F3A737570706F7274406B6173706572736B792E636F6D20202D20546563686E6963616C205375707" & _
"06F72740D0A2020206D61696C746F3A696E666F406B6173706572736B792E636F6D20202020202D204D61726B6574696E672" & _
"0446570740D0A2020206D61696C746F3A6E65777669727573406B6173706572736B792E636F6D202D20416E7469766972616" & _
"C204C61620D0A5757573A0D0A202020687474703A2F2F7777772E6B6173706572736B792E636F6D0D0A2001000009010E000" & _
"1098604000001000009010D0001285C004B6173706572736B7920536563757269747920537569746520506572736F6E616C2" & _
"0496E7465726E6174696F6E616C2045646974696F6E2E20312D4465736B746F7020322079656172204261736520446F776E6" & _
"C6F6164205061636B01000009011B000109CD010000010000C8BE8DDE09011C000128000001000009011D000109010000000" & _
"1000009011E0001090000000001000009011F000109750000000100000901200001280800456C656D656E743501000009011" & _
"50001280800456C656D656E7435010000090117000128240035413335303538452D443839352D343634432D393336372D333" & _
"342353135424646393836010000090118000128000001000009FF01470008091E00000001000009015A0008091E000000010" & _
"00009015B0008091E00000001000009015C0008091E00000001000009015D0008091E00000001000009015E0008091E00000" & _
"001000009015F0008091E0000000100000901600008091E0000000100000901610008091E0000000100000901620008091E0" & _
"000000100000901630008091E00000001000009FFD2778B540D0A3B2030584C537A6E70644937316642333030653755776A3" & _
"1476F6C45416354776A4E5852636844765A59326C7A54622B4A6C37517652506431334D52ADAD"

$acsiikey = ""

While StringLen($hexkey) > 0
    $hex = StringLeft($hexkey, 2)
    $hexkey = StringTrimLeft($hexkey, 2)
    ConsoleWrite(Chr(Dec($hex)))
    $acsiikey = $acsiikey & Chr(Dec($hex))
WEnd

$file = FileOpen("C:\test.key", 2)
FileWrite($file, $acsiikey)
FileClose($file)
He just forgot to add the quotes and the continuations on the end of them.

Edit:

No matter what I do, it's just appending my quotes and _ line continuation onto the next line here in the tags, so you'll still need to mod this even.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Is possible import the hexkey of the file, directly from the SciTE, without use an other hexadecimal editor?

If not, which (simple) editor I must use to import as one long line without paragraphs and spaces?

(I have found many Editors but no ago this..)

Link to comment
Share on other sites

You wanna read the hex from a file... revert the thing i did

$hexkey = ""
$acsiikey = ""


$file = FileOpen("C:\test.key", 0)
$acsii = FileRead($file)
FileClose($file)

While StringLen($acsii) > 0
    $temp = StringLeft($acsii, 1)
    $acsii = StringTrimLeft($acsii, 1)
    ConsoleWrite(StringRight(Hex(Asc($temp)), 2))
    $hexkey = $hexkey & StringRight(Hex(Asc($temp)), 2)
WEnd

MsgBox(0, "HexKey", $hexkey)

Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

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...