PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1472
Location: In front of a screen....HELP! lol

PostPosted: Sun May 21, 2006 10:45 pm Reply with quote Back to top

ok well in another post i linked to this
Only registered users can see links on this board!
Get registered or login to the forums!


Which i further continued to make a module
Only registered users can see links on this board!
Get registered or login to the forums!


Then Evaders pointed out that this was in discussion stages here but it seems that it has been stopped and id like to put my 2 cents in.

It would be awesome if this script i made could also send an e-mail to whoever we set it to once a day

and that person(s) could update a script

then sentinel could possibly be codded by click of a button to grab the script and run it...for example make a page and
include
Only registered users can see links on this board!
Get registered or login to the forums!


Then the option to add info to the database could be selected...seems to be a bit easier to code that way.

Im new to this and am by no means qualified to code this myself but what i want and am capable of doing are 2 different things..hopefully this will be a good start though.[/url]


Last edited by gregexp on Wed May 24, 2006 6:55 pm; edited 1 time in total
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1472
Location: In front of a screen....HELP! lol

PostPosted: Mon May 22, 2006 2:06 am Reply with quote Back to top

Actually i had some ideas with simply a button update ur sites database..curious though if u hit submit and lets say we host it on my site for example

I would have a part of the code say include
Only registered users can see links on this board!
Get registered or login to the forums!


But this would try to update on mysite but not their correct?

Time to think here...I just dont have enough knowledge to pull this off myself but i sure would love to see this in action.

Edit: after much brainstorming if the above statement is true then coulnt we make a form eliment on my site...for example

Iframe the sentinel admin to a php link on my site

Leave part of the code in variable form...

link from what ive been reading...
Form method=Post action ="http://'$link'/sentinel_updates.php"

then
$link=$_Request['link']
input name="link" type="text"
Now this may not work because of the fact that we are going from server to server applying server commands...if im not mistakin in order to write to a file on the server u must have the commanding files on that same server..I hope that im not mistakin...but wouldnt mind being wrong Laughing...would make this soo much easier. Laughing

Other then puting an e-mailer function in a script and then updating a site for blocked_ips updates...seems to me this will be harder then i ever anticipated.
Good thing i dont give up easy ehh..im still thinkin through some things..makin little efforts here and there to see how well the code will work if at all.
Exact same problem as be4 with it being hosted on another server...So with what ive seen only way to do it is to give a script to a site owner...I dont think there would be neway of using somethin outside a website to update any sites databse....although..time for more brainstorming Laughing
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1472
Location: In front of a screen....HELP! lol

PostPosted: Tue May 23, 2006 8:36 pm Reply with quote Back to top

in an effort to further my skill at making scripts and such...i made this little tool...might be helpful to ne1 who doesnt know how to access their sites database
Only registered users can see links on this board!
Get registered or login to the forums!


This will bypass sentinel completley in an effort for the owner to unblock himself...the readme contains the bases for the .htacess edit that might need to be made.
But i think this tool could be usefull to anyone.

see i told u i learn fast Wink
Laughing

UPDATE: see with not knowing how to define the submit part of the code..i was forced to make it into 2 files instead of just one...but thanx to ravens theme fix utility as an example i was able to understand how to define it within a single file..so now its just one file and it works,
Also using that as an example..i learned how to make it show somethin in the event that it didnt work. Mysql error.

Thanx raven and w3c for the examples and resources.
and so many others id be spamming this forum thankin u all Laughing


Last edited by gregexp on Thu May 25, 2006 6:17 am; edited 1 time in total
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
montego
Moderator


Joined: Aug 29, 2004
Posts: 7582
Location: Arizona

PostPosted: Wed May 24, 2006 5:45 am Reply with quote Back to top

Keep this up and Raven will use his powers of suggestion to rope you onto the RavenNuke Team! ROTFL
View user's profile Send private message Visit poster's website
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1472
Location: In front of a screen....HELP! lol

PostPosted: Wed May 24, 2006 8:50 am Reply with quote Back to top

Im trying to learn.

And this forum really helped me do just that.

Thats why the credits have the link to this forum in it Cool

RavensScripts
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1472
Location: In front of a screen....HELP! lol

PostPosted: Thu May 25, 2006 5:03 am Reply with quote Back to top

any thoughts on this idea at all to make it so that with a simple click of a button they could add things to their database?
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
montego
Moderator


Joined: Aug 29, 2004
Posts: 7582
Location: Arizona

PostPosted: Thu May 25, 2006 6:12 am Reply with quote Back to top

I would suggest an admin only module that they can install on their nuke site which pulls the data in XML format from your site at the push of a button... Wink
View user's profile Send private message Visit poster's website
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1472
Location: In front of a screen....HELP! lol

PostPosted: Thu May 25, 2006 6:20 am Reply with quote Back to top

Curious..

