Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 85

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
Some questions about Tibiasock.dll
Results 1 to 9 of 9

Thread: Some questions about Tibiasock.dll

  1. #1
    Junior Member
    Join Date
    Jul 2013
    Location
    Germany
    Posts
    12

    Question Some questions about Tibiasock.dll

    Hello!

    While looking at the Tibiasock code (https://code.google.com/p/tibiasock/...ck/dllmain.cpp), I noticed some things I could use some clarification on:

    • The main thread is suspended to avoid synchronization problems when calling a function, is that right?
    • Executing code is done by codecaving and calling CreateRemoteThread on them. Why aren't they called directly in the DLL?
    • Why does this work?
      Code:
      BYTE* CreateOutgoingBuffer(BYTE* dataBuffer, int length)
      {
              BYTE actualBuffer[1024];
              ZeroMemory((LPVOID)actualBuffer, 8);
              memcpy((LPVOID)&actualBuffer[8], (LPVOID)dataBuffer, length-8);
              return actualBuffer; // stack-allocated
      
      }


    Thanks for reading
    Last edited by a3f; 05-18-2014 at 05:42 PM.

  2. #2
    Senior Member
    Join Date
    Dec 2011
    Posts
    249
    Yes, it's freezing the main thread to stop the Tibia client itself from using the function that you are currently editing.

    The particular code shown on that page is used for external packet sendin (No DLL injection). You can however do exactly the same while injected.

  3. #3
    Junior Member
    Join Date
    Jul 2013
    Location
    Germany
    Posts
    12
    Oh, somehow I thought the dll was meant to be injected... Stupid me

    Regarding the snippet above, why isn't that undefined behaviour?

  4. #4
    Senior Member
    Join Date
    Dec 2011
    Posts
    249
    I don't know why it should be undefined behaviour? Why would it be?

  5. #5
    Quote Originally Posted by a3f View Post
    Oh, somehow I thought the dll was meant to be injected... Stupid me

    Regarding the snippet above, why isn't that undefined behaviour?
    That was a noob coding mistake on my part when I wrote the code, haha. Just happens to work because the code that's using it has a lower stack frame.

    Quote Originally Posted by ottizy View Post
    I don't know why it should be undefined behaviour? Why would it be?
    The BYTE [] is allocated on the stack and then a pointer to it is returned. If the caller were to call another function, it is very likely that function would overwrite parts of the buffer with its own stack frame.

  6. #6
    Senior Member
    Join Date
    Dec 2011
    Posts
    249
    Quote Originally Posted by DarkstaR View Post
    That was a noob coding mistake on my part when I wrote the code, haha. Just happens to work because the code that's using it has a lower stack frame.



    The BYTE [] is allocated on the stack and then a pointer to it is returned. If the caller were to call another function, it is very likely that function would overwrite parts of the buffer with its own stack frame.

    Ah okay, so
    Code:
    BYTE *actualBuffer = new BYTE[1024];
    would be the way to go?

  7. #7
    Quote Originally Posted by ottizy View Post
    Ah okay, so
    Code:
    BYTE *actualBuffer = new BYTE[1024];
    would be the way to go?
    I'd probably use "auto actualBuffer = std::shared_ptr<BYTE>(new BYTE[1024]);", and set a fitting return type.
    I really don't like returning new'd things from functions, it's memory leak city, and I've learned the hard way haha

  8. #8
    Junior Member
    Join Date
    Jul 2013
    Location
    Germany
    Posts
    12
    Quote Originally Posted by DarkstaR View Post
    Just happens to work because the code that's using it has a lower stack frame.
    Ah, that makes sense. Thanks for the help, you two.

  9. #9
    Senior Member
    Join Date
    Mar 2024
    Location
    United States
    Posts
    3,873

    business plan psychologist

    Alvin Walters from San Buenaventura was looking for business plan psychologist

    Pedro Quinn found the answer to a search query business plan psychologist


    ESSAYERUDITE.COM





    business plan psychologist










    luc sante resume
    ordering the african imagination essays on culture and literature
    how to write tone
    cambridge history coursework
    black stallion book report
    cheap thesis statement ghostwriter site for masters
    how to write sidebars
    internet experience essay
    education in resume in progress
    popular dissertation editor website for university
    thesis theme for blogger free download
    write a report letter
    credit and collections resume
    literary analysis of moll flanders
    cheap personal statement writing service uk
    an essay about family relationships
    essays on otherness
    help with college english homework
    sample of a supplier business plan
    esl best essay editor for hire for college
    custom academic essay editing service for phd
    cover letter to woman ms or mrs
    jet engine research paper
    resume writing com
    essay on jewish holidays
    resume of a clerk typist
    how to write a referrence letter for free
    write a letter to hill 30
    english as level commentary coursework
    essay miscellaneous papers papers research town
    essay for college samples
    controversial issue essay ideas
    popular school essay editing services for phd
    thesis antithesis synthesis mcat
    essay tungkol sa buhay
    how to write happy mothers day
    esl blog post writers website for university
    resume double major sample
    breastfeeding vs bottle feeding research papers
    ocr history coursework a2
    canterbury tales essays knight
    democrat and republican essay
    best best essay writing websites online
    oedipus blindness thesis
    college board ap essay us history
    community college professor resume objective
    cover letter for resume fresh graduate malaysia
    custom thesis writers for hire for university
    cover letter examples for university
    cpr chemistry essay
    help me write shakespeare studies homework
    esl personal essay writing service uk
    do my geometry report
    college application essay first sentence
    doll business plan
    sample resume telecommunications career objectives
    pat mora immigrants essay
    dissertation completion fellowship harvard
    cheap research paper writer services gb
    are the social sciences really inferor philosophy essay n filmbay iv html
    sample resume with multiple positions at one company
    professional critical thinking editing website ca
    fundamentalism essay
    custom creative essay ghostwriting service usa
    professional course work writer websites for school
    media planner cover letter
    easy essay on a rainy day
    desktop support resume samples
    cover letter examples for behavior interventionist
    causes of ww1 essay imperialism
    popular thesis writer sites for mba
    did sousa not write a march
    china essays globalization
    esl college dissertation help
    best school case study
    hedge fund business plan ms wordexcel
    prep cook resume templates
    best analysis essay editing for hire uk
    types of essays persuasive
    mother returning resume sample
    professional mba essay writers sites ca
    no gpa no essay scholarships
    othello thesis
    video production business plan
    summary statement examples essay
    write a program of online help example in j2me
    pay for my custom critical essay on brexit
    commercial airline pilot resume
    resume format for sales engineers
    research essays salem witch trials
    buy theater studies dissertation methodology
    popular course work proofreading services us
    how to write a good book report introduction
    implicit thesis
    fhow to write a letter of reinstatement for employment
    dexter the tough book report

    esl best essay ghostwriting site us
    book report in scorpio
    how to write a title page for a research paper apa style
    make resume dairy queen
    popular writers websites ca
    resume integratation hl7 healthcare hospital clinic
    first day of school essay ideas

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •