CAN ANYONE HELP ME ???
THANKS.
!netstat -t --numeric-ports |grep 'yourD3ip:yourtelnetport#'
and the results would be like this:
tcp 0 9 1.1.2.162:5026
10.13.0.102:3184 ESTABLISHED
We are using AccuTerm so I wrote a VBScript to run the "ipconfig"
command and piped it to a file on the client's C drive.
Dim sDirectory As String
Dim WshShell As Object
Dim sWinDir As String
set WshShell = CreateObject("WScript.Shell")
sWinDir = WshShell.ExpandEnvironmentStrings("%WinDir%")
sDirectory = sWinDir
If Right(sDirectory,1) <> "\" Then sDirectory = sDirectory & "\
sDirectory = sDirectory & "System32\"
sDirectory = sDirectory & "ipconfig /all>c:\security.txt"
WshShell.Run("%comspec% /c " & sDirectory,0,True)
Another script is used to make a tab delimited file out of the
output. This is required so FTD works properly in the next step.
Dim oFSO As Object
Dim oFile As Object
Dim sText As String
Dim sOutput As String
Dim iX As Integer
Dim iCnt As Integer
Const forReading = 1, forWriting = 2, forAppending = 8
Set oFSO = CreateObject("Scripting.FileSystemObject")
set oFile = oFSO.OpenTextFile("C:\Security.txt",forReading,True)
sOutput = ""
iCnt = 0
Do Until oFile.AtEndOfStream
iCnt = iCnt + 1
sText = oFile.ReadLine
If sOutput = "" Then
sOutput = "Security" & Chr(9) & sText
Else
sOutput = sOutput & Chr(9) & sText
End If
Loop
oFile.Close
Sleep 2000
set oFile = oFSO.OpenTextFile("C:\Security.txt",forWriting,True)
oFile.WriteLine "*"
oFile.WriteLine sOutput
oFile.Close
Then we use FTD to import the file and parse the results
DATA "R"
DATA "K"
DATA "C:\SECURITY.TXT"
DATA ""
DATA "PORT":PORTNO
EXECUTE "FTD"
This allows us to keep track of the IP Address, MAC Address, and
Gateway of every log on session on the system.
Cliff
Symeon.
SUBROUTINE GET.REMOTE.IP(REMOTE_IP)
NETWORK = "192.168.0.0"
!
! GET LINUX DEVICE NAME
!
PORT.NUM = SYSTEM(22)
EXECUTE 'LIST-LINES ':PORT.NUM CAPTURING OUTPUT
OUTPUT = OUTPUT<2>
CONVERT CHAR(32) TO CHAR(254) IN OUTPUT
LASTIDX = DCOUNT(OUTPUT,CHAR(254))
DEVID = OUTPUT<LASTIDX>
DEVID = SWAP(DEVID,"/dev/","")
!
! GET THE HOSTNAME FOR THE DEVICE
!
EXECUTE '!w -h' CAPTURING OUTPUT
LNS = DCOUNT(OUTPUT,CHAR(254))
IDX = 0
FOR PTR = 1 TO LNS
TLINE = OUTPUT<PTR>
CONVERT CHAR(32) TO CHAR(254) IN TLINE
LOCATE DEVID IN TLINE SETTING VM THEN
IDX = PTR
END
NEXT PTR
IF IDX > 0 THEN
WLINE = OUTPUT<IDX>
END ELSE
RETURN
END
CONVERT CHAR(32) TO CHAR(254) IN WLINE
LNS = DCOUNT(WLINE,CHAR(254))
IPCOL = 0
HOSTNAME = ''
FOR PTR = 1 TO LNS
IF WLINE<PTR> # "" AND IPCOL = 1 THEN
HOSTNAME = WLINE<PTR>
GO DONE
END
IF WLINE<PTR> = DEVID THEN
IPCOL = 1
END
NEXT PTR
STOP
DONE:
HOSTNAME = TRIM(HOSTNAME)
!
! DETERMINE IF HOSTNAME IS IP OR DNS RESOLVED HOSTNAME
! IF IT'S NOT AN IP, GET THE IP FROM LOCAL DNS
!
IPADDR = ''
IF HOSTNAME[1,3] # NETWORK[1,3] THEN
EXECUTE '!host ':HOSTNAME CAPTURING IPADDR
CONVERT CHAR(32) TO CHAR(254) IN IPADDR
LNS = DCOUNT(IPADDR,CHAR(254))
REMOTE_IP = IPADDR<LNS>
END ELSE
REMOTE_IP = HOSTNAME
END
RETURN
"GlenB" <batc...@bellsouth.net> wrote in message
news:8189c925-bfc5-4622...@8g2000hse.googlegroups.com...
When networks came about, using fixed IP's, you could approximate the
same sort of things --> even though your PIB may have floated, your IP
remained constant, so I'm guessing that perhaps this "IP knowledege"
may be built into some form of security system
Of course, application limitations could also be placed on the client
based on IP, subnet, or netmask. We don't have a need for that right now,
but it would be simple to implement with a client IP lookup tool similar to
this.
GlenB
"Peter McMurray" <excal...@bigpond.com> wrote in message
news:zs6kk.24252$IK1....@news-server.bigpond.net.au...
All programs that print have an Application print Queue name such as
INVOICE, RECEIPT, STANDARD etc that is linked through the application master
setup record to the appropriate queue. All Applications have a default
Master setup but this can be overridden for a particular logon or by the
actual user preparing the print or by the user when pulling it out of the
hold file. I differentiate between Laser Landscape, Laser Portrait,
DotMatrix, Local (eg receipt printer tied to a terminal) with the printer
definition. All printer jobs call a standard subroutine to create the files
required with the usual PRINT ON 1 PRINT ON 2 etc and a function key can
pull up the Print control program in any program - naturally I am not
leaving the user to battle with SP-EDIT etc. We also allow for different
invoice layouts from the same Invoice file so one printer may have Mobil
invoices on it and another may have the distributer's invoices on it.
So the only time one needs to know an IP address is when the printer is
first installed on the Windows Server and knowing the IP in D3 would be
pointless as one sends it to the share name. Of course printers could be
re-assigned in Windows with office re-arrangement but we are not interested
so long as the share name is correct - Oh Yes I forgot, we use DOSPrin for
windows printers such as MFC's and I have just remembered we have a server
in Melbourne but our 3 printers are in Sydney and I am not allowed access to
the server just my application.
Peter McMurray
"GlenB" <batchelg...@bellsouth.net> wrote in message
news:Z%8kk.1549$Ep1....@bignews2.bellsouth.net...
This is assuming eth0 is the device your looking for, if not change it to
the appropriate device name
"Rookie" <goo...@caspersonline.us> wrote in message
news:176ffea2-7b8d-4a48...@a2g2000prm.googlegroups.com...
EXECUTE "!w -h -s $LOGNAME | head -1 | tr -s ' ' | cut -d ' ' -f 3"
Assuming each user logs in with a different login