User
Pass
2FA
 
 

Script Open HLDS ! by ice

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> Trash -> Programming / Scripting / Database
Author Message3362
icezone

[Mentally Stable]



Status: Offline
(since 13-04-2020 17:12)
Joined: 31 Jul 2009
Posts: 59, Topics: 23
Location: C:\windows\HERE

Reputation: 239.4
Votes: 8

Post Posted: 09-08-2009, 15:52:58 | Translate post to: ... (Click for more languages)

Salut ! Am facut un mic script pentru HLDS -
ce face : porneste serverul dupa cum alegeti prin WAMP fara sql
are un buton care oprest tot ce inseamna hlds.exe din taskmanager
numit Opreste Server
sunt incepator PHP asa ca scriptul e putin cu BUG-uri
EX: cand pornesc serverul (bag ip , port , tot ce trebuie ) , serverul porneste dar pagina inca se incarca pentru a deschide tot ce scrie in CMD la server ....

scriptul are si o parola care puteti sa o modificati din fisierul admin.php linia 3
Code:
<?php
class maxAcces{
   var $password = 'PAROLA';
   
    function showLoginForm(){
?>


PS : Scriptul de pornit serverul e facut 100% de mine in afara de status care al am de la Shocker si scriptul pentru parola e loat de pe un site

Serverul PORNIT nu apare decat in Task Manager !

Download Aici !

Astept pareri si Updateuri -


hast
0 0
  
Back to top
View user's profile Send private message
Shocker

[Freakz owner]



Status: Offline
(since 08-02-2020 12:17)
Joined: Momentul zero
Posts: 33986, Topics: 1350
Location: localhost

Reputation: 6485.6
Votes: 829

   
Post Posted: 09-08-2009, 16:31:36 | Translate post to: ... (Click for more languages)

E nice. Fa-i si un "check if any server is running", foloseste-te de
Code:
tasklist | find /I "hlds.exe"

Eventual sa poti sa inchizi doar un anume proces hlds.exe (click pe vreunu din lista de la tasklist):
Code:

taskkill /PID 1234

Unde 1234 e PID-ul proceselor


FREAKZ COMMUNITY @ Facebook
WOW FREAKZ @ Facebook
0 0
  
Back to top
View user's profile Send private message
icezone

[Mentally Stable]



Status: Offline
(since 13-04-2020 17:12)
Joined: 31 Jul 2009
Posts: 59, Topics: 23
Location: C:\windows\HERE

Reputation: 239.4
Votes: 8

Post Posted: 09-04-2011, 23:15:29 | Translate post to: ... (Click for more languages)

Shocker wrote:
E nice. Fa-i si un "check if any server is running", foloseste-te de
Code:
tasklist | find /I "hlds.exe"

Eventual sa poti sa inchizi doar un anume proces hlds.exe (click pe vreunu din lista de la tasklist):
Code:

taskkill /PID 1234

Unde 1234 e PID-ul proceselor


M-am gandit sa lucrez la un UPDATE ...
Sa zicem ca am 2 servere in PC , si pentru fiecare server folosesc cate un script
Code:
http://localhost/server1/index.php
http://localhost/server2/index.php

daca amandoua serverele sunt pornite si vreau sa opresc doar 1 .. cum imi dau seama care hlds.exe apartine acelui Script ?
Un "start" in cmd cu pornire PID care vreau exista ?
Sau cum pot sa creezi useri virtuali cum e la CPanel ?


hast
0 0
  
Back to top
View user's profile Send private message
Tr3z3gu3T

[Mentally Stable]



Status: Offline
(since 12-06-2019 13:16)
Joined: 29 Sep 2006
Posts: 493, Topics: 71
Location: Romania

Reputation: 481.6
Votes: 14

 
Post Posted: 10-04-2011, 02:32:41 | Translate post to: ... (Click for more languages)

una bucata varianta ar fi cu window title de la bun inceput setezi cate un titlu diferit pentru fiecare "fereastra" apoi...

Code:
TASKKILL /F /FI "PID ge 1000" /FI "WINDOWTITLE ne untitle*"


nu m-am jucat cu chestia asta insa merita sa incerci -

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
icezone

[Mentally Stable]



Status: Offline
(since 13-04-2020 17:12)
Joined: 31 Jul 2009
Posts: 59, Topics: 23
Location: C:\windows\HERE

Reputation: 239.4
Votes: 8

Post Posted: 10-04-2011, 02:38:40 | Translate post to: ... (Click for more languages)

Tr3z3gu3T wrote:
una bucata varianta ar fi cu window title de la bun inceput setezi cate un titlu diferit pentru fiecare "fereastra" apoi...

Code:
TASKKILL /F /FI "PID ge 1000" /FI "WINDOWTITLE ne untitle*"


nu m-am jucat cu chestia asta insa merita sa incerci -


- nu prea functioneaza ... imi inchide tot ce am executabil pe Desktop ....


hast
0 0
  
Back to top
View user's profile Send private message
Tr3z3gu3T

[Mentally Stable]



Status: Offline
(since 12-06-2019 13:16)
Joined: 29 Sep 2006
Posts: 493, Topics: 71
Location: Romania

Reputation: 481.6
Votes: 14

 
Post Posted: 10-04-2011, 02:42:45 | Translate post to: ... (Click for more languages)

ehh aprofundeza.. -

Code:
TASKKILL /F /FI "WINDOWTITLE eq wina*"


si imi inchide winampul, sau poti scrie si intreg titlul fara *(wilcard)

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
icezone

[Mentally Stable]



Status: Offline
(since 13-04-2020 17:12)
Joined: 31 Jul 2009
Posts: 59, Topics: 23
Location: C:\windows\HERE

Reputation: 239.4
Votes: 8

Post Posted: 10-04-2011, 02:48:40 | Translate post to: ... (Click for more languages)

da ... merge perfect - dar tot nu ma ajuta ca numele la executabil apare in CMD si e "Console" degeaba bag eu ce nume vreau
am bagat
start "TEST" hlds.exe
si nimik ...


hast
0 0
  
Back to top
View user's profile Send private message
Tr3z3gu3T

[Mentally Stable]



Status: Offline
(since 12-06-2019 13:16)
Joined: 29 Sep 2006
Posts: 493, Topics: 71
Location: Romania

Reputation: 481.6
Votes: 14

 
Post Posted: 10-04-2011, 03:00:12 | Translate post to: ... (Click for more languages)

http://developer.valvesoftware.com/wiki/Command_Line_Options#Command-line_parameters

documenteaza-te ce face parametrul -pidfile

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 11-04-2011, 21:09:25 | Translate post to: ... (Click for more languages)

Code:
<?php

function get_process_pids($process_name) {
   ob_start();
   passthru('tasklist /FI "imagename eq '.$process_name.'"');
   $str = ob_get_contents();
   ob_end_clean();
   $m = array();
   preg_match_all('/('.$process_name.')?\s([0-9]+)\s(.+)\s([0-9]+)/', $str, $m);
   $pids = array();
   for ($i = 0; $i < count($m[2]); $i++)
      $pids []= $m[2][$i];
   return $pids;
}

function exec_with_pid($process_name, $command, &$pid) {
   $old = get_process_pids($process_name);
   $retcode = exec($command);
   $new = get_process_pids($process_name);
   $pid_ar = array_diff($new, $old);
   if (count($pid_ar)) $pid = $pid_ar[0];
   else $pid = false;
   return $retcode;
}


/*************************************/
/**  CODUL TAU                      **/
/*************************************/

require_once("admin.php");

$locatie = htmlentities($_POST['locatie']);
$ip = htmlentities($_POST['ip']);
$port = htmlentities($_POST['port']);
$harta = htmlentities($_POST['harta']);
$jucatori = htmlentities($_POST['jucatori']);
$prioritate = htmlentities($_POST['prioritate']);
$pid = false;

if (exec_with_pid('hlds.exe', "cd $locatie && start /$prioritate /b hlds.exe -console -game cstrike +exec server.cfg +map $harta +maxplayers $jucatori +ip $ip +port $port && wait", $pid) == 1)
{
   echo "Serverul a Pornit !";
   if ($pid !== false)
      echo '<br/>PID: ' . $pid;
}

?>


Explicație:
1. Extrage lista de PID-uri care au aceeași imagine (același nume de proces)
2. Executã comanda
3. Extrage iar lista de PID-uri
4. Vezi diferența (ar trebui sã fie noul PID)


Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message
icezone

[Mentally Stable]



Status: Offline
(since 13-04-2020 17:12)
Joined: 31 Jul 2009
Posts: 59, Topics: 23
Location: C:\windows\HERE

Reputation: 239.4
Votes: 8

Post Posted: 19-04-2011, 22:08:11 | Translate post to: ... (Click for more languages)

ooo tare asta Mersi ! Asta cu PID am rezolvat-o .... acum ... Cand dau sa porneasca serverul.... serverul porneste dar pagina tot se mai incarca -

hast
0 0
  
Back to top
View user's profile Send private message
nr913
[Banned user]


Banned


Status: Offline
(since 24-10-2013 10:06)
Joined: 24 Apr 2009
Posts: 4224, Topics: 223
Location: România

Reputation: 60.3
Votes: 156

 
Post Posted: 20-04-2011, 13:20:03 | Translate post to: ... (Click for more languages)

Nu am timp sã mã tot documentez, vezi și tu aici. Dacã tot nu merge, dã-i un search pe google

Attitude - A little thing that makes a BIG difference
0 0
  
Back to top
View user's profile Send private message
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> Trash -> Programming / Scripting / Database  


The time now is 05-05-2024, 16:12:18
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x