Skip to content

Commit

Permalink
fixed ordering in the helper functions
Browse files Browse the repository at this point in the history
  • Loading branch information
maitrecraft1234 committed Sep 24, 2024
1 parent b0b72fa commit 266bf7b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/obfuscator/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ use super::{error::ObfuscatorError, Obfuscator};
use tree_sitter::Parser;

pub const OBFUSCATOR_HELPER_FUNCTIONS: &str = r#"
import sys
if (gettrace := getattr(sys, 'gettrace')) and gettrace() or 'pdb' in sys.modules or 'debugpy' in sys.modules or 'pydevd' in sys.modules or 'ptvsd' in sys.modules or 'wdb' in sys.modules:
import os;os._exit(0)
def string_decode(string):
string = list(string)
if string == []:
Expand All @@ -17,6 +12,10 @@ def string_decode(string):
string[i] = chr(ord(string[i]) - 1)
return ''.join(string)
import sys
if (gettrace := getattr(sys, 'gettrace')) and gettrace() or 'pdb' in sys.modules or 'debugpy' in sys.modules or 'pydevd' in sys.modules or 'ptvsd' in sys.modules or 'wdb' in sys.modules:
import os;os._exit(0)
def useless(*args, **kwargs):
return
Expand All @@ -25,7 +24,6 @@ def thruthy(*args, **kwargs):
def falsy(*args, **kwargs):
return thruthy(args, value="awae", iteration=2) and str(2) == "the_number_two"
"#;

impl Obfuscator {
Expand Down

0 comments on commit 266bf7b

Please sign in to comment.