socx 2.3__tar.gz → 2.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,28 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: socx
3
- Version: 2.3
3
+ Version: 2.4.0
4
4
  Summary: A set of useful tools for a security operations center
5
5
  Author-email: Enlace <enlace.aman@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/yourusername/socx
8
+ Project-URL: Repository, https://github.com/yourusername/socx
9
+ Project-URL: Issues, https://github.com/yourusername/socx/issues
10
+ Keywords: soc,security,operations,automation
6
11
  Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: License :: OSI Approved :: MIT License
7
18
  Classifier: Operating System :: OS Independent
19
+ Classifier: Intended Audience :: Information Technology
20
+ Classifier: Topic :: Security
8
21
  Requires-Python: >=3.8
9
22
  Description-Content-Type: text/markdown
23
+ Requires-Dist: keyring>=25.6.0
24
+ Requires-Dist: pandas>=2.3.3
25
+ Requires-Dist: requests>=2.32.5
10
26
 
11
27
  # SOCX
12
28
  A collection of helpful tools for a SOC analyst. Easily search for IPs, domains, and find files on the system.
@@ -0,0 +1,42 @@
1
+ [build-system]
2
+ requires = ["setuptools>=42"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "socx"
7
+ version = "2.4.0" # ← Added .0 for PEP 440 compliance
8
+ description = "A set of useful tools for a security operations center"
9
+ readme = "README.md"
10
+ authors = [
11
+ { name = "Enlace", email = "enlace.aman@gmail.com" }
12
+ ]
13
+ requires-python = ">=3.8"
14
+ license = { text = "MIT" } # ← Recommended: add license
15
+ keywords = ["soc", "security", "operations", "automation"] # ← Helps discoverability
16
+
17
+ dependencies = [
18
+ "keyring>=25.6.0",
19
+ "pandas>=2.3.3",
20
+ "requests>=2.32.5",
21
+ ]
22
+
23
+ classifiers = [
24
+ "Programming Language :: Python :: 3",
25
+ "Programming Language :: Python :: 3.8",
26
+ "Programming Language :: Python :: 3.9",
27
+ "Programming Language :: Python :: 3.10",
28
+ "Programming Language :: Python :: 3.11",
29
+ "Programming Language :: Python :: 3.12",
30
+ "License :: OSI Approved :: MIT License",
31
+ "Operating System :: OS Independent",
32
+ "Intended Audience :: Information Technology",
33
+ "Topic :: Security",
34
+ ]
35
+
36
+ [project.urls]
37
+ Homepage = "https://github.com/yourusername/socx" # ← Optional but recommended
38
+ Repository = "https://github.com/yourusername/socx"
39
+ Issues = "https://github.com/yourusername/socx/issues"
40
+
41
+ [project.scripts]
42
+ socx = "socx:main" # ← CLI entry point
@@ -89,7 +89,9 @@ def p(*args_, v=1, end="\n", sep=" ", file=None):
89
89
  def unwrap_url(url):
90
90
  pp_decoder = util.URLDefenseDecoder()
91
91
  if "safelinks" in url:
92
- url = unquote(url.split("url=")[1])
92
+ url = [t for t in re.split(r"&|\?", url) if t.startswith("url=")][0]
93
+ url = url.split("=")[1]
94
+ url = unquote(url)
93
95
  url = pp_decoder.decode(url)
94
96
  return url
95
97
 
@@ -446,18 +448,23 @@ def do_browser_history(user="~"):
446
448
  p(f"Error with {name} - {e}", v=3)
447
449
 
448
450
 
449
- def do_combine_csvs(csvs=0, skip_og_filename_column=False, directory=os.getcwd()):
451
+ def do_combine_csvs(
452
+ csvs=0, skip_og_filename_column=False, directory=os.getcwd(), remove_dupes=False
453
+ ):
450
454
  p("Starting combine CSVs", v=5)
451
455
  p("The current directory will be used to find the CSVs.", v=1)
452
456
  paths = sorted(Path(directory).iterdir(), key=os.path.getmtime)
453
457
  paths.reverse()
458
+ paths = [p for p in paths if str(p).endswith(".csv")]
459
+ if len(paths) == 0:
460
+ p("There are no csvs in this directory", v=1)
461
+ return
454
462
  if csvs < 2:
455
463
  accum = 1
456
464
  p("File Paths", v=3)
457
465
  for path in paths:
458
- if str(path).endswith(".csv"):
459
- p(f"{accum} - {path}")
460
- accum += 1
466
+ p(f"{accum} - {path}")
467
+ accum += 1
461
468
  csvs = int(input("Enter the index of the last CSV to include:"))
462
469
  file_paths = []
463
470
  for path in paths:
@@ -474,6 +481,11 @@ def do_combine_csvs(csvs=0, skip_og_filename_column=False, directory=os.getcwd()
474
481
  df["Original CSV Filename"] = os.path.basename(path)
475
482
  dfs.append(df)
476
483
  df = pd.concat(dfs)
484
+ if remove_dupes:
485
+ # Remove dupes by all but df['Original CSV Filename']
486
+ df = df.drop_duplicates(
487
+ subset=[col for col in df.columns if col != "Original CSV Filename"]
488
+ )
477
489
  df.to_csv("COMBINED_FILE.csv", index=False)
478
490
  p("Outputed to COMBINED_FILE.csv", v=3)
479
491
 
@@ -531,13 +543,6 @@ FUNCTIONS = [
531
543
  "function": lambda: do_config(),
532
544
  "arguments": [],
533
545
  },
534
- {
535
- "name": "Interactive mode",
536
- "command": "interactive",
537
- "help": "",
538
- "function": lambda: interactive_mode(),
539
- "arguments": [],
540
- },
541
546
  {
542
547
  "name": "Stay Awake",
543
548
  "command": "awake",
@@ -601,6 +606,16 @@ FUNCTIONS = [
601
606
  "required": False,
602
607
  "help": "Include a column with the OG file name",
603
608
  },
609
+ {
610
+ "name": "remove_dupes",
611
+ "flag": "--deduplicate",
612
+ "short_flag": "-dedupe",
613
+ "action": "store_true",
614
+ "type": bool,
615
+ "default": False,
616
+ "required": False,
617
+ "help": "Remove duplicate rows (excludes OG file name column)",
618
+ },
604
619
  ],
605
620
  },
606
621
  {
@@ -763,6 +778,14 @@ FUNCTIONS = [
763
778
  }
764
779
  ],
765
780
  },
781
+ # INTERACTIVE MODE MUST BE LAST OR INDEX IS OFF!
782
+ {
783
+ "name": "Interactive mode",
784
+ "command": "interactive",
785
+ "help": "",
786
+ "function": lambda: interactive_mode(),
787
+ "arguments": [],
788
+ },
766
789
  ]
767
790
 
768
791
  ####################
@@ -1,12 +1,28 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: socx
3
- Version: 2.3
3
+ Version: 2.4.0
4
4
  Summary: A set of useful tools for a security operations center
5
5
  Author-email: Enlace <enlace.aman@gmail.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/yourusername/socx
8
+ Project-URL: Repository, https://github.com/yourusername/socx
9
+ Project-URL: Issues, https://github.com/yourusername/socx/issues
10
+ Keywords: soc,security,operations,automation
6
11
  Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: License :: OSI Approved :: MIT License
7
18
  Classifier: Operating System :: OS Independent
19
+ Classifier: Intended Audience :: Information Technology
20
+ Classifier: Topic :: Security
8
21
  Requires-Python: >=3.8
9
22
  Description-Content-Type: text/markdown
23
+ Requires-Dist: keyring>=25.6.0
24
+ Requires-Dist: pandas>=2.3.3
25
+ Requires-Dist: requests>=2.32.5
10
26
 
11
27
  # SOCX
12
28
  A collection of helpful tools for a SOC analyst. Easily search for IPs, domains, and find files on the system.
@@ -7,5 +7,6 @@ src/socx.egg-info/PKG-INFO
7
7
  src/socx.egg-info/SOURCES.txt
8
8
  src/socx.egg-info/dependency_links.txt
9
9
  src/socx.egg-info/entry_points.txt
10
+ src/socx.egg-info/requires.txt
10
11
  src/socx.egg-info/top_level.txt
11
12
  tests/tests.py
@@ -0,0 +1,3 @@
1
+ keyring>=25.6.0
2
+ pandas>=2.3.3
3
+ requests>=2.32.5
socx-2.3/pyproject.toml DELETED
@@ -1,19 +0,0 @@
1
- [build-system]
2
- requires = ["setuptools>=42"]
3
- build-backend = "setuptools.build_meta"
4
-
5
- [project]
6
- name = "socx"
7
- version = "2.3"
8
- authors = [
9
- { name="Enlace", email="enlace.aman@gmail.com" },
10
- ]
11
- description = "A set of useful tools for a security operations center"
12
- readme = "README.md"
13
- requires-python = ">=3.8"
14
- classifiers = [
15
- "Programming Language :: Python :: 3",
16
- "Operating System :: OS Independent",
17
- ]
18
- [project.scripts]
19
- socx = "socx:main"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes