synapse 2.202.0__py311-none-any.whl → 2.203.0__py311-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of synapse might be problematic. Click here for more details.

Files changed (100) hide show
  1. synapse/axon.py +4 -4
  2. synapse/cmds/cortex.py +4 -6
  3. synapse/cmds/hive.py +10 -10
  4. synapse/common.py +17 -58
  5. synapse/cortex.py +6 -6
  6. synapse/data/__init__.py +3 -2
  7. synapse/data/iana.uris.mpk +1 -0
  8. synapse/lib/autodoc.py +3 -3
  9. synapse/lib/cli.py +2 -2
  10. synapse/lib/config.py +2 -2
  11. synapse/lib/encoding.py +4 -3
  12. synapse/lib/httpapi.py +7 -11
  13. synapse/lib/json.py +224 -0
  14. synapse/lib/lmdbslab.py +1 -1
  15. synapse/lib/oauth.py +176 -54
  16. synapse/lib/rstorm.py +18 -14
  17. synapse/lib/schemas.py +87 -1
  18. synapse/lib/scrape.py +35 -13
  19. synapse/lib/snap.py +2 -1
  20. synapse/lib/storm.py +2 -2
  21. synapse/lib/stormhttp.py +11 -13
  22. synapse/lib/stormlib/aha.py +4 -4
  23. synapse/lib/stormlib/auth.py +1 -1
  24. synapse/lib/stormlib/cache.py +2 -2
  25. synapse/lib/stormlib/cortex.py +5 -5
  26. synapse/lib/stormlib/graph.py +1 -1
  27. synapse/lib/stormlib/imap.py +1 -1
  28. synapse/lib/stormlib/json.py +8 -11
  29. synapse/lib/stormlib/model.py +1 -1
  30. synapse/lib/stormlib/notifications.py +2 -2
  31. synapse/lib/stormlib/oauth.py +105 -2
  32. synapse/lib/stormlib/stats.py +4 -0
  33. synapse/lib/stormlib/stix.py +3 -4
  34. synapse/lib/stormlib/vault.py +6 -6
  35. synapse/lib/stormlib/xml.py +2 -2
  36. synapse/lib/stormtypes.py +19 -28
  37. synapse/lib/structlog.py +3 -3
  38. synapse/lib/types.py +2 -1
  39. synapse/lib/version.py +2 -2
  40. synapse/lib/view.py +7 -3
  41. synapse/models/base.py +51 -2
  42. synapse/telepath.py +5 -3
  43. synapse/tests/files/__init__.py +0 -1
  44. synapse/tests/test_axon.py +1 -1
  45. synapse/tests/test_cmds_cortex.py +3 -2
  46. synapse/tests/test_cmds_hive.py +4 -4
  47. synapse/tests/test_common.py +29 -19
  48. synapse/tests/test_cortex.py +5 -5
  49. synapse/tests/test_lib_ast.py +3 -3
  50. synapse/tests/test_lib_autodoc.py +5 -5
  51. synapse/tests/test_lib_base.py +1 -1
  52. synapse/tests/test_lib_cell.py +16 -10
  53. synapse/tests/test_lib_config.py +2 -2
  54. synapse/tests/test_lib_encoding.py +2 -2
  55. synapse/tests/test_lib_grammar.py +64 -64
  56. synapse/tests/test_lib_httpapi.py +13 -13
  57. synapse/tests/test_lib_json.py +219 -0
  58. synapse/tests/test_lib_multislabseqn.py +2 -1
  59. synapse/tests/test_lib_node.py +2 -2
  60. synapse/tests/test_lib_scrape.py +50 -0
  61. synapse/tests/test_lib_storm.py +6 -6
  62. synapse/tests/test_lib_stormhttp.py +4 -4
  63. synapse/tests/test_lib_stormlib_auth.py +3 -2
  64. synapse/tests/test_lib_stormlib_cortex.py +10 -12
  65. synapse/tests/test_lib_stormlib_infosec.py +2 -3
  66. synapse/tests/test_lib_stormlib_json.py +18 -21
  67. synapse/tests/test_lib_stormlib_log.py +1 -1
  68. synapse/tests/test_lib_stormlib_oauth.py +603 -1
  69. synapse/tests/test_lib_stormlib_stats.py +13 -3
  70. synapse/tests/test_lib_stormlib_stix.py +5 -5
  71. synapse/tests/test_lib_stormtypes.py +4 -4
  72. synapse/tests/test_lib_structlog.py +5 -6
  73. synapse/tests/test_lib_view.py +8 -0
  74. synapse/tests/test_model_base.py +32 -0
  75. synapse/tests/test_model_infotech.py +2 -2
  76. synapse/tests/test_telepath.py +0 -1
  77. synapse/tests/test_tools_cryo_cat.py +4 -3
  78. synapse/tests/test_tools_docker_validate.py +4 -2
  79. synapse/tests/test_tools_feed.py +30 -2
  80. synapse/tests/test_tools_genpkg.py +1 -1
  81. synapse/tests/test_tools_healthcheck.py +8 -7
  82. synapse/tests/test_utils.py +2 -2
  83. synapse/tests/utils.py +3 -3
  84. synapse/tools/autodoc.py +3 -3
  85. synapse/tools/changelog.py +2 -2
  86. synapse/tools/cryo/cat.py +3 -3
  87. synapse/tools/csvtool.py +2 -3
  88. synapse/tools/docker/validate.py +5 -5
  89. synapse/tools/feed.py +2 -1
  90. synapse/tools/genpkg.py +3 -2
  91. synapse/tools/healthcheck.py +2 -3
  92. synapse/tools/json2mpk.py +2 -2
  93. synapse/utils/getrefs.py +6 -6
  94. synapse/vendor/cpython/lib/json.py +35 -0
  95. synapse/vendor/cpython/lib/test/test_json.py +22 -0
  96. {synapse-2.202.0.dist-info → synapse-2.203.0.dist-info}/METADATA +2 -1
  97. {synapse-2.202.0.dist-info → synapse-2.203.0.dist-info}/RECORD +100 -95
  98. {synapse-2.202.0.dist-info → synapse-2.203.0.dist-info}/WHEEL +1 -1
  99. {synapse-2.202.0.dist-info → synapse-2.203.0.dist-info}/LICENSE +0 -0
  100. {synapse-2.202.0.dist-info → synapse-2.203.0.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,3 @@
1
- import json
2
1
  import math
3
2
  import asyncio
4
3
 
@@ -9,6 +8,7 @@ import synapse.common as s_common
9
8
  import synapse.datamodel as s_datamodel
10
9
 
11
10
  import synapse.lib.ast as s_ast
11
+ import synapse.lib.json as s_json
12
12
  import synapse.lib.snap as s_snap
13
13
 
14
14
  import synapse.tests.utils as s_test
@@ -1523,7 +1523,7 @@ class AstTest(s_test.SynTest):
1523
1523
  self.stormIsInPrint('stormpkg', msgs)
1524
1524
 
1525
1525
  # Make sure a JSON package loads
1526
- jsonpkg = json.loads(json.dumps(jsonpkg))
1526
+ jsonpkg = s_json.loads(s_json.dumps(jsonpkg))
1527
1527
  await core.stormlist('$lib.pkg.add($pkg)',
1528
1528
  opts={'vars': {'pkg': jsonpkg}})
1529
1529
  msgs = await core.stormlist('pkg.list')
@@ -1731,7 +1731,7 @@ class AstTest(s_test.SynTest):
1731
1731
  prints = list(filter(lambda m: m[0] == 'print', msgs))
1732
1732
  self.eq(len(prints), 3)
1733
1733
 
1734
- jmsgs = list(map(lambda m: json.loads(m[1]['mesg']), prints))
1734
+ jmsgs = list(map(lambda m: s_json.loads(m[1]['mesg']), prints))
1735
1735
  omsgs = sorted(jmsgs, key=lambda m: m[0])
1736
1736
  self.eq(omsgs[0][1], 'this should be first')
1737
1737
  self.eq(omsgs[1][1], 'toreturn called')
@@ -56,7 +56,7 @@ shave'''
56
56
  )
57
57
  }
58
58
  callsig = s_autodoc.genCallsig(rtype)
59
- self.eq(callsig, '(foo, bar=$lib.null, **kwargs)')
59
+ self.eq(callsig, '(foo, bar=(null), **kwargs)')
60
60
  self.eq(s_autodoc.genCallsig({}), '()')
61
61
  self.eq(s_autodoc.genCallsig({'args': ({'name': 'beep'},)}), '(beep)')
62
62
 
@@ -176,8 +176,8 @@ Returns:
176
176
 
177
177
  .. _test-lib-test-someargs:
178
178
 
179
- someargs(valu, bar=$lib.true, faz=$lib.null)
180
- ============================================
179
+ someargs(valu, bar=(true), faz=(null))
180
+ ======================================
181
181
 
182
182
  .. warning::
183
183
  ``$lib.test.someargs`` has been deprecated and will be removed in version v3.0.0.
@@ -252,8 +252,8 @@ Returns:
252
252
 
253
253
  .. _test-lib-test-someargs:
254
254
 
255
- $lib.test.someargs(valu, bar=$lib.true, faz=$lib.null)
256
- ======================================================
255
+ $lib.test.someargs(valu, bar=(true), faz=(null))
256
+ ================================================
257
257
 
258
258
  .. warning::
259
259
  ``$lib.test.someargs`` has been deprecated and will be removed in version v3.0.0.
@@ -483,7 +483,7 @@ class BaseTest(s_t_utils.SynTest):
483
483
  async def badgenr():
484
484
  yield 'foo'
485
485
  await asyncio.sleep(0)
486
- raise s_exc.SynErr('rando')
486
+ raise s_exc.SynErr(mesg='rando')
487
487
 
488
488
  async def slowgenr():
489
489
  yield 'foo'
@@ -1,7 +1,6 @@
1
1
  import os
2
2
  import ssl
3
3
  import sys
4
- import json
5
4
  import time
6
5
  import base64
7
6
  import signal
@@ -26,6 +25,7 @@ import synapse.lib.auth as s_auth
26
25
  import synapse.lib.base as s_base
27
26
  import synapse.lib.cell as s_cell
28
27
  import synapse.lib.coro as s_coro
28
+ import synapse.lib.json as s_json
29
29
  import synapse.lib.link as s_link
30
30
  import synapse.lib.drive as s_drive
31
31
  import synapse.lib.nexus as s_nexus
@@ -1822,10 +1822,13 @@ class CellTest(s_t_utils.SynTest):
1822
1822
 
1823
1823
  async def streamdone():
1824
1824
  while core.backupstreaming:
1825
- await asyncio.sleep(0)
1825
+ await asyncio.sleep(0.1)
1826
1826
 
1827
1827
  task = core.schedCoro(streamdone())
1828
- await asyncio.wait_for(task, 15)
1828
+ try:
1829
+ await asyncio.wait_for(task, 5)
1830
+ except TimeoutError:
1831
+ raise TimeoutError('Timeout waiting for streaming backup cleanup of bkup3 to complete.')
1829
1832
 
1830
1833
  self.eq(('bkup', 'bkup2'), sorted(await proxy.getBackups()))
1831
1834
  self.false(os.path.isdir(os.path.join(backdirn, 'bkup3')))
@@ -1839,7 +1842,10 @@ class CellTest(s_t_utils.SynTest):
1839
1842
  bkup4.write(msg)
1840
1843
 
1841
1844
  task = core.schedCoro(streamdone())
1842
- await asyncio.wait_for(task, 15)
1845
+ try:
1846
+ await asyncio.wait_for(task, 5)
1847
+ except TimeoutError:
1848
+ raise TimeoutError('Timeout waiting for streaming backup cleanup of bkup4 to complete.')
1843
1849
 
1844
1850
  self.eq(('bkup', 'bkup2'), sorted(await proxy.getBackups()))
1845
1851
 
@@ -3128,13 +3134,13 @@ class CellTest(s_t_utils.SynTest):
3128
3134
  self.nn(node.getTagProp('test', 'score'), 6)
3129
3135
 
3130
3136
  self.maxDiff = None
3131
- roles = s_t_utils.deguidify('[{"type": "role", "iden": "e1ef725990aa62ae3c4b98be8736d89f", "name": "all", "rules": [], "authgates": {"46cfde2c1682566602860f8df7d0cc83": {"rules": [[true, ["layer", "read"]]]}, "4d50eb257549436414643a71e057091a": {"rules": [[true, ["view", "read"]]]}}}]')
3132
- users = s_t_utils.deguidify('[{"type": "user", "iden": "a357138db50780b62093a6ce0d057fd8", "name": "root", "rules": [], "roles": [], "admin": true, "email": null, "locked": false, "archived": false, "authgates": {"46cfde2c1682566602860f8df7d0cc83": {"admin": true}, "4d50eb257549436414643a71e057091a": {"admin": true}}}, {"type": "user", "iden": "f77ac6744671a845c27e571071877827", "name": "visi", "rules": [[true, ["cron", "add"]], [true, ["dmon", "add"]], [true, ["trigger", "add"]]], "roles": [{"type": "role", "iden": "e1ef725990aa62ae3c4b98be8736d89f", "name": "all", "rules": [], "authgates": {"46cfde2c1682566602860f8df7d0cc83": {"rules": [[true, ["layer", "read"]]]}, "4d50eb257549436414643a71e057091a": {"rules": [[true, ["view", "read"]]]}}}], "admin": false, "email": null, "locked": false, "archived": false, "authgates": {"f21b7ae79c2dacb89484929a8409e5d8": {"admin": true}, "d7d0380dd4e743e35af31a20d014ed48": {"admin": true}}}]')
3133
- gates = s_t_utils.deguidify('[{"iden": "46cfde2c1682566602860f8df7d0cc83", "type": "layer", "users": [{"iden": "a357138db50780b62093a6ce0d057fd8", "rules": [], "admin": true}], "roles": [{"iden": "e1ef725990aa62ae3c4b98be8736d89f", "rules": [[true, ["layer", "read"]]], "admin": false}]}, {"iden": "d7d0380dd4e743e35af31a20d014ed48", "type": "trigger", "users": [{"iden": "f77ac6744671a845c27e571071877827", "rules": [], "admin": true}], "roles": []}, {"iden": "f21b7ae79c2dacb89484929a8409e5d8", "type": "cronjob", "users": [{"iden": "f77ac6744671a845c27e571071877827", "rules": [], "admin": true}], "roles": []}, {"iden": "4d50eb257549436414643a71e057091a", "type": "view", "users": [{"iden": "a357138db50780b62093a6ce0d057fd8", "rules": [], "admin": true}], "roles": [{"iden": "e1ef725990aa62ae3c4b98be8736d89f", "rules": [[true, ["view", "read"]]], "admin": false}]}, {"iden": "cortex", "type": "cortex", "users": [], "roles": []}]')
3137
+ roles = s_t_utils.deguidify('[{"type":"role","iden":"e1ef725990aa62ae3c4b98be8736d89f","name":"all","rules":[],"authgates":{"46cfde2c1682566602860f8df7d0cc83":{"rules":[[true,["layer","read"]]]},"4d50eb257549436414643a71e057091a":{"rules":[[true,["view","read"]]]}}}]')
3138
+ users = s_t_utils.deguidify('[{"type":"user","iden":"a357138db50780b62093a6ce0d057fd8","name":"root","rules":[],"roles":[],"admin":true,"email":null,"locked":false,"archived":false,"authgates":{"46cfde2c1682566602860f8df7d0cc83":{"admin":true},"4d50eb257549436414643a71e057091a":{"admin":true}}},{"type":"user","iden":"f77ac6744671a845c27e571071877827","name":"visi","rules":[[true,["cron","add"]],[true,["dmon","add"]],[true,["trigger","add"]]],"roles":[{"type":"role","iden":"e1ef725990aa62ae3c4b98be8736d89f","name":"all","rules":[],"authgates":{"46cfde2c1682566602860f8df7d0cc83":{"rules":[[true,["layer","read"]]]},"4d50eb257549436414643a71e057091a":{"rules":[[true,["view","read"]]]}}}],"admin":false,"email":null,"locked":false,"archived":false,"authgates":{"f21b7ae79c2dacb89484929a8409e5d8":{"admin":true},"d7d0380dd4e743e35af31a20d014ed48":{"admin":true}}}]')
3139
+ gates = s_t_utils.deguidify('[{"iden":"46cfde2c1682566602860f8df7d0cc83","type":"layer","users":[{"iden":"a357138db50780b62093a6ce0d057fd8","rules":[],"admin":true}],"roles":[{"iden":"e1ef725990aa62ae3c4b98be8736d89f","rules":[[true,["layer","read"]]],"admin":false}]},{"iden":"d7d0380dd4e743e35af31a20d014ed48","type":"trigger","users":[{"iden":"f77ac6744671a845c27e571071877827","rules":[],"admin":true}],"roles":[]},{"iden":"f21b7ae79c2dacb89484929a8409e5d8","type":"cronjob","users":[{"iden":"f77ac6744671a845c27e571071877827","rules":[],"admin":true}],"roles":[]},{"iden":"4d50eb257549436414643a71e057091a","type":"view","users":[{"iden":"a357138db50780b62093a6ce0d057fd8","rules":[],"admin":true}],"roles":[{"iden":"e1ef725990aa62ae3c4b98be8736d89f","rules":[[true,["view","read"]]],"admin":false}]},{"iden":"cortex","type":"cortex","users":[],"roles":[]}]')
3134
3140
 
3135
- self.eq(roles, s_t_utils.deguidify(json.dumps(await core.callStorm('return($lib.auth.roles.list())'))))
3136
- self.eq(users, s_t_utils.deguidify(json.dumps(await core.callStorm('return($lib.auth.users.list())'))))
3137
- self.eq(gates, s_t_utils.deguidify(json.dumps(await core.callStorm('return($lib.auth.gates.list())'))))
3141
+ self.eq(roles, s_t_utils.deguidify(s_json.dumps(await core.callStorm('return($lib.auth.roles.list())')).decode()))
3142
+ self.eq(users, s_t_utils.deguidify(s_json.dumps(await core.callStorm('return($lib.auth.users.list())')).decode()))
3143
+ self.eq(gates, s_t_utils.deguidify(s_json.dumps(await core.callStorm('return($lib.auth.gates.list())')).decode()))
3138
3144
 
3139
3145
  with self.raises(s_exc.BadTypeValu):
3140
3146
  await core.nodes('[ it:dev:str=foo +#test.newp ]')
@@ -1,5 +1,4 @@
1
1
  import copy
2
- import json
3
2
  import regex
4
3
  import pathlib
5
4
  import argparse
@@ -11,6 +10,7 @@ import synapse.data as s_data
11
10
  import synapse.common as s_common
12
11
 
13
12
  import synapse.lib.cell as s_cell
13
+ import synapse.lib.json as s_json
14
14
  import synapse.lib.config as s_config
15
15
 
16
16
  import synapse.tests.utils as s_test
@@ -396,7 +396,7 @@ class ConfTest(s_test.SynTest):
396
396
  self.true(filename.exists())
397
397
 
398
398
  with filename.open() as fp:
399
- schema = json.load(fp)
399
+ schema = s_json.load(fp)
400
400
 
401
401
  self.eq(schema, s_config.localSchemaRefHandler(
402
402
  "http://raw.githubusercontent.com/oasis-open/cti-stix2-json-schemas/stix2.1/schemas/common/core.json"
@@ -1,8 +1,8 @@
1
1
  import io
2
- import json
3
2
 
4
3
  import synapse.common as s_common
5
4
 
5
+ import synapse.lib.json as s_json
6
6
  import synapse.lib.msgpack as s_msgpack
7
7
  import synapse.lib.encoding as s_encoding
8
8
 
@@ -190,7 +190,7 @@ class EncTest(s_t_utils.SynTest):
190
190
 
191
191
  }
192
192
 
193
- buf = io.BytesIO(json.dumps(data).encode())
193
+ buf = io.BytesIO(s_json.dumps(data))
194
194
 
195
195
  lines = list(s_encoding.iterdata(buf, format='json'))
196
196
  self.len(1, lines)
@@ -192,17 +192,17 @@ Queries = [
192
192
  '[ test:str=woot .seen=(2014,2015) ]',
193
193
  '[ test:str=woot .seen=20 ]',
194
194
  '[-#foo]',
195
- '[meta:seen=((test:str, foobar), (test:str, foo))]',
196
- '[meta:seen=((test:comp, (2048, horton)), (test:comp, (4096, whoville)))]',
197
- '[meta:seen=((test:comp, (9001, "A mean one")), (test:comp, (40000, greeneggs)))]',
198
- '[meta:seen=((test:int, 16), (test:comp, (9999, greenham)))]',
199
- '[meta:seen=((test:str, 123), (test:int, 123))]',
195
+ '[meta:source=((test:str, foobar), (test:str, foo))]',
196
+ '[meta:source=((test:comp, (2048, horton)), (test:comp, (4096, whoville)))]',
197
+ '[meta:source=((test:comp, (9001, "A mean one")), (test:comp, (40000, greeneggs)))]',
198
+ '[meta:source=((test:int, 16), (test:comp, (9999, greenham)))]',
199
+ '[meta:source=((test:str, 123), (test:int, 123))]',
200
200
  '[inet:dns:query=(tcp://1.2.3.4, "", 1)]',
201
201
  '[inet:dns:query=(tcp://1.2.3.4, "foo*.haha.com", 1)]',
202
202
  '[inet:ipv4=1.2.3.1-1.2.3.3]',
203
- '[inet:ipv4=1.2.3.4 :asn=10] [meta:seen=(abcd, (inet:asn, 10))]',
204
- '[meta:seen=(abcd, (test:str, pennywise))]',
205
- '[meta:source=abcd +#omit.nopiv] [meta:seen=(abcd, (test:pivtarg, foo))]',
203
+ '[inet:ipv4=1.2.3.4 :asn=10] [meta:source=(abcd, (inet:asn, 10))]',
204
+ '[meta:source=(abcd, (test:str, pennywise))]',
205
+ '[meta:source=abcd +#omit.nopiv] [meta:source=(abcd, (test:pivtarg, foo))]',
206
206
  '[test:comp=(1234, 5678)]',
207
207
  '[test:comp=(3, foob) +#meep.gorp +#bleep.zlorp +#cond]',
208
208
  '[test:guid="*" :tick=2001]',
@@ -220,8 +220,8 @@ Queries = [
220
220
  '[test:str=foo :tick=201808021201]',
221
221
  '[test:str=hehe] | iden abcd | count',
222
222
  '[test:str=hello]',
223
- 'meta:seen +:node*range=((test:comp, (1000, green)), (test:comp, (3000, ham)))',
224
- 'meta:seen',
223
+ 'meta:source +:node*range=((test:comp, (1000, green)), (test:comp, (3000, ham)))',
224
+ 'meta:source',
225
225
  'file:bytes:size=4',
226
226
  'for $fqdn in $fqdns { [ inet:fqdn=$fqdn ] }',
227
227
  'for ($fqdn, $ipv4) in $dnsa { [ inet:dns:a=($fqdn,$ipv4) ] }',
@@ -232,8 +232,8 @@ Queries = [
232
232
  'geo:place:latlong*near=(("34.118560", "-118.300370"), 50m)',
233
233
  'geo:place:latlong*near=((0, 0), 50m)',
234
234
  'geo:place:latlong*near=((34.1, -118.3), 10km)',
235
- 'geo:place=$place <- meta:seen <- *',
236
- 'geo:place=$place <- meta:seen <- ps:person',
235
+ 'geo:place=$place <- meta:source <- *',
236
+ 'geo:place=$place <- meta:source <- ps:person',
237
237
  'geo:place=abcd $latlong=:latlong $radius=:radius | spin | tel:mob:telem:latlong*near=($latlong, 3km)',
238
238
  'meta:note=abcd | noderefs -d 2 --join',
239
239
  'help',
@@ -285,16 +285,16 @@ Queries = [
285
285
  'inet:user | limit 10 | +inet:user=visi',
286
286
  'inet:user | limit 10 | [ +#foo.bar ]',
287
287
  'media:news = 00a1f0d928e25729b9e86e2d08c127ce [ :summary = \"\" ]',
288
- 'meta:seen:meta:source=$sorc -> *',
289
- 'meta:seen:meta:source=$sorc :node -> *',
288
+ 'meta:source:meta:source=$sorc -> *',
289
+ 'meta:source:meta:source=$sorc :node -> *',
290
290
  'meta:source=8f1401de15918358d5247e21ca29a814',
291
291
  'movetag a.b a.m',
292
292
  'movetag hehe woot',
293
- 'ps:person=$pers -> meta:seen -> *',
294
- 'ps:person=$pers -> meta:seen -> geo:place',
295
- 'ps:person=$pers -> meta:seen +:time@=(2014,2017) -> geo:place',
296
- 'ps:person=$pers -> meta:seen -> *',
297
- 'ps:person=$pers -> meta:seen :node -> *',
293
+ 'ps:person=$pers -> meta:source -> *',
294
+ 'ps:person=$pers -> meta:source -> geo:place',
295
+ 'ps:person=$pers -> meta:source +:time@=(2014,2017) -> geo:place',
296
+ 'ps:person=$pers -> meta:source -> *',
297
+ 'ps:person=$pers -> meta:source :node -> *',
298
298
  'reindex --form-counts',
299
299
  'sudo | [ inet:ipv4=1.2.3.4 ]',
300
300
  'sudo | [ test:cycle0=foo :test:cycle1=bar ]',
@@ -444,12 +444,12 @@ Queries = [
444
444
  'test:str=bar <- *',
445
445
  'test:str=bar test:pivcomp=(foo,bar) [+#test.bar]',
446
446
  'test:str=foo +#lol@=2016',
447
- 'test:str=foo <+- meta:seen',
448
- 'test:str=foo <- meta:seen',
447
+ 'test:str=foo <+- meta:source',
448
+ 'test:str=foo <- meta:source',
449
449
  'test:str=foo | delnode',
450
- 'test:str=foobar -+> meta:seen',
451
- 'test:str=foobar -> meta:seen <+- test:str',
452
- 'test:str=foobar -> meta:seen <- test:str',
450
+ 'test:str=foobar -+> meta:source',
451
+ 'test:str=foobar -> meta:source <+- test:str',
452
+ 'test:str=foobar -> meta:source <- test:str',
453
453
  'test:str=hello [:tick="2001"]',
454
454
  'test:str=hello [:tick="2002"]',
455
455
  'test:str=pennywise | noderefs --join -d 9 --traverse-edge',
@@ -476,7 +476,7 @@ Queries = [
476
476
  inet:fqdn | graph
477
477
  --degrees 2
478
478
  --filter { -#nope }
479
- --pivot { <- meta:seen <- meta:source }
479
+ --pivot { <- meta:source <- meta:source }
480
480
  --form-pivot inet:fqdn {<- * | limit 20}
481
481
  --form-pivot inet:fqdn {-> * | limit 20}
482
482
  --form-filter inet:fqdn {-inet:fqdn:issuffix=1}
@@ -514,7 +514,7 @@ Queries = [
514
514
 
515
515
  {[ inet:email:message:attachment=($node, "*") ] -inet:email:message [ :name=sploit.exe ]}
516
516
 
517
- {[ meta:seen=($node, ('inet:email:header', ('to', 'Visi Kensho <visi@vertex.link>'))) ]}
517
+ {[ meta:source=($node, ('inet:email:header', ('to', 'Visi Kensho <visi@vertex.link>'))) ]}
518
518
  ''',
519
519
  '$x = $(1 / 3)',
520
520
  '$x = $(1 * 3)',
@@ -690,18 +690,18 @@ Queries = [
690
690
  'reverse(*$form=$valu)',
691
691
  'test:str=foobar -> inet:dns*',
692
692
  'test:str=foobar -> inet:dns:*',
693
- 'test:str=foobar -> (meta:seen, inet:dns:a)',
694
- 'test:str=foobar -> (meta:seen, inet:dns*)',
693
+ 'test:str=foobar -> (meta:source, inet:dns:a)',
694
+ 'test:str=foobar -> (meta:source, inet:dns*)',
695
695
  'test:str=foobar -> $foo',
696
696
  'test:str=foobar -+> inet:dns*',
697
697
  'test:str=foobar -+> inet:dns:*',
698
- 'test:str=foobar -+> (meta:seen, inet:dns:a)',
699
- 'test:str=foobar -+> (meta:seen, inet:dns*)',
698
+ 'test:str=foobar -+> (meta:source, inet:dns:a)',
699
+ 'test:str=foobar -+> (meta:source, inet:dns*)',
700
700
  'test:str=foobar -+> $foo',
701
701
  'test:str=foobar -(refs)> inet:dns:*',
702
- 'inet:fqdn=foo.com :zone -> (meta:seen, inet:dns:a)',
702
+ 'inet:fqdn=foo.com :zone -> (meta:source, inet:dns:a)',
703
703
  'inet:fqdn=foo.com :zone -> $foo',
704
- 'inet:fqdn=foo.com :zone -+> (meta:seen, inet:dns:a)',
704
+ 'inet:fqdn=foo.com :zone -+> (meta:source, inet:dns:a)',
705
705
  'inet:fqdn=foo.com :zone -+> $foo',
706
706
  'test:*#foo',
707
707
  'test:*#foo@=2016',
@@ -933,17 +933,17 @@ _ParseResults = [
933
933
  'Query: [EditNodeAdd: [FormName: [Const: test:str], Const: =, Const: woot], EditPropSet: [UnivProp: [Const: .seen], Const: =, List: [Const: 2014, Const: 2015]]]',
934
934
  'Query: [EditNodeAdd: [FormName: [Const: test:str], Const: =, Const: woot], EditPropSet: [UnivProp: [Const: .seen], Const: =, Const: 20]]',
935
935
  'Query: [EditTagDel: [TagName: [Const: foo]]]',
936
- 'Query: [EditNodeAdd: [FormName: [Const: meta:seen], Const: =, List: [List: [Const: test:str, Const: foobar], List: [Const: test:str, Const: foo]]]]',
937
- 'Query: [EditNodeAdd: [FormName: [Const: meta:seen], Const: =, List: [List: [Const: test:comp, List: [Const: 2048, Const: horton]], List: [Const: test:comp, List: [Const: 4096, Const: whoville]]]]]',
938
- 'Query: [EditNodeAdd: [FormName: [Const: meta:seen], Const: =, List: [List: [Const: test:comp, List: [Const: 9001, Const: A mean one]], List: [Const: test:comp, List: [Const: 40000, Const: greeneggs]]]]]',
939
- 'Query: [EditNodeAdd: [FormName: [Const: meta:seen], Const: =, List: [List: [Const: test:int, Const: 16], List: [Const: test:comp, List: [Const: 9999, Const: greenham]]]]]',
940
- 'Query: [EditNodeAdd: [FormName: [Const: meta:seen], Const: =, List: [List: [Const: test:str, Const: 123], List: [Const: test:int, Const: 123]]]]',
936
+ 'Query: [EditNodeAdd: [FormName: [Const: meta:source], Const: =, List: [List: [Const: test:str, Const: foobar], List: [Const: test:str, Const: foo]]]]',
937
+ 'Query: [EditNodeAdd: [FormName: [Const: meta:source], Const: =, List: [List: [Const: test:comp, List: [Const: 2048, Const: horton]], List: [Const: test:comp, List: [Const: 4096, Const: whoville]]]]]',
938
+ 'Query: [EditNodeAdd: [FormName: [Const: meta:source], Const: =, List: [List: [Const: test:comp, List: [Const: 9001, Const: A mean one]], List: [Const: test:comp, List: [Const: 40000, Const: greeneggs]]]]]',
939
+ 'Query: [EditNodeAdd: [FormName: [Const: meta:source], Const: =, List: [List: [Const: test:int, Const: 16], List: [Const: test:comp, List: [Const: 9999, Const: greenham]]]]]',
940
+ 'Query: [EditNodeAdd: [FormName: [Const: meta:source], Const: =, List: [List: [Const: test:str, Const: 123], List: [Const: test:int, Const: 123]]]]',
941
941
  'Query: [EditNodeAdd: [FormName: [Const: inet:dns:query], Const: =, List: [Const: tcp://1.2.3.4, Const: , Const: 1]]]',
942
942
  'Query: [EditNodeAdd: [FormName: [Const: inet:dns:query], Const: =, List: [Const: tcp://1.2.3.4, Const: foo*.haha.com, Const: 1]]]',
943
943
  'Query: [EditNodeAdd: [FormName: [Const: inet:ipv4], Const: =, Const: 1.2.3.1-1.2.3.3]]',
944
- 'Query: [EditNodeAdd: [FormName: [Const: inet:ipv4], Const: =, Const: 1.2.3.4], EditPropSet: [RelProp: [Const: asn], Const: =, Const: 10], EditNodeAdd: [FormName: [Const: meta:seen], Const: =, List: [Const: abcd, List: [Const: inet:asn, Const: 10]]]]',
945
- 'Query: [EditNodeAdd: [FormName: [Const: meta:seen], Const: =, List: [Const: abcd, List: [Const: test:str, Const: pennywise]]]]',
946
- 'Query: [EditNodeAdd: [FormName: [Const: meta:source], Const: =, Const: abcd], EditTagAdd: [TagName: [Const: omit, Const: nopiv]], EditNodeAdd: [FormName: [Const: meta:seen], Const: =, List: [Const: abcd, List: [Const: test:pivtarg, Const: foo]]]]',
944
+ 'Query: [EditNodeAdd: [FormName: [Const: inet:ipv4], Const: =, Const: 1.2.3.4], EditPropSet: [RelProp: [Const: asn], Const: =, Const: 10], EditNodeAdd: [FormName: [Const: meta:source], Const: =, List: [Const: abcd, List: [Const: inet:asn, Const: 10]]]]',
945
+ 'Query: [EditNodeAdd: [FormName: [Const: meta:source], Const: =, List: [Const: abcd, List: [Const: test:str, Const: pennywise]]]]',
946
+ 'Query: [EditNodeAdd: [FormName: [Const: meta:source], Const: =, Const: abcd], EditTagAdd: [TagName: [Const: omit, Const: nopiv]], EditNodeAdd: [FormName: [Const: meta:source], Const: =, List: [Const: abcd, List: [Const: test:pivtarg, Const: foo]]]]',
947
947
  'Query: [EditNodeAdd: [FormName: [Const: test:comp], Const: =, List: [Const: 1234, Const: 5678]]]',
948
948
  'Query: [EditNodeAdd: [FormName: [Const: test:comp], Const: =, List: [Const: 3, Const: foob]], EditTagAdd: [TagName: [Const: meep, Const: gorp]], EditTagAdd: [TagName: [Const: bleep, Const: zlorp]], EditTagAdd: [TagName: [Const: cond]]]',
949
949
  'Query: [EditNodeAdd: [FormName: [Const: test:guid], Const: =, Const: *], EditPropSet: [RelProp: [Const: tick], Const: =, Const: 2001]]',
@@ -961,8 +961,8 @@ _ParseResults = [
961
961
  'Query: [EditNodeAdd: [FormName: [Const: test:str], Const: =, Const: foo], EditPropSet: [RelProp: [Const: tick], Const: =, Const: 201808021201]]',
962
962
  'Query: [EditNodeAdd: [FormName: [Const: test:str], Const: =, Const: hehe], CmdOper: [Const: iden, List: [Const: abcd]], CmdOper: [Const: count, Const: ()]]',
963
963
  'Query: [EditNodeAdd: [FormName: [Const: test:str], Const: =, Const: hello]]',
964
- 'Query: [LiftProp: [Const: meta:seen], FiltOper: [Const: +, RelPropCond: [RelPropValue: [RelProp: [Const: node]], Const: range=, List: [List: [Const: test:comp, List: [Const: 1000, Const: green]], List: [Const: test:comp, List: [Const: 3000, Const: ham]]]]]]',
965
- 'Query: [LiftProp: [Const: meta:seen]]',
964
+ 'Query: [LiftProp: [Const: meta:source], FiltOper: [Const: +, RelPropCond: [RelPropValue: [RelProp: [Const: node]], Const: range=, List: [List: [Const: test:comp, List: [Const: 1000, Const: green]], List: [Const: test:comp, List: [Const: 3000, Const: ham]]]]]]',
965
+ 'Query: [LiftProp: [Const: meta:source]]',
966
966
  'Query: [LiftPropBy: [Const: file:bytes:size, Const: =, Const: 4]]',
967
967
  'Query: [ForLoop: [Const: fqdn, VarValue: [Const: fqdns], SubQuery: [Query: [EditNodeAdd: [FormName: [Const: inet:fqdn], Const: =, VarValue: [Const: fqdn]]]]]]',
968
968
  "Query: [ForLoop: [VarList: ['fqdn', 'ipv4'], VarValue: [Const: dnsa], SubQuery: [Query: [EditNodeAdd: [FormName: [Const: inet:dns:a], Const: =, List: [VarValue: [Const: fqdn], VarValue: [Const: ipv4]]]]]]]",
@@ -973,8 +973,8 @@ _ParseResults = [
973
973
  'Query: [LiftPropBy: [Const: geo:place:latlong, Const: near=, List: [List: [Const: 34.118560, Const: -118.300370], Const: 50m]]]',
974
974
  'Query: [LiftPropBy: [Const: geo:place:latlong, Const: near=, List: [List: [Const: 0, Const: 0], Const: 50m]]]',
975
975
  'Query: [LiftPropBy: [Const: geo:place:latlong, Const: near=, List: [List: [Const: 34.1, Const: -118.3], Const: 10km]]]',
976
- 'Query: [LiftPropBy: [Const: geo:place, Const: =, VarValue: [Const: place]], PivotInFrom: [Const: meta:seen], isjoin=False, PivotIn: [], isjoin=False]',
977
- 'Query: [LiftPropBy: [Const: geo:place, Const: =, VarValue: [Const: place]], PivotInFrom: [Const: meta:seen], isjoin=False, PivotInFrom: [Const: ps:person], isjoin=False]',
976
+ 'Query: [LiftPropBy: [Const: geo:place, Const: =, VarValue: [Const: place]], PivotInFrom: [Const: meta:source], isjoin=False, PivotIn: [], isjoin=False]',
977
+ 'Query: [LiftPropBy: [Const: geo:place, Const: =, VarValue: [Const: place]], PivotInFrom: [Const: meta:source], isjoin=False, PivotInFrom: [Const: ps:person], isjoin=False]',
978
978
  'Query: [LiftPropBy: [Const: geo:place, Const: =, Const: abcd], SetVarOper: [Const: latlong, RelPropValue: [Const: latlong]], SetVarOper: [Const: radius, RelPropValue: [Const: radius]], CmdOper: [Const: spin, Const: ()], LiftPropBy: [Const: tel:mob:telem:latlong, Const: near=, List: [VarValue: [Const: latlong], Const: 3km]]]',
979
979
  'Query: [LiftPropBy: [Const: meta:note, Const: =, Const: abcd], CmdOper: [Const: noderefs, List: [Const: -d, Const: 2, Const: --join]]]',
980
980
  'Query: [CmdOper: [Const: help, Const: ()]]',
@@ -1026,16 +1026,16 @@ _ParseResults = [
1026
1026
  'Query: [LiftProp: [Const: inet:user], CmdOper: [Const: limit, List: [Const: 10]], FiltOper: [Const: +, AbsPropCond: [Const: inet:user, Const: =, Const: visi]]]',
1027
1027
  'Query: [LiftProp: [Const: inet:user], CmdOper: [Const: limit, List: [Const: 10]], EditTagAdd: [TagName: [Const: foo, Const: bar]]]',
1028
1028
  'Query: [LiftPropBy: [Const: media:news, Const: =, Const: 00a1f0d928e25729b9e86e2d08c127ce], EditPropSet: [RelProp: [Const: summary], Const: =, Const: ]]',
1029
- 'Query: [LiftPropBy: [Const: meta:seen:meta:source, Const: =, VarValue: [Const: sorc]], PivotOut: [], isjoin=False]',
1030
- 'Query: [LiftPropBy: [Const: meta:seen:meta:source, Const: =, VarValue: [Const: sorc]], PropPivotOut: [RelProp: [Const: node]], isjoin=False]',
1029
+ 'Query: [LiftPropBy: [Const: meta:source:meta:source, Const: =, VarValue: [Const: sorc]], PivotOut: [], isjoin=False]',
1030
+ 'Query: [LiftPropBy: [Const: meta:source:meta:source, Const: =, VarValue: [Const: sorc]], PropPivotOut: [RelProp: [Const: node]], isjoin=False]',
1031
1031
  'Query: [LiftPropBy: [Const: meta:source, Const: =, Const: 8f1401de15918358d5247e21ca29a814]]',
1032
1032
  'Query: [CmdOper: [Const: movetag, List: [Const: a.b, Const: a.m]]]',
1033
1033
  'Query: [CmdOper: [Const: movetag, List: [Const: hehe, Const: woot]]]',
1034
- 'Query: [LiftPropBy: [Const: ps:person, Const: =, VarValue: [Const: pers]], FormPivot: [Const: meta:seen], isjoin=False, PivotOut: [], isjoin=False]',
1035
- 'Query: [LiftPropBy: [Const: ps:person, Const: =, VarValue: [Const: pers]], FormPivot: [Const: meta:seen], isjoin=False, FormPivot: [Const: geo:place], isjoin=False]',
1036
- 'Query: [LiftPropBy: [Const: ps:person, Const: =, VarValue: [Const: pers]], FormPivot: [Const: meta:seen], isjoin=False, FiltOper: [Const: +, RelPropCond: [RelPropValue: [RelProp: [Const: time]], Const: @=, List: [Const: 2014, Const: 2017]]], FormPivot: [Const: geo:place], isjoin=False]',
1037
- 'Query: [LiftPropBy: [Const: ps:person, Const: =, VarValue: [Const: pers]], FormPivot: [Const: meta:seen], isjoin=False, PivotOut: [], isjoin=False]',
1038
- 'Query: [LiftPropBy: [Const: ps:person, Const: =, VarValue: [Const: pers]], FormPivot: [Const: meta:seen], isjoin=False, PropPivotOut: [RelProp: [Const: node]], isjoin=False]',
1034
+ 'Query: [LiftPropBy: [Const: ps:person, Const: =, VarValue: [Const: pers]], FormPivot: [Const: meta:source], isjoin=False, PivotOut: [], isjoin=False]',
1035
+ 'Query: [LiftPropBy: [Const: ps:person, Const: =, VarValue: [Const: pers]], FormPivot: [Const: meta:source], isjoin=False, FormPivot: [Const: geo:place], isjoin=False]',
1036
+ 'Query: [LiftPropBy: [Const: ps:person, Const: =, VarValue: [Const: pers]], FormPivot: [Const: meta:source], isjoin=False, FiltOper: [Const: +, RelPropCond: [RelPropValue: [RelProp: [Const: time]], Const: @=, List: [Const: 2014, Const: 2017]]], FormPivot: [Const: geo:place], isjoin=False]',
1037
+ 'Query: [LiftPropBy: [Const: ps:person, Const: =, VarValue: [Const: pers]], FormPivot: [Const: meta:source], isjoin=False, PivotOut: [], isjoin=False]',
1038
+ 'Query: [LiftPropBy: [Const: ps:person, Const: =, VarValue: [Const: pers]], FormPivot: [Const: meta:source], isjoin=False, PropPivotOut: [RelProp: [Const: node]], isjoin=False]',
1039
1039
  'Query: [CmdOper: [Const: reindex, List: [Const: --form-counts]]]',
1040
1040
  'Query: [CmdOper: [Const: sudo, Const: ()], EditNodeAdd: [FormName: [Const: inet:ipv4], Const: =, Const: 1.2.3.4]]',
1041
1041
  'Query: [CmdOper: [Const: sudo, Const: ()], EditNodeAdd: [FormName: [Const: test:cycle0], Const: =, Const: foo], EditPropSet: [RelProp: [Const: test:cycle1], Const: =, Const: bar]]',
@@ -1185,12 +1185,12 @@ _ParseResults = [
1185
1185
  'Query: [LiftPropBy: [Const: test:str, Const: =, Const: bar], PivotIn: [], isjoin=False]',
1186
1186
  'Query: [LiftPropBy: [Const: test:str, Const: =, Const: bar], LiftPropBy: [Const: test:pivcomp, Const: =, List: [Const: foo, Const: bar]], EditTagAdd: [TagName: [Const: test, Const: bar]]]',
1187
1187
  'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foo], FiltOper: [Const: +, TagValuCond: [TagMatch: [Const: lol], Const: @=, Const: 2016]]]',
1188
- 'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foo], PivotInFrom: [Const: meta:seen], isjoin=True]',
1189
- 'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foo], PivotInFrom: [Const: meta:seen], isjoin=False]',
1188
+ 'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foo], PivotInFrom: [Const: meta:source], isjoin=True]',
1189
+ 'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foo], PivotInFrom: [Const: meta:source], isjoin=False]',
1190
1190
  'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foo], CmdOper: [Const: delnode, Const: ()]]',
1191
- 'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [Const: meta:seen], isjoin=True]',
1192
- 'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [Const: meta:seen], isjoin=False, PivotInFrom: [Const: test:str], isjoin=True]',
1193
- 'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [Const: meta:seen], isjoin=False, PivotInFrom: [Const: test:str], isjoin=False]',
1191
+ 'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [Const: meta:source], isjoin=True]',
1192
+ 'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [Const: meta:source], isjoin=False, PivotInFrom: [Const: test:str], isjoin=True]',
1193
+ 'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [Const: meta:source], isjoin=False, PivotInFrom: [Const: test:str], isjoin=False]',
1194
1194
  'Query: [LiftPropBy: [Const: test:str, Const: =, Const: hello], EditPropSet: [RelProp: [Const: tick], Const: =, Const: 2001]]',
1195
1195
  'Query: [LiftPropBy: [Const: test:str, Const: =, Const: hello], EditPropSet: [RelProp: [Const: tick], Const: =, Const: 2002]]',
1196
1196
  'Query: [LiftPropBy: [Const: test:str, Const: =, Const: pennywise], CmdOper: [Const: noderefs, List: [Const: --join, Const: -d, Const: 9, Const: --traverse-edge]]]',
@@ -1206,11 +1206,11 @@ _ParseResults = [
1206
1206
  'Query: [LiftProp: [Const: test:int]]',
1207
1207
  'Query: [LiftProp: [Const: test:int]]',
1208
1208
  'Query: [LiftProp: [Const: test:int]]',
1209
- 'Query: [LiftProp: [Const: inet:fqdn], CmdOper: [Const: graph, List: [Const: --degrees, Const: 2, Const: --filter, ArgvQuery: [Query: [FiltOper: [Const: -, TagCond: [TagMatch: [Const: nope]]]]], Const: --pivot, ArgvQuery: [Query: [PivotInFrom: [Const: meta:seen], isjoin=False, PivotInFrom: [Const: meta:source], isjoin=False]], Const: --form-pivot, Const: inet:fqdn, ArgvQuery: [Query: [PivotIn: [], isjoin=False, CmdOper: [Const: limit, List: [Const: 20]]]], Const: --form-pivot, Const: inet:fqdn, ArgvQuery: [Query: [PivotOut: [], isjoin=False, CmdOper: [Const: limit, List: [Const: 20]]]], Const: --form-filter, Const: inet:fqdn, ArgvQuery: [Query: [FiltOper: [Const: -, AbsPropCond: [Const: inet:fqdn:issuffix, Const: =, Const: 1]]]], Const: --form-pivot, Const: syn:tag, ArgvQuery: [Query: [PivotOut: [], isjoin=False]], Const: --form-pivot, Const: *, ArgvQuery: [Query: [PivotToTags: [TagMatch: []], isjoin=False]]]]]',
1209
+ 'Query: [LiftProp: [Const: inet:fqdn], CmdOper: [Const: graph, List: [Const: --degrees, Const: 2, Const: --filter, ArgvQuery: [Query: [FiltOper: [Const: -, TagCond: [TagMatch: [Const: nope]]]]], Const: --pivot, ArgvQuery: [Query: [PivotInFrom: [Const: meta:source], isjoin=False, PivotInFrom: [Const: meta:source], isjoin=False]], Const: --form-pivot, Const: inet:fqdn, ArgvQuery: [Query: [PivotIn: [], isjoin=False, CmdOper: [Const: limit, List: [Const: 20]]]], Const: --form-pivot, Const: inet:fqdn, ArgvQuery: [Query: [PivotOut: [], isjoin=False, CmdOper: [Const: limit, List: [Const: 20]]]], Const: --form-filter, Const: inet:fqdn, ArgvQuery: [Query: [FiltOper: [Const: -, AbsPropCond: [Const: inet:fqdn:issuffix, Const: =, Const: 1]]]], Const: --form-pivot, Const: syn:tag, ArgvQuery: [Query: [PivotOut: [], isjoin=False]], Const: --form-pivot, Const: *, ArgvQuery: [Query: [PivotToTags: [TagMatch: []], isjoin=False]]]]]',
1210
1210
  "Query: [ForLoop: [Const: foo, VarValue: [Const: foos], SubQuery: [Query: [VarListSetOper: [VarList: ['fqdn', 'ipv4'], FuncCall: [VarDeref: [VarValue: [Const: foo], Const: split], CallArgs: [Const: |], CallKwargs: []]], EditNodeAdd: [FormName: [Const: inet:dns:a], Const: =, List: [VarValue: [Const: fqdn], VarValue: [Const: ipv4]]]]]]]",
1211
1211
  'Query: [ForLoop: [Const: tag, FuncCall: [VarDeref: [VarValue: [Const: node], Const: tags], CallArgs: [], CallKwargs: []], SubQuery: [Query: [FormPivot: [Const: test:int], isjoin=False, EditTagAdd: [TagName: [VarValue: [Const: tag]]]]]]]',
1212
1212
  'Query: [ForLoop: [Const: tag, FuncCall: [VarDeref: [VarValue: [Const: node], Const: tags], CallArgs: [Const: fo*], CallKwargs: []], SubQuery: [Query: [FormPivot: [Const: test:int], isjoin=False, EditTagDel: [TagName: [VarValue: [Const: tag]]]]]]]',
1213
- 'Query: [EditNodeAdd: [FormName: [Const: inet:email:message], Const: =, Const: *], EditPropSet: [RelProp: [Const: to], Const: =, Const: woot@woot.com], EditPropSet: [RelProp: [Const: from], Const: =, Const: visi@vertex.link], EditPropSet: [RelProp: [Const: replyto], Const: =, Const: root@root.com], EditPropSet: [RelProp: [Const: subject], Const: =, Const: hi there], EditPropSet: [RelProp: [Const: date], Const: =, Const: 2015], EditPropSet: [RelProp: [Const: body], Const: =, Const: there are mad sploitz here!], EditPropSet: [RelProp: [Const: bytes], Const: =, Const: *], SubQuery: [Query: [EditNodeAdd: [FormName: [Const: inet:email:message:link], Const: =, List: [VarValue: [Const: node], Const: https://www.vertex.link]]]], SubQuery: [Query: [EditNodeAdd: [FormName: [Const: inet:email:message:attachment], Const: =, List: [VarValue: [Const: node], Const: *]], FiltOper: [Const: -, HasAbsPropCond: [Const: inet:email:message]], EditPropSet: [RelProp: [Const: name], Const: =, Const: sploit.exe]]], SubQuery: [Query: [EditNodeAdd: [FormName: [Const: meta:seen], Const: =, List: [VarValue: [Const: node], List: [Const: inet:email:header, List: [Const: to, Const: Visi Kensho <visi@vertex.link>]]]]]]]',
1213
+ 'Query: [EditNodeAdd: [FormName: [Const: inet:email:message], Const: =, Const: *], EditPropSet: [RelProp: [Const: to], Const: =, Const: woot@woot.com], EditPropSet: [RelProp: [Const: from], Const: =, Const: visi@vertex.link], EditPropSet: [RelProp: [Const: replyto], Const: =, Const: root@root.com], EditPropSet: [RelProp: [Const: subject], Const: =, Const: hi there], EditPropSet: [RelProp: [Const: date], Const: =, Const: 2015], EditPropSet: [RelProp: [Const: body], Const: =, Const: there are mad sploitz here!], EditPropSet: [RelProp: [Const: bytes], Const: =, Const: *], SubQuery: [Query: [EditNodeAdd: [FormName: [Const: inet:email:message:link], Const: =, List: [VarValue: [Const: node], Const: https://www.vertex.link]]]], SubQuery: [Query: [EditNodeAdd: [FormName: [Const: inet:email:message:attachment], Const: =, List: [VarValue: [Const: node], Const: *]], FiltOper: [Const: -, HasAbsPropCond: [Const: inet:email:message]], EditPropSet: [RelProp: [Const: name], Const: =, Const: sploit.exe]]], SubQuery: [Query: [EditNodeAdd: [FormName: [Const: meta:source], Const: =, List: [VarValue: [Const: node], List: [Const: inet:email:header, List: [Const: to, Const: Visi Kensho <visi@vertex.link>]]]]]]]',
1214
1214
  'Query: [SetVarOper: [Const: x, DollarExpr: [ExprNode: [Const: 1, Const: /, Const: 3]]]]',
1215
1215
  'Query: [SetVarOper: [Const: x, DollarExpr: [ExprNode: [Const: 1, Const: *, Const: 3]]]]',
1216
1216
  'Query: [SetVarOper: [Const: x, DollarExpr: [ExprNode: [ExprNode: [Const: 1, Const: *, Const: 3], Const: +, Const: 2]]]]',
@@ -1340,18 +1340,18 @@ _ParseResults = [
1340
1340
  'Query: [LiftPropBy: [VarValue: [Const: form], Const: =, VarValue: [Const: valu]]]',
1341
1341
  'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [Const: inet:dns*], isjoin=False]',
1342
1342
  'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [Const: inet:dns:*], isjoin=False]',
1343
- 'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [List: [Const: meta:seen, Const: inet:dns:a]], isjoin=False]',
1344
- 'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [List: [Const: meta:seen, Const: inet:dns*]], isjoin=False]',
1343
+ 'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [List: [Const: meta:source, Const: inet:dns:a]], isjoin=False]',
1344
+ 'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [List: [Const: meta:source, Const: inet:dns*]], isjoin=False]',
1345
1345
  'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [VarValue: [Const: foo]], isjoin=False]',
1346
1346
  'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [Const: inet:dns*], isjoin=True]',
1347
1347
  'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [Const: inet:dns:*], isjoin=True]',
1348
- 'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [List: [Const: meta:seen, Const: inet:dns:a]], isjoin=True]',
1349
- 'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [List: [Const: meta:seen, Const: inet:dns*]], isjoin=True]',
1348
+ 'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [List: [Const: meta:source, Const: inet:dns:a]], isjoin=True]',
1349
+ 'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [List: [Const: meta:source, Const: inet:dns*]], isjoin=True]',
1350
1350
  'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], FormPivot: [VarValue: [Const: foo]], isjoin=True]',
1351
1351
  'Query: [LiftPropBy: [Const: test:str, Const: =, Const: foobar], N1Walk: [Const: refs, Const: inet:dns:*], isjoin=False]',
1352
- 'Query: [LiftPropBy: [Const: inet:fqdn, Const: =, Const: foo.com], PropPivot: [RelPropValue: [RelProp: [Const: zone]], List: [Const: meta:seen, Const: inet:dns:a]], isjoin=False]',
1352
+ 'Query: [LiftPropBy: [Const: inet:fqdn, Const: =, Const: foo.com], PropPivot: [RelPropValue: [RelProp: [Const: zone]], List: [Const: meta:source, Const: inet:dns:a]], isjoin=False]',
1353
1353
  'Query: [LiftPropBy: [Const: inet:fqdn, Const: =, Const: foo.com], PropPivot: [RelPropValue: [RelProp: [Const: zone]], VarValue: [Const: foo]], isjoin=False]',
1354
- 'Query: [LiftPropBy: [Const: inet:fqdn, Const: =, Const: foo.com], PropPivot: [RelPropValue: [RelProp: [Const: zone]], List: [Const: meta:seen, Const: inet:dns:a]], isjoin=True]',
1354
+ 'Query: [LiftPropBy: [Const: inet:fqdn, Const: =, Const: foo.com], PropPivot: [RelPropValue: [RelProp: [Const: zone]], List: [Const: meta:source, Const: inet:dns:a]], isjoin=True]',
1355
1355
  'Query: [LiftPropBy: [Const: inet:fqdn, Const: =, Const: foo.com], PropPivot: [RelPropValue: [RelProp: [Const: zone]], VarValue: [Const: foo]], isjoin=True]',
1356
1356
  'Query: [LiftFormTag: [Const: test:*, TagName: [Const: foo]]]',
1357
1357
  'Query: [LiftFormTag: [Const: test:*, TagName: [Const: foo], Const: @=, Const: 2016]]',
@@ -1,5 +1,4 @@
1
1
  import ssl
2
- import json
3
2
 
4
3
  import aiohttp
5
4
  import aiohttp.client_exceptions as a_exc
@@ -8,6 +7,7 @@ import synapse.common as s_common
8
7
  import synapse.tools.backup as s_backup
9
8
 
10
9
  import synapse.lib.coro as s_coro
10
+ import synapse.lib.json as s_json
11
11
  import synapse.lib.link as s_link
12
12
  import synapse.lib.httpapi as s_httpapi
13
13
  import synapse.lib.version as s_version
@@ -671,7 +671,7 @@ class HttpApiTest(s_tests.SynTest):
671
671
  if not byts:
672
672
  break
673
673
 
674
- podes.append(json.loads(byts))
674
+ podes.append(s_json.loads(byts))
675
675
 
676
676
  self.eq(podes[0][0], ('inet:ipv4', 0x01020304))
677
677
 
@@ -685,7 +685,7 @@ class HttpApiTest(s_tests.SynTest):
685
685
  if not byts:
686
686
  break
687
687
 
688
- msgs.append(json.loads(byts))
688
+ msgs.append(s_json.loads(byts))
689
689
  podes = [m[1] for m in msgs if m[0] == 'node']
690
690
  self.eq(podes[0][0], ('inet:ipv4', 0x05050505))
691
691
 
@@ -1322,7 +1322,7 @@ class HttpApiTest(s_tests.SynTest):
1322
1322
  if not byts:
1323
1323
  break
1324
1324
 
1325
- mesg = json.loads(byts)
1325
+ mesg = s_json.loads(byts)
1326
1326
 
1327
1327
  if mesg[0] == 'node':
1328
1328
  node = mesg[1]
@@ -1337,7 +1337,7 @@ class HttpApiTest(s_tests.SynTest):
1337
1337
  if not byts:
1338
1338
  break
1339
1339
 
1340
- mesg = json.loads(byts)
1340
+ mesg = s_json.loads(byts)
1341
1341
 
1342
1342
  if mesg[0] == 'node':
1343
1343
  node = mesg[1]
@@ -1354,7 +1354,7 @@ class HttpApiTest(s_tests.SynTest):
1354
1354
  if not byts:
1355
1355
  break
1356
1356
 
1357
- node = json.loads(byts)
1357
+ node = s_json.loads(byts)
1358
1358
 
1359
1359
  self.eq(0x01020304, node[0][1])
1360
1360
 
@@ -1365,7 +1365,7 @@ class HttpApiTest(s_tests.SynTest):
1365
1365
  if not byts:
1366
1366
  break
1367
1367
 
1368
- node = json.loads(byts)
1368
+ node = s_json.loads(byts)
1369
1369
 
1370
1370
  self.eq(0x01020304, node[0][1])
1371
1371
 
@@ -1385,8 +1385,8 @@ class HttpApiTest(s_tests.SynTest):
1385
1385
  break
1386
1386
 
1387
1387
  try:
1388
- node = json.loads(byts)
1389
- except json.JSONDecodeError:
1388
+ node = s_json.loads(byts)
1389
+ except s_exc.BadJsonText:
1390
1390
  bufr = jstr
1391
1391
  break
1392
1392
 
@@ -1407,8 +1407,8 @@ class HttpApiTest(s_tests.SynTest):
1407
1407
  break
1408
1408
 
1409
1409
  try:
1410
- mesg = json.loads(byts)
1411
- except json.JSONDecodeError:
1410
+ mesg = s_json.loads(byts)
1411
+ except s_exc.BadJsonText:
1412
1412
  bufr = jstr
1413
1413
  break
1414
1414
 
@@ -1427,7 +1427,7 @@ class HttpApiTest(s_tests.SynTest):
1427
1427
  if not byts:
1428
1428
  break
1429
1429
 
1430
- mesg = json.loads(byts)
1430
+ mesg = s_json.loads(byts)
1431
1431
  if mesg[0] == 'node':
1432
1432
  task = core.boss.tasks.get(list(core.boss.tasks.keys())[0])
1433
1433
  self.eq(core.view.iden, task.info.get('view'))
@@ -1445,7 +1445,7 @@ class HttpApiTest(s_tests.SynTest):
1445
1445
  if not byts:
1446
1446
  break
1447
1447
 
1448
- mesg = json.loads(byts)
1448
+ mesg = s_json.loads(byts)
1449
1449
  self.len(2, mesg) # Is if roughly shaped like a node?
1450
1450
  task = core.boss.tasks.get(list(core.boss.tasks.keys())[0])
1451
1451
  break