Jump to content

zero byte problem


Recommended Posts

since the new version php isnt able anymore to detect zero bytes () sent by autoit

in version 3.1.1.114(or so^^) it worked with chr(0)

any solution to get php detecting my zerobytes with the new autoit versions?

Link to comment
Share on other sites

since the new version php isnt able anymore to detect zero bytes () sent by autoit

in version 3.1.1.114(or so^^) it worked with chr(0)

any solution to get php detecting my zerobytes with the new autoit versions?

What AutoIt function were you using to send Chr(0) to PHP, back when it worked?

:whistle:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

PHP is an interpreter. How could you send anything to it?

So is AutoIt. Send from an AutoIt (script) to a PHP (script) makes sense to me.

:whistle:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

TCPSend($ConnectedSocket,"data to send" & Chr(0))

php checks for the last sign, if it matches a zero byte the connection gets closed

$readEndCharacter="/0";
    while( $buf = @socket_read( $this->clientFD[$clientId], $this->readBufferSize ) )
        {
            $data   .=  $buf;

            $endString  =   substr( $buf, - strlen( $this->readEndCharacter ) );
            if( $endString == $this->readEndCharacter )
                break;
        }

:whistle:

Edited by kned
Link to comment
Share on other sites

TCPSend($ConnectedSocket,"data to send" & Chr(0))

php checks for the last sign, if it matches a zero byte the connection gets closed

$readEndCharacter="/0";
    while( $buf = @socket_read( $this->clientFD[$clientId], $this->readBufferSize ) )
        {
            $data   .=  $buf;

            $endString  =   substr( $buf, - strlen( $this->readEndCharacter ) );
            if( $endString == $this->readEndCharacter )
                break;
        }

:lmao:

I don't know why you wouldn't get a NUL for Chr(0), but perhaps Binary(0x0) would get it?

:whistle:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

if i use macromedia flash to send things to php, then php calls the last char "" (zerobyte)

if i use binary(0x0) in autoit, php gets "0x00000000"

if i use chr(0) php gets "0"

any ideas? t.t

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...