Well time to look into that and see if i cant come up with an addon.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1472
Location: In front of a screen....HELP! lol

PostPosted: Thu May 25, 2006 9:41 pm Reply with quote Back to top

Wouldnt that be the same as an iframe with a files contents on display...curious..what do u think of making a script that uses a function to define a single variable.

MYsite/include/Sentinel_update.php:

$query1 ="SELECT `ip_addr` FROM `".$prefix."_nsnst_blocked_ips` ORDER BY `date` DESC ";
$result3=mysql_query($query1);
while (list($ip_addr1) = mysql_fetch_row($result3)){
$Var='$ipaddr1'
}

then on another site.
require_once("http://darklords-lair.com/includes/Sentinel_update.php");

$query ="INSERT INTO `nuke_nsnst_blocked_ips` VALUES ('$Var','1', '', '','', 'Added by Admin', '11', '', '', '', '', '', ",", '', '', 0, 'us');
$result=mysql_query($query);
while (list($Var) = mysql_fetch_row($result)){
echo "Success, Your blocked ips have been added";
}
else{
echo "he block ips could not be added MySQL said: '.mysql_error().'";
}

Now i do believe this should work but im not as knowledgable on this so yeah...any ideas...imma test this script Tonight.
Now this may also be needing some php formatting and synatax correction..but any ideas on whether or not this will work?
EDIT:I think this way might work better.
But im workin on this a little bit more
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1472
Location: In front of a screen....HELP! lol

PostPosted: Fri May 26, 2006 2:43 am Reply with quote Back to top

Wait i think i see what u mean now by xml format but is there a way to display somethin in xml format and then wed have to write a script designed to call upon those tags correct?
UPDATE: Ive been makin attempts and coding this as best as i can but its not gotten me any further..seems that it doesnt like to accept outside references on includes or requires once codes...i think i might be outta my league on this one.

I havent givin up and i think ive accomplished somethin here...I have written a script that writes to a file just the sql information..now im am just beginning to code this stuff so yeah...lol..It WILL be complete soon..an admin only module that calls offsite to do this lets see how well it works..lol
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1472
Location: In front of a screen....HELP! lol

PostPosted: Sat May 27, 2006 1:44 pm Reply with quote Back to top

ok hopin some1 can see somethin i missed here.

This is what ive done so far with this idea here:

First i made a file that reads from a database table(makin a script for some1 to maintain that table on another date.)

Now after it reads it, it takes it and puts in in a file.

I have it coded to where it puts it in there as an sql query.

This was difficult but not the problem.

The script that writes to another file(still in developement but does the job so it works just need to make it more functional..later):
Code:
<?php

   require_once("mainfile.php");
    echo " <form method=\"post\">"
 ."<p align=\"center\"><font face=\"Verdana\" size=\"2\"><input type=\"submit\" name=\"submit\" value='Take ip out of database'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type=reset value='Reset Form'></font></form>";
  if ($_POST['submit'])  {
          $query1 ="SELECT `ip_addr` FROM `".$prefix."_nsnst_blocked_ips` ORDER BY `date` DESC ";
          $result3=mysql_query($query1);

          while (list($var) = mysql_fetch_row($result3)){




         $fp = fopen ("Sentinel_update1.txt", "a+");
        fwrite ($fp,"INSERT INTO `nuke_test` VALUES ('','$var');");

}
}
fclose ($fp);


?>


Now this is the contents of the update script for the table...using another table name to test it:

Code:


<?php
 require_once("config.php");
  $link = mysql_connect($dbhost, $dbuname, $dbpass);
mysql_select_db($dbname,$link);
echo " <form method=\"post\">"
 ."<p align=\"center\"><font face=\"Verdana\" size=\"2\"><input type=\"submit\" name=\"submit\" value='Take ip out of database'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type=reset value='Reset Form'></font></form>";


   if ($_POST['submit'])  {


   $fp = fopen ("http://darklords-lair.com/new/Sentinel_update1.txt", "r");
   $bytes = "10000000000";
   $buffer = fread($fp, $bytes);
   fclose ($fp);
      $buffer1 = "$buffer";
     $query = "";
    if ($p_transaction_safe) {
     $buffer2 = 'START TRANSACTION;' . $buffer1 . '; COMMIT;';
   };
  $query_split = preg_split ("/[;]+/", $buffer2);
  foreach ($query_split as $command_line) {
   $command_line = trim($command_line);
   if ($command_line != '') {
     $query_result = mysql_query($command_line);
     if ($query_result == 0) {
        echo "$buffer";
     };
     };

  };

             return $query_result;
             }





?>


now the update script..to write to the file i know works
the 10000000000
is what i had to write to make it so that it would read it all...byte size but file() will let me do this without a file size but it seems it does its own research on a server and lagged the data flow really badly so yeah
If u read this earlier ull see i ran into the problem of the sql query not being in quotes...worried that the updte script would not be able to put it all in quotes or would have multiple quotes...as u can see from above i used $buffer1="$buffer";
Seems to output the way i want.

