w332323 commited on
Commit
a786a75
·
1 Parent(s): ab5ec1f
Files changed (2) hide show
  1. README.md +11 -0
  2. decrypt.py +62 -0
README.md CHANGED
@@ -1,3 +1,14 @@
1
  ---
2
  license: mit
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
  ---
4
+
5
+ # MM-BrowseComp: A Comprehensive Benchmark for Multimodal Browsing Agents
6
+
7
+ Paper: https://arxiv.org/html/2508.13186v1
8
+
9
+ Code: https://github.com/MMBrowseComp/MM-BrowseComp
10
+
11
+
12
+
13
+ The specific evaluation methods can be found in our GitHub repository.
14
+
decrypt.py ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import base64
2
+ import hashlib
3
+ import argparse
4
+ import json
5
+ import sys
6
+
7
+ def derive_key(password: str, length: int) -> bytes:
8
+ hasher = hashlib.sha256()
9
+ hasher.update(password.encode())
10
+ key = hasher.digest()
11
+ return key * (length // len(key)) + key[: length % len(key)]
12
+
13
+ def encrypt(plaintext: str, password: str) -> str:
14
+ data = plaintext.encode()
15
+ key = derive_key(password, len(data))
16
+ encrypted = bytes(a ^ b for a, b in zip(data, key))
17
+ return base64.b64encode(encrypted).decode()
18
+
19
+ def decrypt(ciphertext_b64: str, password: str) -> str:
20
+ encrypted = base64.b64decode(ciphertext_b64)
21
+ key = derive_key(password, len(encrypted))
22
+ decrypted = bytes(a ^ b for a, b in zip(encrypted, key))
23
+ return decrypted.decode()
24
+
25
+ if __name__ == '__main__':
26
+ parser = argparse.ArgumentParser(description='Decrypt a JSONL file.')
27
+ parser.add_argument('input_file', help='The input file to decrypt.')
28
+ parser.add_argument('output_file', help='The output file to write decrypted data to.')
29
+
30
+ args = parser.parse_args()
31
+
32
+ decrypted_lines = []
33
+
34
+ with open(args.input_file, 'r', encoding='utf-8') as f_in:
35
+ for i, line in enumerate(f_in):
36
+ try:
37
+ data = json.loads(line)
38
+ password = data['canary']
39
+ if 'question' in data and isinstance(data['question'], str):
40
+ data['question'] = decrypt(data['question'], password)
41
+
42
+ if 'answer' in data and isinstance(data['answer'], str):
43
+ data['answer'] = decrypt(data['answer'], password)
44
+
45
+ if 'checklist' in data and isinstance(data['checklist'], list):
46
+ data['checklist'] = [decrypt(item, password) for item in data['checklist']]
47
+
48
+ decrypted_lines.append(json.dumps(data, ensure_ascii=False))
49
+
50
+ except json.JSONDecodeError:
51
+ print(f"Warning: Could not decode JSON on line {i+1}. Line kept as is.", file=sys.stderr)
52
+ decrypted_lines.append(line.strip())
53
+ except Exception as e:
54
+ print(f"An error occurred on line {i+1}: {e}", file=sys.stderr)
55
+ decrypted_lines.append(line.strip())
56
+
57
+
58
+ with open(args.output_file, 'w', encoding='utf-8') as f_out:
59
+ for line in decrypted_lines:
60
+ f_out.write(line + '\n')
61
+
62
+ print(f"Decrypted {len(decrypted_lines)} lines from {args.input_file} to {args.output_file}")