Merge pull request #38 from sunaurus/master

Add grepMetaUrls command
This commit is contained in:
Thomas Vogt 2019-04-20 11:38:22 +02:00 committed by GitHub
commit 9836e8d13b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -70,6 +70,10 @@ if __name__ == "__main__":
pos_args = [receivedMessage[1], receivedMessage[2]] pos_args = [receivedMessage[1], receivedMessage[2]]
if "-n" in receivedMessage[3:]: if "-n" in receivedMessage[3:]:
opt_args.append("-n") opt_args.append("-n")
elif receivedMessage[0] == "grepMetaUrls" and len(receivedMessage) == 2:
opt_args = ["grep", "-iE"]
url_field_names = receivedMessage[1]
pos_args = [f"^({'|'.join(url_field_names)}):"]
elif receivedMessage[0] == "otp" and len(receivedMessage) == 2: elif receivedMessage[0] == "otp" and len(receivedMessage) == 2:
opt_args = ["otp"] opt_args = ["otp"]
key = receivedMessage[1] key = receivedMessage[1]