Skip to content

Commit

Permalink
fix looping days
Browse files Browse the repository at this point in the history
  • Loading branch information
talltechy committed Apr 19, 2024
1 parent 2f07176 commit 6997cb8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/rapid7/api_r7_isvm_sonar_add.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ def main():
# Clean data by stripping any leading/trailing whitespace from string data
df = df.apply(lambda x: x.map(str.strip) if x.dtype == "object" else x)

# Prompt for days
days = input("Enter the number of days for 'scan-date-within-the-last' (default 30): ").strip()
days = int(days) if days.isdigit() else 30

# Loop over rows in DataFrame
for _, row in df.iterrows():
filters = []
Expand All @@ -93,9 +97,6 @@ def main():
print(f"Invalid target: {target}")
continue

# Prompt for days
days = input("Enter the number of days for 'scan-date-within-the-last' (default 30): ").strip()
days = int(days) if days.isdigit() else 30
filters.append({
"type": "scan-date-within-the-last",
"days": days
Expand Down

0 comments on commit 6997cb8

Please sign in to comment.