找回密码
 FreeOZ用户注册
查看: 3430|回复: 10
打印 上一主题 下一主题

自动查询税号的一段脚本

[复制链接]
跳转到指定楼层
1#
发表于 24-2-2009 23:57:22 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?FreeOZ用户注册

x
看到某高人研究出的通过申请税号,查询是否准签的方法, 每天都填一遍, 还是很费时间。 大家如不嫌弃, 可以把下面的代码拷下来, 存为一个 ×.vbs 文件。 修改里面的参数,比如护照号,姓名,生日。 然后双击执行这个vbs文件。最后会弹一个对话框出来提示是否查询到信息。 反正我是每次都没查到, 请哪位准签的tz验证一下。

补充:如果脚本无法运行,可以把截图贴上面或者发给我, 估计是你没有装windows script host.

' -----------------------------
' ----- 拷贝下面的脚本 ----------
' -----------------------------

'parameters to be modified
ApplyLink="Apply for a tax file number"
Passport = "G11111111"
Country = "CHINA"
Title = "Mr"
FamilyName = "Michael"
GivenName = "Jackson"
BirthDay = "3"
BirthMonth = "1"
BirthYear = "1966"

'Invoke IE to navigate apply page
Set ie = CreateObject("internetexplorer.application")
ie.Visible = false
'ie.Visible = true
ie.Navigate("http://www.ato.gov.au/individuals/content.asp?doc=/content/38760.htm")

'Max IE window
ie.Left=0
ie.top=0
ie.theatermode=True
iHeight=ie.height
iWidth=ie.Width
ie.theatermode=False
ie.height=iHeight
ie.width=iWidth
ie.visible=true
waitLoad(ie)

'apply for a TFN
clickLink ApplyLink
waitLoad(ie)

'apply_link.Click
ie.document.getElementByID("1_btnNext").Click
waitLoad(ie)
ie.document.getElementByID("1_btnNext").Click
waitLoad(ie)

'Travel doc number
ie.document.getElementByID("1_dfcTravelDocNumber_1").value= Passport
selectOption ie.document.getElementByID("1_dfcCountry_3"), Country
ie.document.getElementByID("1_btnNext").Click
waitLoad(ie)

'Personal information
selectOption ie.document.getElementByID("1_ccIndividualName_dfTitle_1"), Title
ie.document.getElementByID("1_ccIndividualName_dfLastName_3").value = FamilyName
ie.document.getElementByID("1_ccIndividualName_dfFirstName_5").value = GivenName
ie.document.getElementByID("1_dfcDateOfBirth_11D").value = BirthDay
ie.document.getElementByID("1_dfcDateOfBirth_11M").value = BirthMonth
ie.document.getElementByID("1_dfcDateOfBirth_11Y").value = BirthYear
ie.document.getElementByID("1_dfcSex_13_0").Checked = True
ie.document.getElementByID("1_btnNext").Click
waitLoad(ie)

'Existing TFNABN
ie.document.getElementByID("1_dfcPrevTFNABN_1_1").Checked = True
ie.document.getElementByID("1_dfcTFNABNPossession_3_1").Checked = True
ie.document.getElementByID("1_dfcPrevTaxReturn_9_1").Checked = True
ie.document.getElementByID("1_dfcOwnPropOrBus_11_1").Checked = True

'Sleep 10 seconds for server available
WScript.Sleep 10000
ie.document.getElementByID("1_btnNext").Click
waitLoad(ie)

'Check result
if inStr(ie.document.body.innerHTML,"not match that held")Then
  msg = "Failed. Record not found yet."
Else
  msg = "Passed. Record has been found."
End If
WScript.Echo msg

ie.quit
set ie=nothing

'wait page load
Sub waitLoad(obj)
   while obj.Busy
    WScript.Sleep 5
   wend
End Sub

'select value in list
Sub selectOption(objs, text)
   For Each objItem in objs
     if objItem.text=text then
             objItem.selected = true
             exit sub
     end if
   next
End Sub

'click link
Sub clickLink(text)
   set links = ie.document.getElementsByTagName("a")
   for each link in links
      if link.innertext=text then
         link.Click
         exit for
      end If
   next
   set links=nothing
End sub

[ 本帖最后由 alter 于 25-2-2009 01:00 编辑 ]

评分

参与人数 2威望 +50 收起 理由
lxbtiger + 30 你太有才了!
c2j + 20 脚本语言是门大学问

查看全部评分

回复  

使用道具 举报

2#
发表于 25-2-2009 00:28:37 | 只看该作者
小心税务局告你恶意攻击他们网站  
回复  

使用道具 举报

3#
发表于 25-2-2009 00:41:24 | 只看该作者
啊,这也可以啊,哈哈
回复  

使用道具 举报

4#
发表于 25-2-2009 02:14:31 | 只看该作者
兄弟,盖茨已经退休了。。

该你出手了。。

这段脚本很高手。。
回复  

使用道具 举报

5#
发表于 25-2-2009 02:18:15 | 只看该作者
收藏,

不会因为查的人太多 封IP段吧,  大家适可而止啊
回复  

使用道具 举报

6#
发表于 25-2-2009 09:06:17 | 只看该作者
果然高人
不懂编程,对人家网站没有坏处吧
如果有的话,就不值得推广了
回复  

使用道具 举报

7#
发表于 25-2-2009 10:42:38 | 只看该作者
高人可真的是很多哦
回复  

使用道具 举报

8#
发表于 25-2-2009 11:03:48 | 只看该作者
弓虽,崇拜ing...
回复  

使用道具 举报

9#
 楼主| 发表于 25-2-2009 11:16:24 | 只看该作者

这个跟打开IE访问,是一样的效果,属于良性脚本。要攻击网站, 还需要别的方法
回复  

使用道具 举报

10#
发表于 25-2-2009 11:19:51 | 只看该作者
原帖由 alter 于 25-2-2009 00:57 发表
看到某高人研究出的通过申请税号,查询是否准签的方法, 每天都填一遍, 还是很费时间。 大家如不嫌弃, 可以把下面的代码拷下来, 存为一个 ×.vbs 文件。 修改里面的参数,比如护照号,姓名,生日。 然后双击执行这 ...


经过我的static code review,这段代码安全,无攻击,大家可以放心使用
不过不喜欢VBscript, 为啥不用Python?
回复  

使用道具 举报

11#
发表于 25-2-2009 11:32:15 | 只看该作者
哈哈,这样也行!FREEOZ里的高手真多啊!
回复  

使用道具 举报

您需要登录后才可以回帖 登录 | FreeOZ用户注册

本版积分规则

小黑屋|手机版|Archiver|FreeOZ论坛

GMT+10, 4-9-2026 06:02 , Processed in 0.018165 second(s), 28 queries , Gzip On, Redis On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表