GithubHelp home page GithubHelp logo

Comments (5)

fffonion avatar fffonion commented on May 26, 2024

qq 20151017024538
不会吧 现在的正则echo $ret|grep -oE "userID..[0-9]{9}"匹配不到中文啊

from xunlei-fastdick.

oscar-c avatar oscar-c commented on May 26, 2024

我觉得是不是匹配的问题,而是grep在扫过“商务合作付费”之后就坏掉了,所以每次都没能获得有效的userID。

我加了一个 echo $ret 在请求 login.mobile.reg2t.sandai.net 那一行的后面,然后payName那一栏是是这样的 "payName":"???????????"

是编码的原因吧。

我试着在 $HTTP_REQ https://login.mobile.reg2t.sandai.net:443/ ..... 后面加上了一个 | iconv -f GB2312"echo $ret输出的 payName那一栏里就能正经输出“商务合作付费”的中文了,grep也能找到userID了

from xunlei-fastdick.

fffonion avatar fffonion commented on May 26, 2024

哦我懂了grep把它当成binary file了……
gnu grep可以加上-a解决
osx版的grep貌似加了-a也没啥卵用……

from xunlei-fastdick.

yaodwwy avatar yaodwwy commented on May 26, 2024

我学的是java,对linux还刚刚入门,拿这个研究刚刚好,哈哈

from xunlei-fastdick.

oscar-c avatar oscar-c commented on May 26, 2024

奇怪的是貌似就只有登录时的回复候需要iconv来转换一下,
upgrade的时候的回复虽然也返回中文,但是却没有这种问题。

from xunlei-fastdick.

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.