You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

nlxcaptcha

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nlxcaptcha - pypi Package Compare versions

Comparing version
1.1
to
1.2
+1
-1
nlxcaptcha.egg-info/PKG-INFO
Metadata-Version: 2.1
Name: nlxcaptcha
Version: 1.1
Version: 1.2
Summary: Tell "iPad Kids" and "Non-iPad Kids" apart using OpenAI API in this easy-to-integrate captcha.

@@ -5,0 +5,0 @@ Home-page: https://github.com/nlckysolutions/NLX-Captcha

@@ -53,37 +53,33 @@ import tkinter as tk

def verify_response(self):
user_input = self.text_entry.get("1.0", tk.END).strip()
user_input = self.text_entry.get("1.0", tk.END).strip()
system_prompt = (
f"You are an AI tasked with identifying whether a given text was written by a child, specifically one who frequently uses an iPad or similar device."
f" Children who are considered 'iPad kids' often write with simple sentence structures, basic vocabulary, and have a casual tone."
f" The device the user is using is: {self.device}. Keep in mind that 'iPad kids' are most likely to use an iPad or a phone."
f" Be more strict if the difficulty level is high. Difficulty: {self.difficulty}/10."
f" Respond with '1' if you think the text was written by an 'iPad kid,' otherwise respond with '0'."
f" After that, provide the confidence percentage in the following format: 'Certainty: XX%'."
)
system_prompt = (
f"You are an AI tasked with identifying whether a given text was written by a child, specifically one who frequently uses an iPad or similar device."
f" Children who are considered 'iPad kids' often write with simple sentence structures, basic vocabulary, and have a casual tone."
f" The device the user is using is: {self.device}. Keep in mind that 'iPad kids' are most likely to use an iPad or a phone."
f" Be more strict if the difficulty level is high. Difficulty: {self.difficulty}/10."
f" Respond with '1' if you think the text was written by an 'iPad kid,' otherwise respond with '0'."
)
response = openai.ChatCompletion.create(
model="gpt-4",
messages=[
{"role": "system", "content": system_prompt},
{"role": "user", "content": f"Sample: {user_input}"}
]
)
response = openai.ChatCompletion.create(
model="gpt-4",
messages=[
{"role": "system", "content": system_prompt},
{"role": "user", "content": f"Sample: {user_input}"}
]
)
content = response['choices'][0]['message']['content'].strip()
content = response['choices'][0]['message']['content'].strip()
if " Certainty: " in content:
result, certainty = content.split(" Certainty: ")
certainty = certainty.strip()
else:
result, certainty = "Error", "0%"
# Ensure the response is either '1' or '0'
if content not in ["1", "0"]:
content = "0" # Default to '0' if the response is unexpected
self.loading.stop()
self.loading.pack_forget()
self.loading.stop()
self.loading.pack_forget()
tk.messagebox.showinfo("Verification", "Verification Successful")
self.window.destroy()
tk.messagebox.showinfo("Verification", "Verification Successful")
self.window.destroy()
self.result = result
self.certainty = certainty
self.result = content

@@ -90,0 +86,0 @@

Metadata-Version: 2.1
Name: nlxcaptcha
Version: 1.1
Version: 1.2
Summary: Tell "iPad Kids" and "Non-iPad Kids" apart using OpenAI API in this easy-to-integrate captcha.

@@ -5,0 +5,0 @@ Home-page: https://github.com/nlckysolutions/NLX-Captcha

@@ -5,3 +5,3 @@ from setuptools import setup, find_packages

name='nlxcaptcha',
version='1.1',
version='1.2',
packages=find_packages(),

@@ -8,0 +8,0 @@ install_requires=[