Jump to content


Photo

Some packet help.....


    12 replies to this topic

    #1 fingleburt

    fingleburt

      Newbie

    • Members
    • Pip
    • 8 posts

      Posted 01 November 2014 - 06:16 AM

      Please forgive me but I'm new to lua coding, I have a question similar to Saydn http://forums.window...packets/?p=2504 ,except I dont want to cancel the packets but instead I would like the addon to output the parsed data to a text file, is that possible?

       



      #2 Arcon

      Arcon

        Advanced Member

      • Windower Staff
      • 1189 posts
      • LocationMunich, Germany

      Posted 01 November 2014 - 06:46 AM

      You can use the PacketViewer addon for that. Load it and type the following to log packet contents to a file:

      //pv log file 0x01E 0x01F 0x020 0x050

       

      This will log every occurrence of any of those packets to a file. Instead of file you can also log to console or to chatlog. You can also shorten it to //pv l f [list of packet IDs]. If you want to log all but a certain set of packets, you can do //pv log file not [list of IDs].

       

      You can also make the packet appear on screen in a text box and record previous packets then scroll through them:

      //pv track incoming 0x017; pv rec

       

      Then send yourself a few tells, you'll see a box appear with the packet dissected. To view previously tracked packets do //pv display n, where n is the index of the packet to display. If you tracked incoming 0x017 (the packet containing chat-info) and had 5 such packets come in, you can do //pv display 4 to show the fourth such packet. You can also hover over the display box and use the mouse wheel to scroll through all the previous packets.



      #3 fingleburt

      fingleburt

        Newbie

      • Members
      • Pip
      • 8 posts

        Posted 01 November 2014 - 04:57 PM

        That's exactly what I'm after, thank you. For some reason it wont log the packet's to a file, I've tried //pv log file 0x01E as an example but no log file is generated. Everything else though is spot on!

        #4 Arcon

        Arcon

          Advanced Member

        • Windower Staff
        • 1189 posts
        • LocationMunich, Germany

        Posted 02 November 2014 - 06:13 PM

        I had another report of logging to file not working if you're also tracking that packet (with //pv track). Is that the error you're observing? Or does file logging generally never work?



        #5 sdahlka

        sdahlka

          Advanced Member

        • Members
        • PipPipPip
        • 324 posts

          Posted 02 November 2014 - 06:24 PM

          every time i try to use the logger it eather crashes packetviewer or does nothing



          #6 fingleburt

          fingleburt

            Newbie

          • Members
          • Pip
          • 8 posts

            Posted 02 November 2014 - 08:48 PM

            Hi Arcon, yes the logging doesn't function for me. I do //pv log file 0x034, make a trade an there are no logs made, I see inside the lua file itself where it's supposed to log the data to but it just never creates the log file/chat directories. This is irrespective of trying an onscreen track as that seems to be working fine. Hope that helps.

            #7 Arcon

            Arcon

              Advanced Member

            • Windower Staff
            • 1189 posts
            • LocationMunich, Germany

            Posted 06 November 2014 - 11:24 AM

            Sorry, I just noticed that I told you something incorrect. Can you try again using this:

            //pv log file incoming 0x034

             

            I forgot the "incoming" above. Can you see if it works with that, please?



            #8 fingleburt

            fingleburt

              Newbie

            • Members
            • Pip
            • 8 posts

              Posted 06 November 2014 - 03:07 PM

              It look like it goes to write the log file: "PacketViewer Notice: New File: data/logs/full.log" But then I get a Lua error (runtime) error in the console which says: /Windower4//addons/libs/files.lua:29: attempt to index local 'fh' (a nil value) When I go to the data folder it's empty apart from the settings file. When I try this for outgoing aswell, I get nothing at all, no error, no file logged etc.

              #9 Arcon

              Arcon

                Advanced Member

              • Windower Staff
              • 1189 posts
              • LocationMunich, Germany

              Posted 06 November 2014 - 06:05 PM

              Are you sure that the outgoing packet was really sent?

              And thanks for that, I confirmed that it's an error with our file handling (or rather, directory creation for new files). I'll fix that at some point during the weekend, but I will be gone for a while, so I cannot say when exactly.



              #10 fingleburt

              fingleburt

                Newbie

              • Members
              • Pip
              • 8 posts

                Posted 06 November 2014 - 08:00 PM

                Hi Arcon,

                The outgoing packet was definitely sent as I made a trade to an NPC. No rush for a fix, just when you have time.

                #11 Arcon

                Arcon

                  Advanced Member

                • Windower Staff
                • 1189 posts
                • LocationMunich, Germany

                Posted 09 November 2014 - 02:13 AM

                For the record, I pushed a fix for that to the dev version of Windower. I'll push it live shortly.



                #12 fingleburt

                fingleburt

                  Newbie

                • Members
                • Pip
                • 8 posts

                  Posted 09 November 2014 - 03:01 AM

                  Thanks for pushing a fix Arcon, it works really well now for incoming packets, creates the files and folder's it should do. Unfortunately there's still a problem with outgoing packets, //pv log file outgoing 0x034, make a trade and no files are created or tracked(if doing //pv track outgoing 0x034; pv rec).



                  #13 Arcon

                  Arcon

                    Advanced Member

                  • Windower Staff
                  • 1189 posts
                  • LocationMunich, Germany

                  Posted 09 November 2014 - 01:31 PM

                  That's because 0x034 is only for incoming NPC interactions. For outgoing you'll want to be watching 0x01A. You should log all outgoing packets to console to see which packets are sent:

                  //pv l c o not 0x015

                   

                  This will log all outgoing packets to the console except 0x015 (because that is spammed a lot). That way you see exactly which packets are sent when you perform a certain action.






                  1 user(s) are reading this topic

                  0 members, 1 guests, 0 anonymous users