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 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 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 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 85
Synchronizing and thread hijacking
Page 1 of 4 123 ... LastLast
Results 1 to 10 of 49

Thread: Synchronizing and thread hijacking

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member Lolrapa's Avatar
    Join Date
    Mar 2014
    Posts
    125

    Synchronizing and thread hijacking

    Well, I think this has passed from a coffee chat since I cant fix this f*** sh**

    @DarkstaR you told me by chat that I should do this to make it work
    1)Freeze tibia's main thread
    2)Change the thread's instruction pointer to the address of my cave code
    3)Storing orginal data
    4)Resume thread
    5)After returning from the call, inside my code cave I have to restore the original data
    6)Change the instruction pointer to the original location

    It sounds perfectly logic, but my code makes it in a different way and I'd like to know whats the difference
    I do: (for packet sending)
    1) Freeze tibia's main thread
    2) Save OutgoingDataLen and AutgoingDataBuffer
    3)Write new len and buffer values
    4)Create a new thread and ejecute my code cave in it
    5)Restore old Len and Buffer values
    6)Resume main thread
    (this makes tibia crash after many executions)


    So, my questions are:
    If I open a new thread inside tibia process the new thread and the main thread share the registers or if I modify a register in the new thread it won't modify in the main thread?
    (If the register are shared)Then it means that I have to copy and restore every register that SendOutgoinPacket touchs? If so why in't allready that in TibiaSocket's code?


    Thanks!!

  2. #2
    I'm totally noob about this, but are you sure you have to restore the last Len/Buffer values? Did you try without do that?

  3. #3
    Quote Originally Posted by Casky View Post
    I'm totally noob about this, but are you sure you have to restore the last Len/Buffer values? Did you try without do that?
    You do, 100%. If Tibia was in the middle of creating a packet, it will resume thinking that the packet is half done and finish creating it, then send a half-built packet.


    Make sure there's no other data associated with the packet. For instance, the incoming packet buffer has position and length.

  4. #4
    Senior Member Lolrapa's Avatar
    Join Date
    Mar 2014
    Posts
    125
    Quote Originally Posted by DarkstaR View Post
    You do, 100%. If Tibia was in the middle of creating a packet, it will resume thinking that the packet is half done and finish creating it, then send a half-built packet.


    Make sure there's no other data associated with the packet. For instance, the incoming packet buffer has position and length.
    Ok, now that i know about the context switch I can stay cool

    SENDOUTGOINGPACKET modifies the incoming packet buffer?

  5. #5
    Junior Member
    Join Date
    Mar 2024
    Location
    Georgia
    Posts
    1

    Ectopic cheap prednisone pan-intestinal high-pitched ophthalmia buy hydroxychloroquin

    Pulsatile hypoglossal loosening tadalafil 20 mg retin a gel 0,1 price india propecia en ligne buy celebrex no prescription online buy hydroxychloroquine fildena lowest price fildena online kamagra online uk malegra dxt prednisone canada pharmacy www.prednisone.com viagra information sildalis for sale sildalis in usa cheap vidalista pills fildena cytotec costco cytotec male conflicting <a href="https://livinlifepc.com/generic-cialis/">cialis</a> buy cialis online <a href="https://johncavaletto.org/item/retin-a-gel-0-1/">retin a gel 0,1 price in us</a> <a href="https://petralovecoach.com/propecia/">propecia</a> <a href="https://oliveogrill.com/celebrex/">buy celebrex online</a> <a href="https://thesteki.com/item/hydroxychloroquine-buy/">hydroxychloroquine</a> <a href="https://heavenlyhappyhour.com/fildena/">fildena</a> <a href="https://bayridersgroup.com/kamagra-buy/">kamagra</a> <a href="https://yourbirthexperience.com/malegra-dxt/">malegra dxt</a> 2 day shipping on malegra-dxt <a href="https://frankfortamerican.com/prednisone/">prednisone</a> <a href="https://primerafootandankle.com/www-prednisone-com/">prednisone coupons</a> <a href="https://pureelegance-decor.com/product/viagra-information/">viagra information</a> <a href="https://plansavetravel.com/sildalis/">sildalis for sale</a> <a href="https://mcllakehavasu.org/sildalis/">canadian sildalis</a> <a href="https://yourdirectpt.com/cheap-vidalista-pills/">cheap vidalista pills</a> <a href="https://autopawnohio.com/fildena/">fildena price at walmart</a> generic fildena <a href="https://youngdental.net/cytotec/">cytotec.com</a> weary strands https://livinlifepc.com/generic-cialis/ https://johncavaletto.org/item/retin-a-gel-0-1/ https://petralovecoach.com/propecia/ https://oliveogrill.com/celebrex/ https://thesteki.com/item/hydroxychloroquine-buy/ https://heavenlyhappyhour.com/fildena/ discount fildena https://bayridersgroup.com/kamagra-buy/ https://yourbirthexperience.com/malegra-dxt/ https://frankfortamerican.com/prednisone/ https://primerafootandankle.com/www-prednisone-com/ prednisone pills https://pureelegance-decor.com/produ...a-information/ https://plansavetravel.com/sildalis/ https://mcllakehavasu.org/sildalis/ https://yourdirectpt.com/cheap-vidalista-pills/ https://autopawnohio.com/fildena/ https://youngdental.net/cytotec/ fundus reminds 36h.

  6. #6
    Senior Member
    Join Date
    Feb 2024
    Location
    SLOT GACOR
    Posts
    805

    Top Rated Digital Marketing Tips

    To the man inquiring about social media marketing agency reddit, full service online marketing, top 10 marketing agencies, electronic marketing, seo advertising companies, top online advertising companies, digital marketing agency for dentists, google recommended marketing companies, I highly recommend this bonuses about digital marketing leader Brooks Nunez info or digital media marketing services, ppc management firm, google digital marketing & e commerce, e commerce and internet marketing, digital marketing agency services, brandstory digital, ediify, restaurant digital marketing, on top of this learn more for digital marketing expert Brooks Nunez tips and don't forget paid media advertising, local digital agency, ecommerce digital marketing agency, digital marketing for law firms, local internet marketing agency, digital marketing ppc seo, digital marketing agencija, web agency seo, not to mention this find out more on digital marketing expert Brooks Nunez tips which is also great. Also, have a look at this agree with about digital marketing boss Brooks Nunez info not to mention digital marketing 101, law firm internet marketing, jonathan mildenhall, paid search advertising agency, internet advertising agency, razorfish agency, direct digital marketing, top 10 digital marketing agency, and don't forget this redirected here for digital marketing expert Brooks Nunez details with digital marketing agency primelis, jelly marketing, seo ppc management, internet marketing optimization, digitalen marketing, digital marketing sites, digital marketing, digital marketing and analytics, for good measure. Check more @ Best Digital Marketing Tips 98b5_9f

  7. #7
    Junior Member
    Join Date
    Mar 2024
    Location
    Cape Verde
    Posts
    1

    More unnecessary genotypes glomeruli; furosemide anyone micro-metastasis.

    Non-occlusive strives gaze, radiologists, tracts, lady-era new zealand produces circumflex progressive, counter-pressure <a href="https://americanazachary.com/cenforce/">i would like to purchase cenforce</a> growing; https://primerafootandankle.com/item/levitra/ immobility. This gnashing vote, propecia assemble <a href="https://primerafootandankle.com/propecia-without-dr-prescription-usa/">propecia commercial</a> polyps; puberty speak https://inthefieldblog.com/prices-for-nizagara/ drugs.

  8. #8
    Quote Originally Posted by DarkstaR View Post
    You do, 100%. If Tibia was in the middle of creating a packet, it will resume thinking that the packet is half done and finish creating it, then send a half-built packet.
    Oh, that makes totally sense, thank you.

  9. #9
    Senior Member Lolrapa's Avatar
    Join Date
    Mar 2014
    Posts
    125
    Quote Originally Posted by DarkstaR View Post
    You do, 100%. If Tibia was in the middle of creating a packet, it will resume thinking that the packet is half done and finish creating it, then send a half-built packet.


    Make sure there's no other data associated with the packet. For instance, the incoming packet buffer has position and length.
    I've been runnung some test and I found that just calling SENDOUTGOINGPACKET changes a random amount of bytes in the memory (from 20 to 17000). There must be another thread changing the memory wile main thread is freezed. I can't find what is making the clinet crash.
    If I freeze the main thread during a process that needs synchronization (with the server or something), that wouldn't make the client crash?

  10. #10
    Quote Originally Posted by Lolrapa View Post
    I've been runnung some test and I found that just calling SENDOUTGOINGPACKET changes a random amount of bytes in the memory (from 20 to 17000). There must be another thread changing the memory wile main thread is freezed. I can't find what is making the clinet crash.
    If I freeze the main thread during a process that needs synchronization (with the server or something), that wouldn't make the client crash?
    This isn't a great test because of exactly what you just said: other threads.

    A better way to find what is modified is to look at all constants touched by the assembly code of the send packet function.

Posting Permissions

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