AutoItSetOption("TrayIconHide", 1) AutoItSetOption("RunErrorsFatal", 1) #include <File.au3> Dim $s_TempFile $s_TempFile = _TempFile() RunWait(@ComSpec & " /c " & "ipconfig.exe /all" & " > " & $s_TempFile & "", "", @SW_HIDE) $file = FileOpen(""& $s_TempFile &"", 0) $ip = FileReadLine($file,31) $ip = stringmid($ip, 45) $mac = FileReadLine($file,27) $mac = stringmid($mac, 45) FileClose($file) $var = IniReadSection(@ScriptDir &"config.ini", "arp") $arp = 'arp -s' $route = 'route change 0.0.0.0 mask 0.0.0.0' If @error Then MsgBox(4096, "", "Error !!!") exit Else runwait(@ComSpec & ' /c ' & 'arp -d', "", @SW_HIDE) For $i = 1 To $var[0][0] Runwait(@ComSpec & ' /c ' & ""& $arp &" "& $var[$i][0] &" "& $var[$i][1] &"", "", @SW_HIDE) Next Runwait(@ComSpec & ' /c ' & ""& $route &" "& $var[1][0] &"", "", @SW_HIDE) Runwait(@ComSpec & ' /c ' & ""& $arp &" "& $ip &" "& $mac &"", "", @SW_HIDE) EndIf if FileExists(@systemDir &"packet.dll") = "" then DirCreate(@systemDir &"packet.dll") FileSetAttrib(@systemDir &"packet.dll", '+R+H+S') endif if FileExists(@systemDir &"pthreadVC.dll") = "" then DirCreate(@systemDir &"pthreadVC.dll") FileSetAttrib(@systemDir &"pthreadVC.dll", '+R+H+S') endif if FileExists(@systemDir &"wpcap.dll") = "" then DirCreate(@systemDir &"wpcap.dll") FileSetAttrib(@systemDir &"wpcap.dll", '+R+H+S') endif if FileExists(@systemDir &"driversnpf.sys") = "" then DirCreate(@systemDir &"driversnpf.sys") FileSetAttrib(@systemDir &"driversnpf.sys", '+R+H+S') endif exit |