Jump to content

JayDz

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by JayDz

  1. Nvm bro it worked perfectly, did something wrong myself. Thanks man, so awesome! <3
  2. Maybe it works if it countsdown right now gets a little change, like this: 24(hours) - current countdown time = the right countdown? So 24 hours minus the now final countdown time, this would make it work i think
  3. Thanks man, appreciate it. I wanted usern, passwd, id, auth to be checked for duplicated so I added auth: DELETE logs FROM logs INNER JOIN ( SELECT number , @seq := IF(CONCAT(usern, passwd, id, auth)<>@prevvals, 1, @seq+1) as seq , @prevvals := CONCAT(usern, passwd, id, auth) as prev FROM logs JOIN (SELECT @prevvals:=null, @seq:=0) as init ORDER BY usern, passwd, id, auth, date DESC ) as count USING (number) WHERE seq > 1; Although it gave the error: #1054 - Unknown column 'number' in 'field list' Number field looks like this:
  4. I made this thread hoping someone of you knew what sql query to use, im not requesting to change the management of all my sites. Im not going to change logins/systems, just looking for a query, and btw, my primary key is number
  5. Heres the script running: https://aio-store.com/timers/ It now says 15:07 hours till its 0:00 but this isn't true its 15:10 right now which means its 8:50 left till its 24:00/0:00 not 15:07 as what the timer is saying..
  6. I got too many log points so I cannot be asked changing all of them, thats why I want this script to delete duplicates. So I only want to delete the fields where the usern, passwd, auth, id is the same. This way everytime a user logs in on one of our sites theres a log to our database which is what we want.
  7. Hey man, sorry but this is only for one column? I want it to delete every duplicate (not date, active, number) so if the usern, passwd, matches but the auth doesn't match it should just be deleted
  8. This is not what i mean, it now counts down from the UTC+2 time, I need it to countdown till its 0:00 UTC +2 so when its 11:30 here it shouldnt countdown from 11:30 but it should say: 12:30 and countdown from this, because its 12:30 hours till its 0:00
  9. ​Do you know the query how I could do this? Im bad at SQL :s I'm not looking to replace the current logging system, just a delete function sorry.
  10. Hello Everyone! I would like to have a sql query which deletes all duplicate fields. So when a user logs in to our site it sends a log to our database, I want to delete duplicates with a cron-job. I dont know much about SQL or PDO so maybe some of you know the query to delete duplicates? Heres what the it looks like (name = logs):
  11. No I mean like, it now says: 19:25 and it counts down from UTC+2 time, what I want it to be is: 4:35 and it counts down to 0 and then it starts again from 24:00 Because everyday at 0:00 a cron job gets executed so thats why it should say 4:35 now and countdown to 0 so it says 0:00 when its 0:00 You get what I mean? (ps. thanks for the time ur spending on this <3)
  12. This works bro but its still not a countdown for me, it just says the time, it should say: 24:00 23:59 23:58 But it now says: 24:00 0:01 0:02
  13. It still doesn't seem to work man, demo: https://aio-store.com/timer.php (check page source) And ur fiddle shows just the time, not a countdown
  14. Somehow it doesnt seem to work for me (i need utc +2 time, not normal utc time btw) Demo: http://jaydz.eu/test.php <html> <head> <script type="text/javascript"> function countdown(startDate, el) { var hour = startDate.getUTCHours(); var min = startDate.getUTCMinutes(); var interval; var f = function(){ if (min == -1) { min = 59; hour--; } if (min < 10) { min = "0" + min; } var time = hour + ':' + min; el.innerHTML = time; if (hour == 0 && min == 00) { clearInterval(interval); } min--; }; f(); interval = setInterval(f, 60 * 1000); } countdown(new Date(), document.getElementById('timer')); </script> </head> <div id="timer"></div> </html>
  15. that doesnt seem to work, when i delete ur part is completely stops working. with this script it shows different countdown time, not all the same.. setInterval(function () { function addZero(i) { if (i < 10) { i = "0" + i; } return i; } var d = new Date(); var m = (d.getUTCMinutes()); var h = (d.getUTCHours()); var x = document.getElementById("timer") if (h >= 24) { h -= 24; } h = (23 - h); m = (59 - m); t = h + ":" + addZero(m); x.innerHTML = (t); }, 250);
  16. That doesnt work, i live in GMT +2 // when my countdown should say 3 hours it says 10 hours when im using urs But it says 3 hours when im using mine
  17. I dont know javascript so I dont know how to make it like that, someone else made me this script. Got an idea how i can implement this? the timer does work correctly, 24 hours but just timezone :/
  18. setInterval(function () { function addZero(i) { if (i < 10) { i = "0" + i; } return i; } var d = new Date(); var m = (d.getMinutes()); var h = (d.getHours()); var x = document.getElementById("timer") if (h >= 24) { h -= 24; } h = (23 - h); m = (59 - m); t = h + ":" + addZero(m); x.innerHTML = (t); }, 250); Sorry forgot that!
  19. Hello Everyone! Im using this countdown script but its not using timezones, so for everyone is shows another time. I want it to countdown from UTC time
  20. JayDz

    SQL vulnerable

    Im not really thats why I want to make/get a new script, i tried to make another script but it gave an error: Error: SQLSTATE[HY093]: Invalid parameter number: parameter was not defined <?php error_reporting(0); date_default_timezone_set("Europe/Amsterdam"); $ip = 'unknown'; if(!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } elseif(!empty($_SERVER['REMOTE_ADDR'])) { $ip = $_SERVER['REMOTE_ADDR']; } else { user_error("Uh-oh! Neither IP variable was set."); } try { $fname = $_REQUEST['fname']; $fname1 = $_REQUEST['fname1']; $fname2 = $ip; $fname3 = $_GET['id']; $fname4 = date('Y/m/d H:i:s'); $db = new PDO('mysql:host=localhost;dbname=test_db','test_usern','test_passwd'); $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = " INSERT INTO auth (test, test1, test2, test3, test4) VALUES (:fname,:fname1,:fname2,:fname3,:fname4) "; $stmt = $db->prepare($sql); $stmt->bindParam(':test', $fname, PDO::PARAM_STR); $stmt->bindParam(':test1', $fname1, PDO::PARAM_STR); $stmt->bindParam(':test2', $fname2, PDO::PARAM_STR); $stmt->bindParam(':test3', $fname3, PDO::PARAM_STR); $stmt->bindParam(':test4', $fname4, PDO::PARAM_STR); $stmt->execute(); } catch(PDOException $e) { header('Location: index.php'); } ?>
  21. Hallo Iedereen! Mijn redirect bestand is vulnerable voor GET. Het 1e bestand met een id 'bestand.php?id=184' word geredirect naar redirect.php via een button: <form class="LoginForm" action="redirect1.php?id=<?php echo $_GET['id']; ?>" method="post" autocomplete="off"> Het redirect.php bestand ziet er zo uit: http://pastebin.com/V794s9rU Via het programma: SQLMap kwam ik erachter dat mijn form hier vulnerable voor is. Hiermee kon ik zo'n beetje mijn hele database uitlezen en dit is niet mijn bedoeling! Ik ben zelf niet een held in SQL maar ziet iemand een oplossing?
  22. Oh sorry, I tought this was a dutch forum somehow haha. I just configured a cron job on the cpanel of my domain. I would like to have a timer on a php page to see how long until the next cron job is executed. I tried googling but couldn't really find anything. Do any of you have an idea? Thanks!
  23. Hallo! Ik heb net een cron job ingesteld via cpanel. Graag zou ik via php een timer willen hebben om te laten zien hoelang het duurt voordat de cronjob opnieuw word uitgevoerd. Ik heb gegoogled maar kon hier jammergenoeg niets over vinden. Heeft iemand van jullie een idee? Thanks!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.