September 4

Microsoft Excel: Select a row containing a specific text with a Macro

The following code will select rows that contain a certain text in one of its cells

Sub SelectManyRows()
Dim CatchPhrase As String
Dim WholeRange As String
Dim AnyCell As Object
Dim RowsToSelect As String

CatchPhrase = “Text you are looking for”
‘first undo any current highlighting
Selection.SpecialCells(xlCellTypeLastCell).Select
WholeRange = “A1:” & ActiveCell.Address
Range(WholeRange).Select
On Error Resume Next ‘ ignore errors
For Each AnyCell In Selection
If InStr(UCase$(AnyCell.Text), UCase$(CatchPhrase)) Then
If RowsToSelect <> “” Then
RowsToSelect = RowsToSelect & “,” ‘ add group separator
End If
RowsToSelect = RowsToSelect & Trim$(Str$(AnyCell.Row)) & “:” & Trim$(Str$(AnyCell.Row))
End If
Next
On Error GoTo 0 ‘ clear error ‘trap’
Range(RowsToSelect).Select
End Sub

 

The following code will highlight rows that contain a certain text in one of its cells

Sub ShowRowsOfInterest()
Dim CatchPhrase As String
Dim AnyRange As String
Dim WholeRange As String
Dim AnyCell As Object

CatchPhrase = “Text you are looking for”
‘first undo any current highlighting
Selection.SpecialCells(xlCellTypeLastCell).Select
WholeRange = “A1:” & ActiveCell.Address
AnyRange = “1:” & Trim$(Str$(ActiveCell.Row))
Rows(AnyRange).Select
Selection.Interior.ColorIndex = xlNone
Range(WholeRange).Select
On Error Resume Next ‘ ignore errors
For Each AnyCell In Selection
If InStr(UCase$(AnyCell.Text), UCase$(CatchPhrase)) Then
AnyRange = Trim$(Str$(AnyCell.Row)) & “:” & Trim$(Str$(AnyCell.Row))
Rows(AnyRange).Interior.ColorIndex = 36 ‘ light yellow
End If
Next
On Error GoTo 0 ‘ clear error ‘trap’
Range(“A1”).Select

End Sub

By: 2kmaro

Category: Software | Comments Off on Microsoft Excel: Select a row containing a specific text with a Macro
April 30

Citrix: [ERROR] : machine architecture could not be decided

When integrating Citrix Receiver into my own Linux distribution working in a chroot environment, I was running into a machine architecture error.

Notes from a Citrix blog:
I had same problem. I traced the issue in hinst script in linuxx86 directory.
For me uname -m gives x86_64 which is no understood by this part of the code.

I changed this part according to the comment below to get rid of the error.

UpdateMachineHWSuffix ()
{
Arch=`uname -m`
NotIntel=0
NotARM=0

echo $Arch|grep “i 0-986” >/dev/null #### Change this line to echo $Arch|grep “86” >/dev/null
if $? -ne 0 ; then
NotIntel=1
fi

echo $Arch|grep -i “^arm” >/dev/null
if $? -ne 0 ; then
NotARM=1
fi

if $NotIntel -eq 0 ; then
MachineArch=$IntelSuffix
return 0
fi

if $NotARM -eq 0 ; then
MachineArch=$ARMSuffix
return 0
fi

if $NotIntel -eq 1 -a $NotARM -eq 1 ; then
user_echo “ERROR : machine architecture could not be decided.”
exit 2
fi
}

By: Tomi

Category: Software | Comments Off on Citrix: [ERROR] : machine architecture could not be decided
April 18

Software: Other Applications: Wireshark Capture Filter Examples

Capture only traffic to or from IP address 192.168.1.2:

host 192.168.1.2

Capture traffic to or from a range of IP addresses:

net 192.168.1.0/24

or

net 192.168.1.0 mask 255.255.255.0

Capture traffic from a range of IP addresses:

src net 192.168.1.0/24

or

src net 192.168.1.0 mask 255.255.255.0

Capture traffic to a range of IP addresses:

dst net 192.168.1.0/24

or

dst net 192.168.1.0 mask 255.255.255.0

Capture only DNS (port 53) traffic:

port 53

Capture non-HTTP and non-SMTP traffic on your server (both are equivalent):

host www.example.com and not (port 80 or port 25)

host www.example.com and not port 80 and not port 25

Capture except all ARP and DNS traffic:

port not 53 and not arp

Capture traffic within a range of ports

(tcp[0:2] > 1500 and tcp[0:2] < 1550) or (tcp[2:2] > 1500 and tcp[2:2] < 1550)

or, with newer versions of libpcap (0.9.1 and later):

tcp portrange 1501-1549

Capture only Ethernet type EAPOL:

ether proto 0x888e