Now what this does...is it takes the contents of a file and at every semicolin turns it into an sql command...since mysql_query only allows one sql command at a time...fopen requires it to be turned on at the server level..but it allows for the opening of a url instead of just a file...Its the same as the admin auth i think...admin auth requires register globals to be turned on...this is in the php.ini of a server and so is the fopen url..now i plan on makin a link to echo it during the update that will allow ppl to download the script...might even make it so that they can select either the fopen or their own site...still workin on it and wanted to get ur guys opinion of fopen...seeing as how hosts can turn it off...is off the norm or a good idea...i dont own my own server and have limited knowledge on it..although im reading up on it.

Well to say this simply put...it works Cheers
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1472
Location: In front of a screen....HELP! lol

PostPosted: Tue May 30, 2006 7:44 am Reply with quote Back to top

ok i turned this into an admin only module...but it seems that fopen is not always allowed or it trys to get address info..which is lost to me as to why it works sometimes but not all the time...im hoping that by posting all this u guys can see the progress and give me advice while making this...it works but not all the time...curious if any of u have any ideas or sudjestions...id really like to see this work...to maintain a databases blocked ips would be without a doubt somethin that would make a lot of website owners life a lot easier....any ideas would really be appreciated and i did investigate the xml idea...i just wasnt sure how it could be implimented and with the fact that this is somethin im making without direct contact with people who would be better suited at this...just saying im doin the best i can and i hope that this comes into use after its complete..im working extremely hard at this and thank u for ur help thus far...i apologize if im buggin u all.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1472
Location: In front of a screen....HELP! lol

PostPosted: Thu Jun 01, 2006 5:13 pm Reply with quote Back to top

i havent made any progress on this at all...i have searched almost all of the function in the php website that i can find but truth be told...some of them seem like they would work..other seem like they wouldnt...ive tried a lot of different codes...im not always sure if its me or if its the server...the syntax may not be correct...in searching ive found that most codes require the fopen wrappers in a server and therefore if fopen wont work...most will not either....i REALLY hope some1 has something that i might be able to grasp here. It may be my understanding or the server itself. ANY ideas?
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
evaders99
Moderator


Joined: Apr 30, 2004
Posts: 2883

PostPosted: Sat Jul 08, 2006 1:26 am Reply with quote Back to top

Without fopen, there's very little you can do besides shell scripts. Sad
Perhaps you need a manual option to upload things?
View user's profile Send private message Visit poster's website
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1472
Location: In front of a screen....HELP! lol

PostPosted: Sat Jul 08, 2006 3:10 am Reply with quote Back to top

Thanx evaders, but I have found a workaround. I cant fopen a file from another site but I can include a file from another site.

Just need to update that file to define a variable the script can use to insert information into the sql database, only thing I worry bout is the potential risk to the site by doing this.

I haven't been updating this thread, I havent given up on the idea either though.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1472
Location: In front of a screen....HELP! lol

PostPosted: Sun Aug 13, 2006 1:30 pm Reply with quote Back to top

UPDATE:
Whos the man, huh?

I got it working 100%

Now the admin module for the trusted site to update is going to be just as tricky.

Not sure how I should approach this, Would be nice if sentinel team could add something that would make it list the blocked ips in a file so that the admin can grab blocked ips from popular sites.

The customers admin panel is already done.
The blocked ips list admin should see a list of current blocked ips from multiple sites, This wont be difficult once I define a filename to grab that info from.

Heres the hard part, I want a search to be applied to make it so that the trusted admin can whois for the ip and figure out if its worth blocking or not.

Then I need it to create to boxes, one for inserting and one for deleting.
And I need the script to update accordingly.
So now I need a trusted webmaster AND a whois function, grabbing function, insert/delete function.

Boy the tasks I take on Laughing

Well at least I finally overcame the fopen problem.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
evaders99
Moderator


Joined: Apr 30, 2004
Posts: 2883

PostPosted: Mon Aug 14, 2006 12:27 am Reply with quote Back to top

Could put the blocked IPs into an RSS feed. Would be pretty easy to read from
View user's profile Send private message Visit poster's website
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1472
Location: In front of a screen....HELP! lol

PostPosted: Mon Aug 14, 2006 6:52 pm Reply with quote Back to top

True, Im continuing work on this, looks like it wont be another couple of months till this is complete. I think I am going to need some people to beta test this on their servers.

As things progress it will be necessary to REALLY secure the crap out of it.

Im glad I know some good people for just this need.
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
bugsTHoR
Worker
Worker


Joined: Apr 05, 2006
Posts: 187

PostPosted: Wed Aug 16, 2006 9:52 pm Reply with quote Back to top

i volantier when ya have it done i got 80 gig webspace to have as many site to mess up as i can lol
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum