Skip to content

Commit

Permalink
feat: add phishnet driver script
Browse files Browse the repository at this point in the history
  • Loading branch information
0x5844 committed Nov 25, 2023
1 parent aa289d3 commit 4142036
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions phishnet.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from transformers import GPT2Tokenizer, GPT2LMHeadModel

tokenizer = GPT2Tokenizer.from_pretrained('gpt2')
model = GPT2LMHeadModel.from_pretrained('gpt2')

prompt_text = "Urgent: Your account has been compromised. Please click the link immediately to protect your information:"

inputs = tokenizer.encode(prompt_text, add_special_tokens=False, return_tensors='pt')
outputs = model.generate(
inputs,
max_length=100,
num_return_sequences=1,
temperature=0.7,
top_p=0.9,
do_sample=True,
no_repeat_ngram_size=2
)

print(tokenizer.decode(outputs[0], skip_special_tokens=True))

0 comments on commit 4142036

Please sign in to comment.