Hi guys any one know what i am missing!!
I am using Gideons Java library and i want to add a layer7-protocol regex with the following command
con.execute(“/ip/firewall/layer7-protocol/add name=test regexp="^(\\x13bittorrent protocol|azver\\x01\$|get /scrape\\\?info_hash=get /announce\\\?info_hash=|get /client/bitcomet/|GET data\\\?fid=)|d1:ad2:id20:|\\x08’7P\\)[RP]"”);
And i keep getting:
Exception in thread “main” me.legrange.mikrotik.MikrotikApiException: failure: bad regexp: unmatched ()..
Thanks in advance
Guys please give me some ideas here, was able to solve the unknown parameter error by putting the value of the regular expression in quotes
as shown:
String regexp=“"^(\\x13bittorrent protocol|azver\\x01\$|get /scrape\\\?info_hash=get /announce\\\?info_hash=|get /client/bitcomet/|GET /data\\\?fid=)|d1:ad2:id20:|\\x08’7P\\)[RP]"”;
con.execute(“/ip/firewall/layer7-protocol/add name=pol regexp=”+regexp+“”);
This fails with failure: bad regexp: unmatched ()
Any help !!!