Filter Trader Fix Help!


from phBot import *
from threading import Timer
import phBotChat
import struct
import re

pName = 'JobSecure'
pVersion = '0.0.2'
#pUrl = ''

# ______________________________ Initializing ______________________________ #

BOT_NAME = "JobSecure"

# Globals
findMasterName = None

# ______________________________ Methods ______________________________ #

# Request party match data
def Inject_RequestPartyMatch(pageIndex=0):
    p = struct.pack('B',pageIndex)

# ______________________________ Events ______________________________ #

# All chat messages received are sent to this function
def handle_chat(t,player,msg):
    # Check if is bot system nickname
    if player == BOT_NAME:
        # Asking press E
        if "E'ye bas." in msg:
            # Check if is asking for party match
            check ='Write me PartyNo of ([a-zA-Z0-9_]*)',msg)
            if check:
                # Start scanning party match list to find the player
                global findMasterName
                findMasterName = check[1]
                log("Plugin: Starting Party Match scanner for \""+findMasterName+"\"...")

# All packets received from Silkroad will be passed to this function
# Returning True will keep the packet and False will not forward it to the game server
def handle_joymax(opcode,data):
    if opcode == 0xB06C:
        global findMasterName
        # Check if is scannnig
        if findMasterName:
            # Check success
            if data[0] != 1:
                log("Plugin: Party match request error!")
                findMasterName = None
                return True

            # The cursor to read the packet properly
            packetIndex = 1

            # page match setup
            pageCount = data[packetIndex]
            pageIndex = data[packetIndex]
            partyCount = data[packetIndex]

            log("Plugin: Scanning Party Match ("+str(pageIndex+1)+"/"+str(pageCount)+")...")
            partyNumber = None
            # Check match by match
            for i in range(partyCount):
                number = struct.unpack_from("<I",data,packetIndex)[0]
                # Extract master name
                masterNameLength = struct.unpack_from('<H',data,packetIndex)[0]
                masterName = struct.unpack_from('<'+str(masterNameLength)+'s',data,packetIndex)[0].decode('cp1252')

                # Check the master name
                if findMasterName == masterName:
                    partyNumber = number

                # skip data
                titleLength = struct.unpack_from('<H',data,packetIndex)[0]

            # Check if party has been found
            if partyNumber == None:
                nextPage = pageIndex+1
                if nextPage < pageCount:
                    # wait 1 second to request the next page
                    log("Plugin: Party Match with \""+findMasterName+"\" as master doesn't exists")
                    findMasterName = None
                log("Plugin: Party Match #"+str(partyNumber)+" from \""+findMasterName+"\"")
                # Stop process
                findMasterName = None
                # Answering to the bot
    return True

# Plugin loaded
log('Plugin: '+pName+' v'+pVersion+' succesfully loaded')

With Guard, you send "null" between the characters in each message to the client. Afterwards, this message sent to the client is cleared from null, ie 0x00, in the package handler and forwarded to the chat handlers in its pure form. Logically smart but not safe: giggle:

Then you start the 2-step query to the player by checking the 0x7046 package. When I registered, there was no pt form, it automatically switched to the random no query, but there was no hitch because I had bypassed both possibilities: ohye:

You ask the player to open PT Form. When it is opened, you check the current list. However, you have a mistake here too.
The guard does not see it when there is even 1 pt number. 2 and above only works ...

Next, you want the player to pm the target number to the fake character "[K-Prevent]". Your whole phbot blocking system consists of this ...

You do not reset the system after teleport. In other words, the query system works "1" time for each character until you log in and exit the game.

how can I bypass. Someone did that.

Photo bypass: