Git Product home page Git Product logo

Comments (1)

Joungkyun avatar Joungkyun commented on August 11, 2024

I tested it with the files at https://github.com/Joungkyun/JSBoard/tree/master/include. But it was done without problems.

Perhaps there is a possibility to generate segfulat from php code to encrypt.

Using gdb to give the back trace information at the point where segfault occurred will help to fix the bug.

[root@host ~]# gdb /usr/bin/php
gdb> run encrypt.php
... segfault occur
gdb> bt
..blah blah..

Alternatively, you can give us code that can be reproduced to help us fix the bug. It seems that you can encrypt the files in phpmi.txt one by one and find the file where segault occurs.

My test results are as follows:

test environments

PHP: 7.0.26 + some official patch
OS: CentOS 7.4

phpmi.txt:

include/check.php
include/error.php
include/exec.php
include/get.php
include/header.php
include/lang.php
include/list.php
include/mysql-wrapper.php
include/ostype.php
include/parse.php
include/prelist.php
include/print.php
include/replicate.php
include/sURI.php
include/sendmail.php
include/spam_check.php
include/sql.php
include/sqli.php
include/variable.php
include/version.php
include/wikify.php

encrypt code:

#!/usr/bin/php
<?php

$path='./phpmi.txt';
if(file_exists($path)){
    $res=file_get_contents($path);
    $arr=explode("\n",$res);
    foreach($arr as $k=>$v){
        if($v){
            $script=file_get_contents($v);
            $encode=screwim_encrypt($script);
            $result=file_put_contents($v,$encode);
            if($result){
                echo $v."--Successed !\n";
            }else{
                echo $v."--failed !\n";
            }
        }
    }
    echo  count($arr)."Complete\n";
}
?>

Result:

include/check.php--Successed !
include/error.php--Successed !
include/exec.php--Successed !
include/get.php--Successed !
include/header.php--Successed !
include/lang.php--Successed !
include/list.php--Successed !
include/mysql-wrapper.php--Successed !
include/ostype.php--Successed !
include/parse.php--Successed !
include/prelist.php--Successed !
include/print.php--Successed !
include/replicate.php--Successed !
include/sURI.php--Successed !
include/sendmail.php--Successed !
include/spam_check.php--Successed !
include/sql.php--Successed !
include/sqli.php--Successed !
include/variable.php--Successed !
include/version.php--Successed !
include/wikify.php--Successed !
22Complete

from mod_screwim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.