Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

您好,我想试着将其移植到android下使用,有些问题还望解答 #46

Closed
onewilk opened this issue Dec 9, 2014 · 18 comments

Comments

@onewilk
Copy link

onewilk commented Dec 9, 2014

我看了readme,需要如下依赖

脚本依赖

  • grep (GNU grep) 2.20
  • sed (GNU sed) 4.2.2
  • awk (GNU awk) 4.1.1
  • nmap v6.46
  • dig v9.9.2-P2
  • curl (OpenSSL/1.0.1j) 7.37.0

原谅我Linux水平太差,shell只能看懂其中一点。。。
据我所知以上的大多依赖需要busybox的支持,现有脚本直接放到手机里面跑不起来。。。
想问下您有移植到android上的打算么,或者能帮我理解下实现么。。。

@myisjon
Copy link
Contributor

myisjon commented Dec 9, 2014

移植到安卓是可以得,不过需要android的系统获得权限,不然在你没法修改android的hosts文件.

发自 Windows 邮件

发件人: onewilk
发送时间: ‎2014‎年‎12‎月‎9‎日, ‎星期二 ‎23‎:‎24
收件人: txthinking/google-hosts

我看了readme,需要如下依赖

脚本依赖
grep (GNU grep) 2.20
sed (GNU sed) 4.2.2
awk (GNU awk) 4.1.1
nmap v6.46
dig v9.9.2-P2
curl (OpenSSL/1.0.1j) 7.37.0

原谅我Linux水平太差,shell只能看懂其中一点。。。
据我所知以上的大多依赖需要busybox的支持,现有脚本直接放到手机里面跑不起来。。。
想问下您有移植到android上的打算么,或者能帮我理解下实现么。。。


Reply to this email directly or view it on GitHub.

@onewilk
Copy link
Author

onewilk commented Dec 10, 2014

这个root权限肯定是必须的,但是我的问题是那些脚本依赖在android上面可以找到相应的使用方式吗?

@onewilk
Copy link
Author

onewilk commented Dec 10, 2014

前面三个
grep (GNU grep) 2.20
sed (GNU sed) 4.2.2
awk (GNU awk) 4.1.1
都可以用busybox内置的,但是后面三个没啊...

@ghost
Copy link

ghost commented Dec 10, 2014

cp google-hosts /system/etc

google-hosts: 从git hub down下来的hosts
/system/etc: 安卓系统目录

可以用 RE explore 拷贝

在 2014年12月10日 上午10:27,onewilk notifications@github.com写道:

这个root权限肯定是必须的,但是我的问题是那些脚本依赖在android上面可以找到相应的使用方式吗?


Reply to this email directly or view it on GitHub
#46 (comment)
.

@onewilk
Copy link
Author

onewilk commented Dec 10, 2014

我的意思是在手机端自行更新ip生成host文件并替换,这样不必太过依赖github并且国内其实有些地方的网络环境下无法直接打开github的...我个人又不想维护一个host

@onewilk
Copy link
Author

onewilk commented Dec 10, 2014

你说的这种我实际上已经写好了一个demo了,现在就在自用...

@zhounanzhao
Copy link

@onewilk 希望您可以把您做的开源。

@txthinking
Copy link
Owner

  1. 第一次find.sh寻找IP生成output会比较慢, 因为要一个个测试IP
  2. 如果output目录已经有很多IP了, 若是不考虑IP的实时性, 后续select.sh会很快.

On Wed, Dec 10, 2014 at 3:26 PM, ZhouNanzhao notifications@github.com
wrote:

@onewilk https://github.com/onewilk 希望您可以把您做的开源。


Reply to this email directly or view it on GitHub
#46 (comment)
.

About Me: http://www.txthinking.com

@onewilk
Copy link
Author

onewilk commented Dec 11, 2014

@zhounanzhao 我现在只是下载下来然后替换哦,确定需要我就开出来

@onewilk
Copy link
Author

onewilk commented Dec 11, 2014

@txthinking 额...您还是没明白我的意思,我是想问,那几个脚本依赖库在android上面默认是没有的,我想问的是有啥办法解决依赖库的问题,不然您的脚本也没法执行啊...

@zhounanzhao
Copy link

@onewilk 这个开出来肯定是好事呢,我可以给您提供协助,如果你愿意的话。

@onewilk
Copy link
Author

onewilk commented Dec 11, 2014

@zhounanzhao 我现在想把@txthinking 的这个项目直接放到android端去执行自动查找可用ip然后替换host,现在的问题就是脚本的依赖
grep (GNU grep) 2.20
sed (GNU sed) 4.2.2
awk (GNU awk) 4.1.1
nmap v6.46
dig v9.9.2-P2
curl (OpenSSL/1.0.1j) 7.37.0
前面3个可以用busybox中的命令,但是后三个我找不到for android的版本,又不知道该怎么去改@txthinking 的script,没学过shell...
您能帮忙找到依赖库或者帮忙改成可在android执行的脚本吗?

@onewilk
Copy link
Author

onewilk commented Dec 11, 2014

@zhounanzhao 如果你只是想用替换功能,不如直接去用一个应用,中文下名字叫Hosts同步,安装后添加@txthinking 的源http://tx.txthinking.com/hosts到列表,然后更新合并就行了...

@zhounanzhao
Copy link

嗯嗯 我刚才查了一下你说的问题 如果命令busybox不提供的话 会很麻烦 有可能需要做移植。

@zhounanzhao
Copy link

我看到 这个其实是有 python版的 有没有可能直接使用python版的。

@onewilk
Copy link
Author

onewilk commented Dec 11, 2014

@zhounanzhao 那个python只是做了个下载host然后替换,这个就没必要了...

@LGA1150
Copy link

LGA1150 commented Jan 4, 2015

@onewilk
找不到for android版本的话,可自行用源码编译
我昨天就在手机上用c4droid编译了个tcping

@txthinking
Copy link
Owner

目前即使通过其他语言重写部分功能, android 上第一次运行会很占资源

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants