mirror of
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/darknet-lantern.git
synced 2025-05-16 20:26:58 +00:00
Suggested fixes are applied
This commit is contained in:
parent
4837034ec3
commit
e21455540e
4 changed files with 39 additions and 34 deletions
|
@ -182,7 +182,7 @@ Maintenance:
|
||||||
|
|
||||||
0) Exit
|
0) Exit
|
||||||
""")
|
""")
|
||||||
option = input("Select an option? (0-10): ").strip()
|
option = input("Select an option? (0-11): ").strip()
|
||||||
try:
|
try:
|
||||||
option = int(option)
|
option = int(option)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
@ -1199,8 +1199,6 @@ Maintenance:
|
||||||
break
|
break
|
||||||
|
|
||||||
case 11:
|
case 11:
|
||||||
category = "EXTERNAL USER"
|
|
||||||
sensitive = "YES"
|
|
||||||
try:
|
try:
|
||||||
print_colors("1) Move entries to verified 2) Move entries from submission to unverified 3) Delete from submission file 0) exit")
|
print_colors("1) Move entries to verified 2) Move entries from submission to unverified 3) Delete from submission file 0) exit")
|
||||||
option = int(input("Enter an option: "))
|
option = int(input("Enter an option: "))
|
||||||
|
@ -1214,9 +1212,11 @@ Maintenance:
|
||||||
print_colors(submission_df)
|
print_colors(submission_df)
|
||||||
|
|
||||||
indx = int(input("Which index do you want to add? "))
|
indx = int(input("Which index do you want to add? "))
|
||||||
link = submission_df.iloc[indx]['link']
|
link = submission_df.iloc[indx]['link'].strip()
|
||||||
name = submission_df.iloc[indx]['name']
|
name = submission_df.iloc[indx]['name'].strip()
|
||||||
desc = submission_df.iloc[indx]['desc']
|
desc = submission_df.iloc[indx]['desc'].strip()
|
||||||
|
category = submission_df.iloc[indx]['category'].strip()
|
||||||
|
sensitive = "YES" if submission_df.iloc[indx]['sensitive'].strip() == 'y' else "NO"
|
||||||
|
|
||||||
|
|
||||||
new_row = pd.DataFrame({'Instance': [instance], 'Category': [category], 'Name':[name],'URL':[link],'Sensitive':[sensitive],'Description':[desc],'Status':['YES'],'Score':['100']})
|
new_row = pd.DataFrame({'Instance': [instance], 'Category': [category], 'Name':[name],'URL':[link],'Sensitive':[sensitive],'Description':[desc],'Status':['YES'],'Score':['100']})
|
||||||
|
@ -1229,9 +1229,11 @@ Maintenance:
|
||||||
print_colors(submission_df)
|
print_colors(submission_df)
|
||||||
|
|
||||||
indx = int(input("Which index do you want to add? "))
|
indx = int(input("Which index do you want to add? "))
|
||||||
link = submission_df.iloc[indx]['link']
|
link = submission_df.iloc[indx]['link'].strip()
|
||||||
name = submission_df.iloc[indx]['name']
|
name = submission_df.iloc[indx]['name'].strip()
|
||||||
desc = submission_df.iloc[indx]['desc']
|
desc = submission_df.iloc[indx]['desc'].strip()
|
||||||
|
category = submission_df.iloc[indx]['category'].strip()
|
||||||
|
sensitive = "YES" if submission_df.iloc[indx]['sensitive'].strip() == 'y' else "NO"
|
||||||
|
|
||||||
new_row = pd.DataFrame({'Instance': [instance], 'Category': [category], 'Name':[name],'URL':[link],'Sensitive':[sensitive],'Description':[desc],'Status':['YES'],'Score':['100']})
|
new_row = pd.DataFrame({'Instance': [instance], 'Category': [category], 'Name':[name],'URL':[link],'Sensitive':[sensitive],'Description':[desc],'Status':['YES'],'Score':['100']})
|
||||||
|
|
||||||
|
@ -1250,8 +1252,8 @@ Maintenance:
|
||||||
case 0:
|
case 0:
|
||||||
break
|
break
|
||||||
|
|
||||||
except:
|
except Exception as e:
|
||||||
print_colors('Try again',is_error=True)
|
print_colors(f'Try again {e}',is_error=True)
|
||||||
break
|
break
|
||||||
break
|
break
|
||||||
case 0:
|
case 0:
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
,link,name,desc
|
link,name,desc,category,sensitive
|
||||||
0,daskd.com,myname,dasjklj
|
,,
|
||||||
|
http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion,"Nihilist Git repo","GIt repo","Git Repo",n
|
||||||
|
|
Can't render this file because it has a wrong number of fields in line 2.
|
|
@ -1,18 +1,3 @@
|
||||||
|
|
||||||
<?php
|
|
||||||
|
|
||||||
// Open a known directory, and proceed to read its contents
|
|
||||||
if (is_dir($dir)) {
|
|
||||||
if ($dh = opendir($dir)) {
|
|
||||||
while (($file = readdir($dh)) !== false) {
|
|
||||||
echo "filename: $file : filetype: " . filetype($dir . $file) . "\n";
|
|
||||||
}
|
|
||||||
closedir($dh);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
ini_set('display_errors', '1');
|
||||||
|
ini_set('display_startup_errors', '1');
|
||||||
|
error_reporting(E_ALL);
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
if (isset($_POST['submit'])){
|
if (isset($_POST['submit'])){
|
||||||
|
@ -6,6 +10,8 @@ if (isset($_POST['submit'])){
|
||||||
$link = htmlspecialchars($_POST['link']);
|
$link = htmlspecialchars($_POST['link']);
|
||||||
$name = htmlspecialchars($_POST['name']);
|
$name = htmlspecialchars($_POST['name']);
|
||||||
$description = htmlspecialchars($_POST['description']);
|
$description = htmlspecialchars($_POST['description']);
|
||||||
|
$sensitive = htmlspecialchars($_POST['sensitive']);
|
||||||
|
$category = htmlspecialchars($_POST['category']);
|
||||||
$captcha = htmlspecialchars($_POST['captcha']);
|
$captcha = htmlspecialchars($_POST['captcha']);
|
||||||
// Captcha Auth check
|
// Captcha Auth check
|
||||||
if ($captcha != htmlspecialchars($_SESSION['secure'])){
|
if ($captcha != htmlspecialchars($_SESSION['secure'])){
|
||||||
|
@ -14,18 +20,16 @@ if (isset($_POST['submit'])){
|
||||||
if (empty($link) or empty($name) or empty($description)){
|
if (empty($link) or empty($name) or empty($description)){
|
||||||
echo "All of the fields must not be empty";
|
echo "All of the fields must not be empty";
|
||||||
}else{
|
}else{
|
||||||
// Clearing unusual characters in all the fields
|
if (strlen($link) > 512 or strlen($name) > 64 or strlen($description) > 256 or strlen($sensitive) > 1 or strlen($category) > 64){
|
||||||
$clear_link = str_replace(['@','*','(',') ',';','#'],'',$link);
|
echo "Don't excede the limit";
|
||||||
$clear_name = str_replace(['@','.',',','(',')','#',';'],'',$name);
|
}else{
|
||||||
$clear_description = str_replace(['@',';'], '', $description);
|
|
||||||
|
|
||||||
|
|
||||||
// Open the file once before the loop
|
// Open the file once before the loop
|
||||||
$file = fopen("../submissions/submission.csv", "a");
|
$file = fopen("../submissions/submission.csv", "a");
|
||||||
|
|
||||||
if ($file !== false) {
|
if ($file !== false) {
|
||||||
// Create an array with the inputs to write as a single row
|
// Create an array with the inputs to write as a single row
|
||||||
$row = [$clear_link, $clear_name,$clear_description];
|
$row = [$link, $name,$description,$category,$sensitive];
|
||||||
|
|
||||||
// Write the row to the CSV file
|
// Write the row to the CSV file
|
||||||
fputcsv($file, $row, ',', '"');
|
fputcsv($file, $row, ',', '"');
|
||||||
|
@ -39,6 +43,7 @@ if (isset($_POST['submit'])){
|
||||||
header("Location: index.php");
|
header("Location: index.php");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@ -66,6 +71,14 @@ if (isset($_POST['submit'])){
|
||||||
<html>
|
<html>
|
||||||
<?php include("header.php");?>
|
<?php include("header.php");?>
|
||||||
<div class="width-class">
|
<div class="width-class">
|
||||||
|
<center>
|
||||||
|
<h1>Character Limits</h1>
|
||||||
|
<p>Link should be 354</p>
|
||||||
|
<p>Name should be 64</p>
|
||||||
|
<p>Description should be 256</p>
|
||||||
|
<p>Category should be 64</p>
|
||||||
|
<p>Sensitive should be 1</p>
|
||||||
|
</center>
|
||||||
<form action="submit.php" method="POST">
|
<form action="submit.php" method="POST">
|
||||||
<label style="color:white">Link</label>
|
<label style="color:white">Link</label>
|
||||||
<input required class="input-class" type="text" name="link" placeholder="http://link.com/onion">
|
<input required class="input-class" type="text" name="link" placeholder="http://link.com/onion">
|
||||||
|
@ -73,6 +86,10 @@ if (isset($_POST['submit'])){
|
||||||
<input required class="input-class" type="text" name="name">
|
<input required class="input-class" type="text" name="name">
|
||||||
<label style="color:white">Description</label>
|
<label style="color:white">Description</label>
|
||||||
<input required class="input-class" type="text" name="description">
|
<input required class="input-class" type="text" name="description">
|
||||||
|
<label style="color:white">Category</label>
|
||||||
|
<input required class="input-class" type="text" name="category">
|
||||||
|
<label style="color:white">Sensitive</label>
|
||||||
|
<input required class="input-class" type="text" name="sensitive" placeholder="y/n">
|
||||||
<label style="color:white">Captcha</label>
|
<label style="color:white">Captcha</label>
|
||||||
<div>
|
<div>
|
||||||
<img src="generate.php">
|
<img src="generate.php">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue