Jump to content

about DOS file


Recommended Posts

Hi,all coders

There is a DOS file, It just used in DOS ,and it's got some parameters

now ,I ve written a GUI that it need to use those parameters and The GUI also needs to get return results of that dos file

question: how to get return results of that dos file

The following is my script:(That s.exe is a DOs file)

Thanks any way

CODE
#include <GUIConstants.au3>

Opt("GUIOnEventMode", 1) ; 切换为 OnEvent 模式

$mainwindow = GUICreate("永恒ぃ☆心专用扫描器", 280, 300) ; 创建窗口并返回窗口句柄

GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") ; 设置窗口关闭事件

GUICtrlCreateLabel("QQ群:40158462", 5, 170)

$SYN = GUICtrlCreateLabel("请输入你要扫描起始IP段:", 5, 20)

$tcp = GUICtrlCreateLabel("请输入你要扫描结束的IP段:", 5, 67)

$duankou = GUICtrlCreateLabel("请输入你要扫描的端口:", 5, 108)

GUICtrlCreateLabel("=====================================================", 0, 0)

GUICtrlCreateLabel("=====================================================", 0, 145)

$file1 = GUICtrlCreateInput ( "", 5, 35, 150, 25)

$file2 = GUICtrlCreateInput ( "", 5, 80, 150, 25)

$file3 = GUICtrlCreateInput ( "", 5, 120, 50, 25)

$SYNbutton = GUICtrlCreateButton("SYN扫描", 5, 210, 100)

$TCPButton = GUICtrlCreateButton ( "TCP扫描", 5,235,100)

$tuichuButton = GUICtrlCreateButton ("退出", 5,260,100)

$quedinButton = GUICtrlCreateButton ("保存数据", 5,185,100)

$wori1 = GUICtrlRead($file1)

$wori2 = GUICtrlRead($file2)

$wori3 = GUICtrlRead($file3)

GUICtrlSetOnEvent($SYNbutton, "SYNButton")

GUICtrlSetOnEvent($TCPbutton, "TCPButton")

GUICtrlSetOnEvent($tuichuButton, "tuichuButton")

GUISetState(@SW_SHOW)

While 1

Sleep(1000) ; 不做任何事

WEnd

Func SYNButton()

Run('s.exe syn '&'$wori1 '&'$wori2 '&'$wori3 '&'800 /save')

EndFunc

Func TCPButton()

Run('s.exe tcp '&'$wori1 '&'$wori2 '&'$wori3 '&'800 /save')

EndFunc

Func CLOSEClicked()

Exit

EndFunc

Func tuichuButton()

WinClose("永恒ぃ☆心专用扫描器")

EndFunc

Edited by Chinasmoker

One is never too old to learn

Link to comment
Share on other sites

  • Moderators

Have you looked at the STD* functions and seen if those help?

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Hint: Use the AutoIt - tag & maybe scite. This should lead you to your problem.

Blind guess would be this:

Run('s.exe tcp '&$wori1&' '&$wori2 & ' ' & $wori3 &' 800 /save')

(You did quote your $var and by this, it is interpreted as pure text.)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...