Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/linabellbiu/sms-auto-regist
:beetle: 爬取虚拟手机号的短信验证码,从而登录需要手机号验证码注册的网站,可以刷阅读,刷赞,刷关注之类的操作
https://github.com/linabellbiu/sms-auto-regist
500px auto-register collect regist reptile sms yunjiema
Last synced: about 2 months ago
JSON representation
:beetle: 爬取虚拟手机号的短信验证码,从而登录需要手机号验证码注册的网站,可以刷阅读,刷赞,刷关注之类的操作
- Host: GitHub
- URL: https://github.com/linabellbiu/sms-auto-regist
- Owner: linabellbiu
- License: mit
- Created: 2022-11-07T13:48:38.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-09T15:25:20.000Z (almost 2 years ago)
- Last Synced: 2024-06-21T16:55:32.562Z (6 months ago)
- Topics: 500px, auto-register, collect, regist, reptile, sms, yunjiema
- Language: Go
- Homepage:
- Size: 87.9 KB
- Stars: 48
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sms-auto-regist
## 爬取虚拟手机号的短信验证码,从而登录需要手机号验证码注册的网站,可以刷阅读,刷赞,刷关注之类的操作### How to use
#### config.yml
```yml
collect_source_html:
www_yunjiema_top:
# host
host: "https://www.yunjiema.top"
# timed task
cron: "2 * * * *"
# Locate the keywords of the general text message content, choose one of multiple keywords
keywords:
- "500px"
- "[视觉中国]"
# Regular expression to extract captcha
compile_regex: "\\d{6,}"
```
#### referencerun
```go
// sms-auto-regist\example\main.go
// initialization
collect.NewCollect(
collect.SetConfigPath("../config.yml"),
)// start app
app.Run(&app.Example{})// Start the crawler scheduled task
job(
www_yunjiema_top.NewCollect(conf.Global.CollectSourceHtml.WwwYunjiemaTop),
)
```receive
```go
for {
select {
case tel := <-collect.SendFindTel:
fmt.Printf("Find the crawled mobile phone number %s:\n", tel)
case tel := <-collect.SendFindSMSTel:
fmt.Printf("Find the phone number that sent the text message%s:\n", tel)
}
}
```### Customize crawling SMS website
#### mplement the interface
```go
// sms-auto-regist\collect\collect.go
type Job interface
```#### reference
```go
// sms-auto-regist\collect\origin\www_yunjiema_top\html.go
type Collect struct {
config conf.DefaultCollectConfig
}func NewCollect(config conf.DefaultCollectConfig) *Collect {
return &Collect{
config: config,
}
}func (c *Collect) Run() {
...
}func (c *Collect) GetConfig() conf.DefaultCollectConfig {
return c.config
}
```#### tools
```go
// Send the crawled mobile phone number to the pipeline
collect.WriteFindTel(tel)// Send the SMS received by crawling the mobile phone number to the pipeline
collect.WriteFindSMSTel(*collect.FindSMSTel)
```### Result
#### 接收到的虚拟短信#### 爬到的
#### 手动输入验证码注册成功 (自动的还没搞)