question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Unexpected token('CMPOP', ='=)

See original GitHub issue

Sample: https://app.any.run/tasks/03f85d8e-c349-48bc-b367-b7e6ab6b1f94/# Error message: Error [deobfuscator.py:2433 parse_tree = self.xlm_parser.parse(formula)]: Unexpected token Token(‘CMPOP’, ‘=’) at line 1, column 221. Expected one of: * $END

Issue: A sample cell is =""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""=RAND()=SUMPRODUCT(54623,42,452,452,452)=RAND()=SUMPRODUCT(54623,42,452,452,452)=RAND()=SUMPRODUCT(54623,42,452,452,452)=RAND()=SUMPRODUCT(54623,42,452,452,452)=RAND()=SUMPRODUCT(54623,42,452,452,452)=FORMULA('Doc4'!$AT$3&'Doc4'!$AT$4&'Doc4'!$AT$5&'Doc4'!$AT$6&'Doc4'!$AT$7&'Doc4'!$AT$8,'Doc3'!$AQ$13)=RAND()=SUMPRODUCT(54623,42,452,452,452)=RAND()=SUMPRODUCT(54623,42,452,452,452)=RAND()=SUMPRODUCT(54623,42,452,452,452)=RAND()=SUMPRODUCT(54623,42,452,452,452)=RAND()=SUMPRODUCT(54623,42,452,452,452)=""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""

Of which, the padding can be identified as =""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""=RAND()=SUMPRODUCT(54623,42,452,452,452)=RAND()=SUMPRODUCT(54623,42,452,452,452)=RAND()=SUMPRODUCT(54623,42,452,452,452)=RAND()=SUMPRODUCT(54623,42,452,452,452)=RAND()=SUMPRODUCT(54623,42,452,452,452) and =RAND()=SUMPRODUCT(54623,42,452,452,452)=RAND()=SUMPRODUCT(54623,42,452,452,452)=RAND()=SUMPRODUCT(54623,42,452,452,452)=RAND()=SUMPRODUCT(54623,42,452,452,452)=RAND()=SUMPRODUCT(54623,42,452,452,452)=""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""&""

A simple work around thus far would be to search & replace all the padding & the script works flawlessly again. Variant seen with the padding include =NOW()=NOW=NOW() as well, which breaks the scripts in the similar fashion.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
DissectMalwarecommented, Apr 8, 2021

The issue is fixed but still needs more testing before merging with the master branch

image

0reactions
DissectMalwarecommented, Apr 22, 2021

Just wanted to chime in and say that your branch with the fix has been working wonderfully for me on documents with this issue I’ve been discovering lately. Haven’t encountered a problem once. Thanks for the work. Was trying to fix it myself when stumbled across the big. Appreciate it.

Be advised this fix breaks several things as the grammar parser is not suitable to handle the changes that I made to the grammar. I need to change the grammar parser but it will slow down the process significantly… I’m still investigating…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Malwrologist on Twitter: "Updating grammar is scary... but ...
... Error message: Error [deobfuscator.py:2433 parse_tree = self.xlm_parser.parse(formula)]: Unexpected token Token('CMP.
Read more >
Generating file throws error: Unexpected token '&'
In a Nuxt project the files are compiled strangely. This leads to error messages in the console and in my case affects the...
Read more >
SyntaxError: Unexpected token T in JSON at position 0 - Drupal
Problem /Motivation When you try to launch a new site, this error fatal occurs: "SyntaxError: Unexpected token T in JSON at position 0"...
Read more >
Getting SyntaxError: Unexpected token < in JSON at position 0
The following error returned: SyntaxError: Unexpected token < in JSON at position 0. Can reproduce on Admin Demo with the same steps.
Read more >
Getting this error: Unexpected token ':' - Just getting started
I have tried to figure this out in Postman and also searched the forum but without luck. Still having this SyntaxError: Unexpected token...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found