#!/bin/bash
echo unknown zorp messages:
echo "-----------------------------------------------------"
cat $1 |egrep -v "Attribute fetched; attribute='ssl', value='ZPolicyStruct object type Shared'|Attribute changed; attribute='language', newvalue=''en''|Attribute fetched; attribute='server_local_tos', value='0'|Established connection; protocol='1', remote='AF_INET\(44.55.66.253:4567\)'|Server connection established|Setting socket ToS value|Ending proxy instance|accounting info;|Starting service; name='run_service'|BusyBox v1.19.3|Enter 'help' for a list of built-in commands.|Blob system usage|Proxy starting;|Proxy destroy;|Shutdown channel;|Closing stream;|Closing stream;|Proxy ending;|thread starting;|Incoming connection;|Starting proxy instance;|Interface added;|Address added to interface;|Refined TSC clocksource calibration|IPv6 duplicate address|ip_tables: \(C\) 2000-2006 Netfilter Core Team|ip6_tables: \(C\) 2000-2006 Netfilter Core Team|eth.: link up,|RTL-8139C+|PCI INT A|PCI Interrupt Link|8139cp:|NF_TPROXY: Transparent proxy support initialized,|NF_TPROXY: Copyright|Freeing unused kernel memory:|Write protecting the kernel read-only data|Attached scsi generic|ata2.00:| EDD |rtc_cmos|Magic number:|scsi|cpuidle|rtc0|hci-hcd|usbcore|PPP|tun:|MDIO|PATA|module loaded|Registered protocol family|Registering|registered|: hash matches|CD-ROM|apgpart|serial|Serial|ACPI|ERST|GHES|Power Button|NetLabel|AppArmor|kvm|hash table entries:|pci 0|unpack rootfs|Freeing initrd|audi: initializing|initialized|VFS:|Dquot-cache|fuse|msgnmi|SCSI|hci_hcd:|vgaarb|msgmni|HPET|i2c|EVM|RTC|PCI|hpet|Initializing|EFI|device-mapper|mousedev:|serio:|apgpart|PNP|Translated Set 2 keyboard|agpgart|ttyS0|initializing|TCP: Hash tables configured|pci|HEST|bio: create slab |print_constraints:|Total of 1 processors activated |CPU|cpu0|apic|ftrace|SMP|pid_max:|BogoMips|MHz|cgroup|VGA|IRQ|RCU|SLUB|Memory:.*available|AGP|KVM|\[[    0.000000\]|Loading, please wait|^[ \t]*$|[lL]icense|Connection to 11.22.33.1 1234 port.*succ"
echo "-----------------------------------------------------"
if cat $1 |grep "Server connection established; server_fd='.*', server_address='AF_INET.44.55.66.253:4567.', server_zone='Zone.outside.', server_local='AF_INET.44.55.66.254:.*.', server_protocol='TCP'" >/dev/null
then
	echo TEST OK
else
	echo TEST FAIL
	exit 1
fi
