Skip to content

Instantly share code, notes, and snippets.

@g-clef
g-clef / GPT2_synthetic_TI_report.md
Last active February 6, 2022 16:38
Synthetic Threat Intelligence report generated by GPT2
@g-clef
g-clef / LSTM_synthetic_TI_report
Last active January 2, 2022 20:17
A fake Threat Intelligence report generated with a pre-trained LSTM
Underpants Gnomes - a Targetted Intrusion on a Unioncryptoupdater`memory_exec2
Internetopena
Whatsapp
Pwn2own
tty - security
Posted on November 18 , 2012 .  Keep notified and encouraged to follow full categories
@g-clef
g-clef / multiprocessingmanagers.md
Created June 2, 2020 18:24
Using Python's Multiprocessing Managers to share a queue between hosts

To share a queue between hosts with Python, you can use a "SyncManager". There'll be one machine that's the manager/owner of the queue, and then multiple other machines can connect to that queue to pull jobs. You can also share multiprocessing Events (for example a "shutdown" Event to tell all the workers on the queue that they should stop).

First, make an empty class that's a subclass of the multiprocessing.managers.SyncManager:

class CentralManager(multiprocessing.managers.SyncManager):
    """
CentralManager:
A SyncManager class. This synchronizes a shared object across multiple

Keybase proof

I hereby claim:

  • I am g-clef on github.
  • I am gclef (https://keybase.io/gclef) on keybase.
  • I have a public key ASD1g_FqIPzR8cCM8KjaHPOBP5EZiBbPqwOgEq14Sgi3xQo

To claim this, I am signing this object:

lastSeenScripts = set([('http://www.bootstrap.com', 'ab3940bb30dee'), ("/test/boring.js", "ac93027572037cc")])
lastSeenURLs = set([entry[0] for entry in lastSeenScripts])
justFoundScripts = set([("http://www.bootstrap.com", "ab3940bb30dee"), ("/test/boring.js", "ac93027572037cc"), ("/test/malware.js", "d938203cca")])
justFoundURLs = set([entry[0] for entry in justFoundScripts])
newUrls = justFoundURLs - lastSeenURLs
droppedURLs = lastSeenURLs - justFoundURLs
newScripts = justFoundScripts - lastSeenScripts
droppedScripts = lastSeenScripts - justFoundScripts