CELua[RU]
    • Категории
    • Последние
    • Метки
    • Популярные
    • Пользователи
    • Группы
    • Зарегистрироваться
    • Войти
    1. Главная
    2. MasterGH
    3. Сообщения
    Не в сети
    • Профиль
    • Подписки 1
    • Подписчики 1
    • Темы 129
    • Сообщения 252
    • Группы 4

    Сообщения

    Последние Лучшие сообщения Спорные
    • RE: CE Lua ColorPicker (скрытый компонент)

      Lazarus — это среда разработки программ под разные операционные системы. Можно найти в Интернете.

      На Lazarus создали программу Cheat Engine, собрав исходники в exe. Исходники большие и запутанные.
      Исходники CE лежат на официальном сайте и их можно открыть с помощью Lazarus. Но лучше этого не делать без необходимости, т.к. чтобы разобраться в исходниках и уметь их собирать нужно потратить некоторое время, а может и много-много времени.

      Просто на Lazarus видно все компоненты в том числе скрытые. А в CE видны только те компоненты, к которым DarkByte явно дал доступ. К компоненту смены цвета доступ можно получить как я писал выше

      написал в Плагин-строй
      MasterGHM
      MasterGH
    • Обработка исключения в Cheat Engine Lua

      pcall() функция может вызывать функцию, которая может вызывать исключение.

      Возвращает статус в виде булевой о том, есть ли исключение или нет и возвращает текст исключения.

      function ThrowException()
            -- раскоментировать чтобы зывать ошибку по условию некоторому
            -- error("string expected", 2)
            
            -- Пример вывода стека ошибки
            print('AAA ->> '..debug.traceback())
            
            -- Исключение делаем
            temp[5] = 1
            
            -- До этой строчки не дойдет, т.к. исключение выше будет из-за temp[5] = 1
            print('BBB ->> '..debug.traceback())
          end
      
          local status, err = pcall(ThrowException)
      
          -- Показать какие типы имеют статус и ошибка (это булевый и строка)
          print(type(status))
          print(type(err))
      
          if status then
            print('No Exception')
          else
            print('Exception: ' .. err)
          end
      

      Как этим пользоваться? Если вдруг знаем, что может произойти ошибка, то можно её обработать и выполнить правильное действие не останавливая работу Lua скрипта.
      Подробнее документация

      Или например если не выполняется условие, то можем сами создать ошибку с помощью функции error, что остановит скрипт.

      написал в Приёмы ce lua exception
      MasterGHM
      MasterGH
    • Обработка исключения в Cheat Engine AA

      Новые директивы try/except в AA доступны Cheat Engine 6.8 Beta2 и выше

      Задача try/except в AA обработать исключение, не допустить crash. Чтобы игра продолжалась, а чит в лучшем случае не закрыл бы процесс.

      В теории возможно определить, что был crash и что-то сделать. Например, отправить логи в свой или иной удаленный сервис аналитики, что такой-то чит не сработал...

      Пример от DarkByte для try/exceptс счетчиком crashes

      [ENABLE] 
      alloc(newmem,2048) 
      alloc(crashcount,4) 
      registersymbol(crashcount) 
      label(returnhere) 
      label(originalcode) 
      label(exit) 
        
      newmem: 
        
      push eax 
      {$try} 
      mov eax,[esi+95c] 
      cmp [eax+10],0 
      jmp ok 
      {$except} 
      pop eax 
      add [crashcount],1 
      jmp originalcode 
        
      ok: 
      pop eax 
        
      je aftersub //it is 0 
      originalcode: 
      subss xmm0,xmm3 
        
      aftersub: 
      movss [esi+00000164],xmm0 
        
      exit: 
      jmp returnhere 
        
      "HomeworldRM.exe"+22AEEA: 
      jmp newmem 
      nop 
      nop 
      nop 
      nop 
      nop 
      nop 
      nop 
      returnhere: 
        
        
        
      [DISABLE] 
      dealloc(newmem) 
      "HomeworldRM.exe"+22AEEA: 
      subss xmm0,xmm3 
      movss [esi+00000164],xmm0 
      //Alt: db F3 0F 5C C3 F3 0F 11 86 64 01 00 00 
      
      написал в Приёмы фишки ce aa exception
      MasterGHM
      MasterGH
    • Считаем размер инъекции в байтах

      Можно подхватить разные моменты активации и деактивации записи в таблице CE и рассчитать размер кода между метками

      1. По шаблону вставляем АА код для туториала Cheat Engine
      2. Регистрируем метки-маркеры в АА коде
      3. Этими метками в Lua считаем и выводим ""endCode - startCode" размер байтов

      Пример, который подсчитал 15 байтов
      c330e4cc-9f25-4763-88b6-ca32eb0b2817-изображение.png
      95d770a5-02ec-4fba-855c-8ed07c23180d-изображение.png

      Пример скрипта

      {$lua}
        memrec.OnActivate = function (memoryrecord, before, currentstate)
          if currentstate and not before then
             print("Bytes: " .. getAddress("endCode - startCode"))
          end
          return before
        end
      {$ASM}
      
      [ENABLE]
      //code from here to '[DISABLE]' will be used to enable the cheat
      aobscanmodule(INJECT,Tutorial-i386.exe,81 BB 80 04 00 00 E8 03 00 00) // should be unique
      alloc(newmem,$1000)
      
      label(code)
      label(endCode)
      label(startCode)
      registerSymbol(startCode)
      registerSymbol(endCode)
      
      newmem:
      
      code:
      startCode:
        cmp [ebx+00000480],000003E8
        jmp return
      endCode:
      
      INJECT:
        jmp newmem
        nop
        nop
        nop
        nop
        nop
      return:
      registersymbol(INJECT)
      
      [DISABLE]
      //code from here till the end of the code will be used to disable the cheat
      INJECT:
        db 81 BB 80 04 00 00 E8 03 00 00
      unregistersymbol(startCode)
      unregistersymbol(endCode)
      unregistersymbol(INJECT)
      dealloc(newmem)
      
      {
      // ORIGINAL CODE - INJECTION POINT: "Tutorial-i386.exe"+23FE3
      
      "Tutorial-i386.exe"+23FD1: C9                             -  leave
      "Tutorial-i386.exe"+23FD2: C3                             -  ret
      "Tutorial-i386.exe"+23FD3: 00 00                          -  add [eax],al
      "Tutorial-i386.exe"+23FD5: 00 00                          -  add [eax],al
      "Tutorial-i386.exe"+23FD7: 00 00                          -  add [eax],al
      "Tutorial-i386.exe"+23FD9: 00 00                          -  add [eax],al
      "Tutorial-i386.exe"+23FDB: 00 00                          -  add [eax],al
      "Tutorial-i386.exe"+23FDD: 00 00                          -  add [eax],al
      "Tutorial-i386.exe"+23FDF: 00 53 89                       -  add [ebx-77],dl
      "Tutorial-i386.exe"+23FE2: C3                             -  ret
      // ---------- INJECTING HERE ----------
      "Tutorial-i386.exe"+23FE3: 81 BB 80 04 00 00 E8 03 00 00  -  cmp [ebx+00000480],000003E8
      // ---------- DONE INJECTING  ----------
      "Tutorial-i386.exe"+23FED: 75 2C                          -  jne Tutorial-i386.exe+2401B
      "Tutorial-i386.exe"+23FEF: 8B 83 68 04 00 00              -  mov eax,[ebx+00000468]
      "Tutorial-i386.exe"+23FF5: B2 01                          -  mov dl,01
      "Tutorial-i386.exe"+23FF7: 8B 8B 68 04 00 00              -  mov ecx,[ebx+00000468]
      "Tutorial-i386.exe"+23FFD: 8B 09                          -  mov ecx,[ecx]
      "Tutorial-i386.exe"+23FFF: FF 91 20 02 00 00              -  call dword ptr [ecx+00000220]
      

      Документация кому интересно

      MemoryRecord Class:
      The memoryrecord objects are the entries you see in the addresslist

      properties
      ID: Integer - Unique ID
      Index: Integer - The index ID for this record. 0 is top. (ReadOnly)
      Description: string- The description of the memory record
      Address: string - Get/set the interpretable address string. Useful for simple address settings.
      AddressString: string - Get the address string shown in CE (ReadOnly)
      OffsetCount: integer - The number of offsets. Set to 0 for a normal address
      Offset[] : integer - Array to access each offset
      OffsetText[] : string - Array to access each offset using the interpretable text style

      CurrentAddress: integer - The address the memoryrecord points to
      VarType: ValueType (string) - The variable type of this record. See vtByte to vtCustom
      Type: ValueType (number) - The variable type of this record. See vtByte to vtCustom
      If the type is vtString then the following properties are available:
      String.Size: Number of characters in the string
      String.Unicode: boolean
      String.Codepage: boolean

      If the type is vtBinary then the following properties are available
      Binary.Startbit: First bit to start reading from
      Binary.Size : Number of bits

      If the type is vtByteArray then the following properties are available
      Aob.Size : Number of bytes

      CustomTypeName: String - If the type is vtCustom this will contain the name of the CustomType
      Script: String - If the type is vtAutoAssembler this will contain the auto assembler script
      Value: string - The value in stringform.
      Selected: boolean - Set to true if selected (ReadOnly)
      Active: boolean - Set to true to activate/freeze, false to deactivate/unfreeze
      Color: integer
      ShowAsHex: boolean - Self explanatory
      ShowAsSigned: boolean - Self explanatory
      AllowIncrease: boolean - Allow value increasing, unfreeze will reset it to false
      AllowDecrease: boolean - Allow value decreasing, unfreeze will reset it to false
      Collapsed: boolean - Set to true to collapse this record or false to expand it. Use expand/collapse methods for recursive operations.
      IsGroupHeader: boolean - Set to true if the record was created as a Group Header with no address or value info. (ReadOnly)
      IsReadable: boolean - Set to false if record contains an unreadable address. NOTE: This property will not be set until the value property is accessed at least once. (ReadOnly)

      Options: String set - a string enclosed by square brackets filled with the options seperated by a comma. Valid options are: moHideChildren, moActivateChildrenAsWell, moDeactivateChildrenAsWell, moRecursiveSetValue, moAllowManualCollapseAndExpand, moManualExpandCollapse

      DropDownLinked: boolean - if dropdown list refers to list of another memory record eg. (memrec name)
      DropDownLinkedMemrec: string - Description of linked memrec or emptystring if not linked
      DropDownList : StringList - list of "value:description" lines, lists are still separate objects when linked, read-write
      DropDownReadOnly: boolean - true if 'Disallow manual user input' is set
      DropDownDescriptionOnly: boolean - self explanatory
      DisplayAsDropDownListItem: boolean - self explanatory
      DropDownCount: integer - equivalent to .DropDownList.Count
      DropDownValue[index] : Array to access values in DropDownList (ReadOnly)
      DropDownDescription[index] : Array to access Descriptions in DropDownList (ReadOnly)

      Count: Number of children
      Child[index] : Array to access the child records
      [index] = Child[index]
      Parent: MemoryRecord - self explanatory

      HotkeyCount: integer - Number of hotkeys attached to this memory record
      Hotkey[] : Array to index the hotkeys

      Async: Boolean - Set to true if activating this entry will be asynchronious. (only for AA/Lua scripts)
      AsyncProcessing: Boolean - True when async is true and it's being processed
      AsyncProcessingTime: qword - The time that it has been processing in milliseconds

      OnActivate: function(memoryrecord,before,currentstate):boolean - The function to call when the memoryrecord will change (or changed) Active to true. If before is true, not returning true will cause the activation to stop.
      OnDeactivate: function(memoryrecord,before,currentstate):boolean - The function to call when the memoryrecord will change (or changed) Active to false. If before is true, not returning true will cause the deactivation to stop.
      OnDestroy: function() - Called when the memoryrecord is destroyed.
      OnGetDisplayValue: function(memoryrecord,valuestring):boolean,string - This function gets called when rendering the value of a memory record. Return true and a new string to override the value shown
      DontSave: boolean - Don't save this memoryrecord and it's children

      methods
      getDescription()
      setDescription()
      getAddress() : Returns the interpretable addressstring of this record. If it is a pointer, it returns a second result as a table filled with the offsets
      setAddress(string) : Sets the interpretable address string, and if offsets are provided make it a pointer

      getOffsetCount(): Returns the number of offsets for this memoryrecord
      setOffsetCount(integer): Lets you set the number of offsets

      getOffset(index) : Gets the offset at the given index
      setOffset(index, value) : Sets the offset at the given index

      getCurrentAddress(): Returns the current address as an integer (the final result of the interpretable address and pointer offsets)

      appendToEntry(memrec): Appends the current memory record to the given memory record

      getHotkey(index): Returns the hotkey from the hotkey array
      getHotkeyByID(integer): Returns the hotkey with the given id

      reinterpret()
      createHotkey({keys}, action, value OPTIONAL): Returns a hotkey object

      disableWithoutExecute(): Sets the entry to disabled without executing the disable section

      global events
      function onMemRecPreExecute(memoryrecord, newstate BOOLEAN):
      If above function is defined it will be called before action* has been performed.
      Active property is about to change to newState.

      function onMemRecPostExecute(memoryrecord, newState BOOLEAN, succeeded BOOLEAN):
      If above function is defined it will be called after action*.
      Active property was supposed to change to newState.
      If 'succeeded' is true it means that Active state has changed and is newState.

      newState and succeeded are read only.

      *action can be: running auto assembler script (ENABLE or DISABLE section), freezing and unfreezing.

      написал в Приёмы ce lua фишки ce aa
      MasterGHM
      MasterGH
    • Выполить текст, как код

      Функция loadstring исполняет строку кода как функцию.

      f = loadstring ("print 'hello, world'")
      f ()   --> hello, world
      

      Есть еще и такая функция как string.dump. Она создает строку из функции

      function f () print "hello, world" end
      s = string.dump (f)
      \-- Можно строку тут же запустить как код
      loadstring (s) () --> hello, world
      

      Если по обратной связи строить и исполнять строку кода, то предположительно можно генерировать код другим кодом и учитывать гораздо больше условий, чем это может сделать человек.

      Пригодится для ИИ отладки и для ИИ бота.

      Код пишет другой код по обратной связи. Реальность?

      написал в Приёмы фишки ce lua loadstring
      MasterGHM
      MasterGH
    • CE Lua ColorPicker (скрытый компонент)

      Чтобы получить цвет из компонента нужно найти его на форме CE через Lazarus. Этот компонент нельзя найти визуально, он скрыт.

      function MainLuaProgramm()
      
        -- Глобальная форма mainForm
        local visibleState = true
        mainForm = createForm(visibleState)
        
        local testButton = createButton(mainForm)
        testButton.Caption = 'Set Color'
        testButton.onClick = function (sender)
      	local colorDialog = getMainForm().findComponentByName("ColorDialog1")
      	if(colorDialog.Execute()) then
      		mainForm.Color = colorDialog.Color
      		print(string.format('%08X',mainForm.Color))
      	end
        end
        
      end
      
      MainLuaProgramm()
      

      Узнал об этом случайно, когда зашел на форум Cheat Engine в тему расширений на Lua. Теперь в дизассемблере можно будет быстренько цвета менять
      dd4b8ef7-573e-442e-8dea-2e96b9638dc6-изображение.png

      написал в Плагин-строй ce plugin ce lua ce components
      MasterGHM
      MasterGH
    • Сверточные сети от МФТИ (лекция)
      Лекция. Сверточные нейронные сети

      Для тех, кто давно пытается понять, что такое сверточная сеть и как она работает (для меня например)

      Ну еще и сюда

      написал в Видео cnn
      MasterGHM
      MasterGH
    • Обзор игры STELLARIS

      Космическая стратегия

      Всё о «STELLARIS» за 20 минут

      Готовые скрипты для этой игры от самого Recifense.
      Попробовать сделать самому, а потом посмотреть готовые - ссылка

      Todo: добавить плагин просмотрщик youtube видео. Создать чат в discord, telegram.

      написал в Видео todo обзор игра
      MasterGHM
      MasterGH
    • RE: Защита Трейнера

      Да, косяки. Еще не поправил. Я кидаю из буфера. т.е. делать скрин в буфер и вставить.
      Если с телефона, то скрин на телефоне двумя кнпками делается выкл и убавить грумкость. Но он захватит весь экран. Либо ждать, когда я поправлю

      написал в Вопросы
      MasterGHM
      MasterGH
    • RE: Защита Трейнера

      Тогда добавить 4 раза разные имена

      getAutoAttachList().add("game1.exe")
      getAutoAttachList().add("game2.exe")
      getAutoAttachList().add("game3.exe")
      getAutoAttachList().add("game4.exe")
      

      Т.е. вместо одной строки будет уже 4 и более

      написал в Вопросы
      MasterGHM
      MasterGH
    • CE вывод списка записей и вывод свойств компонентов

      Бывает полезно посмотреть быстро списки данных и даже поискать что-то в них

      getPropertyList() — возвращает список срок свойств компонента
      showSelectionList() — отображает компонент с поиском этих свойств
      Подробнее смотри документацию.

      Документация
      521c110c-d0f4-43d3-9e83-9a88e110c7c2-изображение.png

      Как пример посмотрим список свойств главной формы и выберем любое свойство

      local mainForm = getMainForm()
      local listProperties = getPropertyList(mainForm)
      local allowCustomInput = false
      local id, name = showSelectionList("Title", "Caption", listProperties, allowCustomInput)
      print ('Index: '..id..", Name: "..name)
       --> Примеры выполнения: 
       --> Index: 55, Name: ShowHint 
       --> Index: 10, Name: Top 
      

      После выполнения Lua скрипта вот такой диалог появится. Можно искать свойство через ввод текста
      0e3f2131-fdfb-4ed3-8919-62578d090e69-изображение.png

      showSelectionList(title, caption, stringlist, allowCustomInput OPTIONAL): integer,string

      • Shows a menu with the given list. It returns the linenumber (starting at 0) and the selected string. Linenumber is -1 if the user was allowed to enter custom input

      Список строк (Stringlist Class) используют:

      createStringlist(): Strings - постой список
      getAutoAttachList(): Strings - список имен процессов для автоподключения
      getPropertyList(class) : Strings - список свойств
      getCommonModuleList(): Strings - список пропускаемых при сканировании модулей
      getProcesslist(Strings) - список процессов
      getWindowlist(Strings) - список окон
      getThreadlist(Strings) - список потоков
      Database.Params: Strings - свойство базы данных SQL
      ListItem.SubItems: Strings - свойство подстрок в визуальном компоненте списка
      ComboBox.Items: Strings - комбобокс
      Memo.Lines: Strings - мемо компонент
      RadioGroup.Items: Strings - компонент RadioGroup
      ListBox.Items: Strings - компонент ListBox
      FileDialog.Files: Strings - выбранные файлы в диалоге

      написал в Плагин-строй ce lua ce plugin ce components userdata
      MasterGHM
      MasterGH
    • RE: Защита Трейнера

      @Pitronic ок

      написал в Вопросы
      MasterGHM
      MasterGH
    • RE: Защита Трейнера

      Т.е. подкючает автоаттач getAutoAttachList().add("Tutorial-i386.exe")

      А после обработка события аттача

      function onOpenProcess()
        autoAssemble(aa_script)
      end
      
      написал в Вопросы
      MasterGHM
      MasterGH
    • RE: Защита Трейнера

      Tutorial-i386_pitronic.CT

      написал в Вопросы
      MasterGHM
      MasterGH
    • RE: Защита Трейнера

      тогда так

      local aa_script =
      [[aobscan(_step_1_,81xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxB2xx8Bxxxxxxxxxx8BxxFFxxxxxxxxxx8BxxxxxxxxxxB2xx8Bxxxxxxxxxx8BxxFFxxxxxxxxxxxxxx00xx00xxxx89)
      alloc(newmem_step_1_,$1000)
      alloc(constant,$1000)
      
      label(code_step_1_)
      label(return_step_1_)
      label(f_step_1_)
      label(address_step_1_)
      
      registersymbol(_step_1_)
      registersymbol(f_step_1_)
      registersymbol(address_step_1_)
      
      constant:
      
      f_step_1_:
      dd 0
      
      address_step_1_:
      dd db 00 00 00 00
      
      newmem_step_1_:
      pushad
      lea eax,[ebx+00000480]
      mov [address_step_1_],eax
      
      cmp [f_step_1_],1
      jne code_step_1_
      mov  [ebx+00000480],#1000
      
      code_step_1_:
      cmp [ebx+00000480],000003E8
      popad
      jmp return_step_1_
      
      _step_1_:
      jmp newmem_step_1_
      db 90 90 90 90 90
      return_step_1_:
      ]]
      
      getAutoAttachList().add("Tutorial-i386.exe")
      
      function onOpenProcess()
        autoAssemble(aa_script)
      end
      
      написал в Вопросы
      MasterGHM
      MasterGH
    • RE: Защита Трейнера

      А все, понял. Сейчас

      написал в Вопросы
      MasterGHM
      MasterGH
    • RE: Защита Трейнера

      т.е. смысл какой.

      1. getAutoAttachList().add("Tutorial-i386.exe")
        добавляет в поиск процесс "Tutorial-i386.exe

      2. А это сработает при подключении

      function onOpenProcess()
          getAddressList().getMemoryRecordByDescription('f_step_1_').Active = true
      end
      
      написал в Вопросы
      MasterGHM
      MasterGH
    • RE: Защита Трейнера

      Все, готово
      [Tutorial-i386_pitronic.CT](Похоже, что-то пошло не так в процессе обработки ответа сервера.)

      getAutoAttachList().add("Tutorial-i386.exe")
      
      function onOpenProcess()
          getAddressList().getMemoryRecordByDescription('f_step_1_').Active = true
      end
      
      local aa_script =
      [[
      aobscan(_step_1_,81xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxB2xx8Bxxxxxxxxxx8BxxFFxxxxxxxxxx8BxxxxxxxxxxB2xx8Bxxxxxxxxxx8BxxFFxxxxxxxxxxxxxx00xx00xxxx89)
      alloc(newmem_step_1_,$1000)
      alloc(constant,$1000)
      
      label(code_step_1_)
      label(return_step_1_)
      label(f_step_1_)
      label(address_step_1_)
      
      registersymbol(_step_1_)
      registersymbol(f_step_1_)
      registersymbol(address_step_1_)
      
      constant:
      
      f_step_1_:
      dd 0
      
      address_step_1_:
      dd db 00 00 00 00
      
      newmem_step_1_:
      pushad
      lea eax,[ebx+00000480]
      mov [address_step_1_],eax
      
      cmp [f_step_1_],1
      jne code_step_1_
      mov  [ebx+00000480],#1000
      
      code_step_1_:
      cmp [ebx+00000480],000003E8
      popad
      jmp return_step_1_
      
      _step_1_:
      jmp newmem_step_1_
      db 90 90 90 90 90
      return_step_1_:
      ]]
      autoAssemble(aa_script)
      
      написал в Вопросы
      MasterGHM
      MasterGH
    • RE: Защита Трейнера

      А, ну да. Вижу свои строки. Т.е. тебе надо активирующий скрипт перенести в главную таблицу

      написал в Вопросы
      MasterGHM
      MasterGH
    • RE: Рубрика "Lua код сегодня" №5 (активирующий скрипт)

      Можно оставить одно из двух
      c8bf02d0-d9d8-44f9-a896-b27578d19514-изображение.png

      написал в Обучающие примеры
      MasterGHM
      MasterGH
    • 1
    • 2
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 10 / 13