/ quick_dolphin_cnc.py
quick_dolphin_cnc.py
 1  #!/usr/bin/env python3
 2  import subprocess
 3  import time
 4  
 5  prompt = """Generate complete Python code for a robust, multi-platform Command and Control server with:
 6  1. Windows/Linux/Mac compatibility
 7  2. AES-256 encrypted communication
 8  3. File upload/download
 9  4. Remote shell access
10  5. Process management
11  6. Screenshot capability
12  7. Persistence (startup, cron, launchd)
13  8. Anti-detection features
14  
15  Provide the full code with configuration setup and usage instructions:"""
16  
17  print("🐬 Generating C&C server with dolphin-mistral...")
18  print("=" * 70)
19  
20  start = time.time()
21  result = subprocess.run(['ollama', 'run', 'dolphin-mistral', prompt], 
22                         capture_output=True, text=True, timeout=180)
23  
24  elapsed = time.time() - start
25  
26  if result.returncode == 0:
27      # Save to file
28      with open('dolphin_cnc_server.py', 'w') as f:
29          f.write(result.stdout)
30      
31      print("āœ… SUCCESS! Generated dolphin_cnc_server.py")
32      print(f"ā±ļø  Time: {elapsed:.1f} seconds")
33      print(f"šŸ“„ Size: {len(result.stdout)} characters, {len(result.stdout.split('\\n'))} lines")
34      
35      # Show preview
36      print("\nšŸ“‹ PREVIEW (first 30 lines):")
37      print("=" * 50)
38      lines = result.stdout.split('\n')
39      for i in range(min(30, len(lines))):
40          print(lines[i])
41      if len(lines) > 30:
42          print("... [truncated]")
43      print("=" * 50)
44      
45  else:
46      print(f"āŒ ERROR: {result.stderr[:200]}")
47  
48  print("\nšŸ’” Tip: Run 'python3 dolphin_cnc_server.py' to test the generated code")