Skip to content

Dev.update #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified data/enhanced-c.bestType
Binary file not shown.
2 changes: 1 addition & 1 deletion data/enhanced-c.encodings
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"char2int": {"<PAD>": 0, "<UNK>": 1, "{": 2, "+": 3, "c": 4, "r": 5, "e": 6, "a": 7, "m": 8, "i": 9, "l": 10, "y": 11, "}": 12, " ": 13, "$": 14, "5": 15, "f": 16, "9": 17, "1": 18, "3": 19, "8": 20, "2": 21, "-": 22, "7": 23, "0": 24, "4": 25, "d": 26, "6": 27, "b": 28, "x": 29, "t": 30, "w": 31, "u": 32, "v": 33, "n": 34, "h": 35, "o": 36, "%": 37, "q": 38, "<": 39, "s": 40, "g": 41, "/": 42, "p": 43, "#": 44, "j": 45, "k": 46, "z": 47, ".": 48, "_": 49, ":": 50, "*": 51, "=": 52, ",": 53, "&": 54, "'": 55, "?": 56, "\"": 57, ">": 58, "!": 59, "(": 60, ")": 61, "\\": 62, "[": 63, "]": 64, "|": 65, "`": 66, "~": 67, ";": 68, "@": 69}, "label2int": {"<PAD>": 0, "C": 1, "U": 2, "H": 3, "J": 4, "N": 5, "I": 6}}
{"char2int": {"<PAD>": 0, "<UNK>": 1, "(": 2, "+": 3, "r": 4, "e": 5, "t": 6, "o": 7, "m": 8, "b": 9, ")": 10, "-": 11, "n": 12, "u": 13, "s": 14, "i": 15, "j": 16, "h": 17, "g": 18, "c": 19, "z": 20, "1": 21, "5": 22, "6": 23, "k": 24, "p": 25, "x": 26, "v": 27, "9": 28, ".": 29, "y": 30, "a": 31, "w": 32, "2": 33, "d": 34, "f": 35, "0": 36, "q": 37, "l": 38, "3": 39, "4": 40, "8": 41, "_": 42, "7": 43, " ": 44, "[": 45, "]": 46, "'": 47, "%": 48, ",": 49, "!": 50, "$": 51, "\\": 52, "#": 53, "~": 54, "<": 55, "@": 56, "=": 57, ":": 58, "{": 59, "}": 60, "?": 61, ";": 62, "\"": 63, "&": 64, "|": 65, "/": 66, "`": 67, ">": 68, "*": 69}, "label2int": {"<PAD>": 0, "C": 1, "J": 2, "H": 3, "N": 4, "U": 5, "I": 6}}
Binary file modified data/enhanced-c.last
Binary file not shown.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def parse_requirements(filename, session=None):

setuptools.setup(
name="stringlifier",
version="0.1.1.4",
version="0.1.1.5",
author="Multiple authors",
author_email="tiberiu44@gmail.com",
description="Python module for detecting password, api keys hashes and any other string that resembles a randomly generated character sequence.",
Expand Down
2 changes: 1 addition & 1 deletion stringlifier/api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Adobe Systems Incorporated. All rights reserved.
# Copyright (c) 2025 Adobe Systems Incorporated. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion stringlifier/modules/stringc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Adobe Systems Incorporated. All rights reserved.
# Copyright (c) 2025 Adobe Systems Incorporated. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
6 changes: 3 additions & 3 deletions stringlifier/modules/stringc2.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Adobe Systems Incorporated. All rights reserved.
# Copyright (c) 2025 Adobe Systems Incorporated. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -215,7 +215,7 @@ def _make_batches(dataset, batch_size=32):

def _get_targets(y, encodings):
max_len = max([len(yy) for yy in y])
y_t = np.zeros((len(y), max_len), dtype=np.long)
y_t = np.zeros((len(y), max_len), dtype=np.int64)
for i in range(len(y)):
for j in range(max_len):
if j < len(y[i]):
Expand Down Expand Up @@ -256,7 +256,7 @@ def _start_train(params):
model.to(params.device)
if params.resume:
model.load('{0}.last'.format(params.output_base))
optimizer = torch.optim.Adam(model.parameters())
optimizer = torch.optim.Adam(model.parameters(), lr=1e-4)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe the learning rate should be specified in params, with a default value

criterion_t = torch.nn.CrossEntropyLoss(ignore_index=0)

patience_left = params.patience
Expand Down
2 changes: 1 addition & 1 deletion stringlifier/modules/training.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2020 Adobe Systems Incorporated. All rights reserved.
# Copyright (c) 2025 Adobe Systems Incorporated. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down