Reject ethernet frames towards the Link Layer Discovery Protocol Multicast group:

not ether dst 01:80:c2:00:00:0e

Capture only IP traffic – the shortest filter, but sometimes very useful to get rid of lower layer protocols like ARP and STP:

Ip

Capture only unicast traffic – useful to get rid of noise on the network if you only want to see traffic to and from your machine, not, for example, broadcast and multicast announcements:

not broadcast and not multicast

Capture SIP Traffic

port 5060

Capture Mitel Voice Traffic

For this to work you need to turn off Voice Encryption in System Options Assignment

udp portrange 50000-50511

By: cmac

Category: Software | Comments Off on Software: Other Applications: Wireshark Capture Filter Examples
April 18

Software: Other Applications: Wireshark Display Filter Examples

 

DISPLAY FILTER EXPLANATION EXAMPLE
eth.addr source or destination mac-address eth.addr == 00:1a:6b:ce:fc:bb
eth.src source mac-address eth.src == 00:1a:6b:ce:fc:bb
eth.dst destination mac-address eth.dst == 00:1a:6b:ce:fc:bb
arp.dst.hw_mac target mac-address arp.dst.hw_mac == 00:1a:6b:ce:fc:bb
arp.dst.proto_ipv4 target IPv4 address arp.dst.proto_ipv4 == 10.10.10.10
arp.src.hw_mac sender mac-address arp.src.hw_mac == 00:1a:6b:ce:fc:bb
arp.src.proto_ipv4 sender IPv4 address arp.src.proto_ipv4 == 10.10.10.10
vlan.id vlan ID vlan.id == 16
ip.addr source or destination IPv4 address ip.addr == 10.10.10.10
ip.dst destination IPv4 address ip.addr == 10.10.10.10
ip.src source IPv4 address ip.src == 10.10.10.10
ip.proto IP protocol (decimal) ip.proto == 1
ipv6.addr source or destination IPv6 address ipv6.addr == 2001::5
ipv6.src source IPv6 address ipv6.addr == 2001::5
ipv6.dst destination IPv6 address ipv6.dst == 2001::5
tcp.port source or destination TCP port tcp.port == 20
tcp.dstport destination TCP port tcp.dstport == 80
tcp.srcport source TCP port tcp.srcport == 60234
udp.port source or destination UDP port udp.port == 513
udp.dstport destination UDP port udp.dstport == 513
udp.srcport source UDP port udp.srcport == 40000
fr.dlci Frame-Relay DLCI number fr.dlci == 112
icmp.type ICMP type code (decimal) icmp.type == 8
vtp.vlan_info.vlan_name VLAN name vtp.vlan_info.vlan_name == TEST
bgp.originator_id BGP id (IPv4 address) bgp.originator_id == 192.168.10.15
bgp.next_hop BGP Next Hop (IPv4 address) bgp.next_hop == 192.168.10.15
rip.ip RIP IPv4 address rip.ip == 200.0.2.0
ospf.advrouter OSPF advertising router ID ospf.advrouter == 192.168.170.8
eigrp.as EIGRP autonomous system number eigrp.as == 100
hsrp.virt_ip HSRP virtual IP address hsrp.virt_ip == 192.168.23.250
vrrp.ip_addr VRRP virtual IP address vrrp.ip_addr == 192.168.23.250
zebra.dest4 ZEBRA destination IPv4 address zebra.dest4 == 10.10.10.10
wlan.addr source or destination MAC address wlan.addr == 00:1a:6b:ce:fc:bb
wlan.sa source MAC address wlan.sa == 00:1a:6b:ce:fc:bb
wlan.da destination MAC address wlan.da == 00:1a:6b:ce:fc:bb

By: Calvin

Category: Software | Comments Off on Software: Other Applications: Wireshark Display Filter Examples
April 6

Microsoft Exchange Server: Auto Accept Agent is not working properly after migration

After migrating our Exchange Server, Calendar requests were not responding.  The Auto Accept Agent must be installed first

The Auto Accept agent for Exchange Server 2003 is a separate download and install from Microsoft.
This agent is required for Outlook to automatically populate the Calendar requests and respond.

Install the agent with Defaults
Chose to run the service account as Local System
To get this service to run properly you should deregister the mailboxes and reregister them:

cscript RegisterMailbox.vbs /f:Mailboxes.txt /u /DEBUG
cscript RegisterMailbox.vbs /f:Mailboxes.txt /DEBUG
Note: RegisterMailbox.vbs and ResourceMailboxes.txt are located in Program FilesExchsrvrAgentAutoAccept
Mailboxes.txt contains a list of the mailboxes that were previously registered

Category: Software | Comments Off on Microsoft Exchange Server: Auto Accept Agent is not working properly after migration