Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Pytanko dot. wyciagana z tresci :pp
crackcomm
post
Post #1





Grupa: Zarejestrowani
Postów: 184
Pomógł: 6
Dołączył: 23.02.2008
Skąd: Katowice

Ostrzeżenie: (0%)
-----


Witam mam zamiar zrobic bota ktory chodzi po sronach file get contentsm wyciaga adresy do serverow do jednej malo znanej gry, nie bede podawal nazwy ;pp
adresy wygladaja tak :
stronaxssd:asd.sd
oczywiscie to nie wyglada dokladni tak to tylko przyklad tongue.gif p
chcial bym bot wchodzil na strone file_get_contentsem i wyciagalo tylko te "adresy" i wyswietlalo je smile.gif
nie mam zielonego pojecia jak to zrobic (wiem tylko ze za pomoca preg_match_all)
Prosze o pomoc i przyklady


--------------------
Sygnaturka comes here.
Go to the top of the page
+Quote Post
2 Stron V   1 2 >  
Start new topic
Odpowiedzi (1 - 19)
bim2
post
Post #2





Grupa: Zarejestrowani
Postów: 1 873
Pomógł: 152
Dołączył: 9.04.2006
Skąd: Berlin

Ostrzeżenie: (0%)
-----


  1. <?php
  2. preg_match_all('!([a-zA-Z_-]+?):([a-zA-Z_-]+?).:([a-zA-Z_-]+?)!is', $file_get_contents, $matches);
  3. print_r($matches);
  4. ?>

Nie sprawdzałem, ale powinno działac.


--------------------
Go to the top of the page
+Quote Post
crackcomm
post
Post #3





Grupa: Zarejestrowani
Postów: 184
Pomógł: 6
Dołączył: 23.02.2008
Skąd: Katowice

Ostrzeżenie: (0%)
-----


sprawdze, a co do
tych wykrzyknikow na poczatku i przed is, czesto tez widzialem np. | to ma jakas roznice ?

niestety :
Array ( [0] => Array ( ) [1] => Array ( ) [2] => Array ( ) [3] => Array ( ) )

Ten post edytował crackcomm 9.03.2008, 10:56:19


--------------------
Sygnaturka comes here.
Go to the top of the page
+Quote Post
PawelC
post
Post #4





Grupa: Zarejestrowani
Postów: 1 173
Pomógł: 121
Dołączył: 24.09.2007
Skąd: Toruń

Ostrzeżenie: (0%)
-----


to jest wyrażenie które sszuka linki na stronie
smile.gif
  1. <?php
  2. "(<a(?:.*?)?href=\"(.*?)\"(?:.*?)?>)si"
Go to the top of the page
+Quote Post
bim2
post
Post #5





Grupa: Zarejestrowani
Postów: 1 873
Pomógł: 152
Dołączył: 9.04.2006
Skąd: Berlin

Ostrzeżenie: (0%)
-----


  1. <?php
  2. $file_get_contents = 'lolsfsdf:sdfsdf.pl ehhhh:fsdfsdf:sfsdf.pl';
  3. preg_match_all('!([a-zA-Z_-]+?):([a-zA-Z_-]+?).([a-zA-Z_-]{2})!is', $file_get_contents, $matches);
  4. foreach($matches[0] AS $value)
  5. {
  6. echo $value.'<br />';
  7. }
  8. ?>


Jeden ":" za dużo smile.gif

Co do wykrzykników, jest znak hmm "startu" i "końca" wyrażenia, po 2 wykrzykniku (znaku) daje się parametry. Mogłoby być tam i @ czy $ tongue.gif Ważne, że p obu stronach to samo.

Ten post edytował bim2 9.03.2008, 11:45:10


--------------------
Go to the top of the page
+Quote Post
crackcomm
post
Post #6





Grupa: Zarejestrowani
Postów: 184
Pomógł: 6
Dołączył: 23.02.2008
Skąd: Katowice

Ostrzeżenie: (0%)
-----


nie pokazuje calych adresow ;/
Cytat
sdfs:sdfs
sdsdfsdf:dsdf
sdsdfsdfsdfsdf:sdfs

Cytat(ExPlOiT @ 9.03.2008, 11:28:28 ) *
to jest wyrażenie które sszuka linki na stronie
smile.gif
  1. <?php
  2. "(<a(?:.*?)?href=\"(.*?)\"(?:.*?)?>)si

mogl bys pokazac jak to zastotowac bo nic z tego nie rozumiem ;/

Ten post edytował crackcomm 9.03.2008, 12:50:01


--------------------
Sygnaturka comes here.
Go to the top of the page
+Quote Post
Cysiaczek
post
Post #7





Grupa: Moderatorzy
Postów: 4 465
Pomógł: 137
Dołączył: 26.03.2004
Skąd: Gorzów Wlkp.




~bim2 już Ci pokazał, a ponoć to Ty masz zamiar zrobić bota. Pokaż zatem, co do tej pory zrobiłeś. Śmiem wątpić, że cokolwiek :/


--------------------
To think for yourself you must question authority and
learn how to put yourself in a state of vulnerable, open-mindedness;
chaotic, confused, vulnerability, to inform yourself.
Think for yourself. Question authority.
Go to the top of the page
+Quote Post
PawelC
post
Post #8





Grupa: Zarejestrowani
Postów: 1 173
Pomógł: 121
Dołączył: 24.09.2007
Skąd: Toruń

Ostrzeżenie: (0%)
-----


  1. <?php
  2. $file_get_contents = 'lolsfsdf:sdfsdf.pl ehhhh:fsdfsdf:sfsdf.pl';
  3. preg_match_all("(<a(?:.*?)?href=\"(.*?)\"(?:.*?)?>)si", $file_get_contents, $matches);
  4. foreach($matches[0] AS $value)
  5. {
  6. echo $value.'<br />';
  7. }
  8. ?>

z tym że musisz pobrać stronę aby Ci wyszukał linki, prostego bota który wyszukuje linki możesz zobaczyć tutaj:
exploitek.info/bot.php

Ten post edytował ExPlOiT 9.03.2008, 12:41:07
Go to the top of the page
+Quote Post
crackcomm
post
Post #9





Grupa: Zarejestrowani
Postów: 184
Pomógł: 6
Dołączył: 23.02.2008
Skąd: Katowice

Ostrzeżenie: (0%)
-----


nie zbyt to wychodzi
Cytat
<td class="leftMenuTxt"><div class="leftMenuTxtA"><a href=http://www.learn4good.com/board/1_1028_0.html>European School of E...</a><br/><a href=http://www.learn4good.com/board/10_3020_0.html>Drivers Ed Games</a><br/><a href=http://www.learn4good.com/board/3_3050_0.html>happy families resea...</a><br/><a href=http://www.learn4good.com/board/10_3048_0.html>Trukz online game</a><br/><a href=http://www.learn4good.com/board/7_3047_0.html>can anyone give me a...</a><br/><a href=http://www.learn4good.com/board/1_156_0.html>Au Pair Ireland in D...</a><br/><a href=http://www.learn4good.com/board/5_2737_0.html>What are you listeni...</a><br/><a href=http://www.learn4good.com/board/7_3046_0.html>Nanny/Caregiver Need...</a><br/><a href=http://www.learn4good.com/board/7_2926_0.html>Seeking Nanny in Wax...</a><br/><a href=http://www.learn4good.com/board/10_2136_0.html>bubble trouble</a><br/></div></td>

</tr>
</table>
</td>
<td valign="top"><table width="100%">
<tr>
<td width="15%" class="caption4">&nbsp; &nbsp; Author</td>
<td width="85%" class="caption4">&nbsp; &nbsp; Message</td>

</tr>
<tr valign=top class=tbCel1>

a co z ucinaniem linkow ?
probowalem zmienic na
Kod
preg_match_all('!([a-zA-Z_-]+?)@([a-zA-Z_-]+?).([a-zA-Z_-]+?)!is', $file_get_contents, $matches);
tez nic ;/

Ten post edytował crackcomm 9.03.2008, 12:59:22


--------------------
Sygnaturka comes here.
Go to the top of the page
+Quote Post
PawelC
post
Post #10





Grupa: Zarejestrowani
Postów: 1 173
Pomógł: 121
Dołączył: 24.09.2007
Skąd: Toruń

Ostrzeżenie: (0%)
-----


Pobrane linki sobie przefiltruj i zapisz tylko te w których występuje mp. nazwa gry
Go to the top of the page
+Quote Post
crackcomm
post
Post #11





Grupa: Zarejestrowani
Postów: 184
Pomógł: 6
Dołączył: 23.02.2008
Skąd: Katowice

Ostrzeżenie: (0%)
-----


hm dobry pomysl juz sie za to biore tongue.gif
i oczywiscie "synonimy"
ale co mi po tym jak nie da sie wyciagnac adresow servow ?
skrypt juz +- dziala
Kod
([a-zA-Z_-]+?):([a-zA-Z_-]+).([a-zA-Z_-]{2,5})

a jak np. jest
asdasd:asdsadas.asdasd.sdd to pokazuje tylko asdasd:asdsadas.asdasd

Ten post edytował crackcomm 9.03.2008, 13:30:28


--------------------
Sygnaturka comes here.
Go to the top of the page
+Quote Post
PawelC
post
Post #12





Grupa: Zarejestrowani
Postów: 1 173
Pomógł: 121
Dołączył: 24.09.2007
Skąd: Toruń

Ostrzeżenie: (0%)
-----


a zobacz tak:
  1. <?php
  2. ([a-zA-Z_-]+?):([a-zA-Z_-]+).([a-zA-Z_-]+).([a-zA-Z_-]{2,5})
  3. ?>
Go to the top of the page
+Quote Post
crackcomm
post
Post #13





Grupa: Zarejestrowani
Postów: 184
Pomógł: 6
Dołączył: 23.02.2008
Skąd: Katowice

Ostrzeżenie: (0%)
-----


probowalem ale to mi parsuje tez nastepne slowo
np;
asdasd:asdd.asds zapraszam
jezeli nie ma drogiego . w adresie
a jak jest to normalnie wywietla


--------------------
Sygnaturka comes here.
Go to the top of the page
+Quote Post
bim2
post
Post #14





Grupa: Zarejestrowani
Postów: 1 873
Pomógł: 152
Dołączył: 9.04.2006
Skąd: Berlin

Ostrzeżenie: (0%)
-----


  1. <?php
  2. $file_get_contents = 'lolsfsdf:sdfsdf.pl ehhhh:fsdfsdf:sfsdf.pl witaj adres:costam.lolek';
  3. preg_match_all('!([a-zA-Z_-]+?):([a-zA-Z_-]+?).([a-zA-Z_-]{0,5})!is', $file_get_contents, $matches);
  4. foreach($matches[0] AS $value)
  5. {
  6. echo $value.'<br />';
  7. }
  8. ?>

daje
Cytat
lolsfsdf:sdfsdf.pl
fsdfsdf:sfsdf.pl
adres:costam.lolek


Chyba o to chodziło smile.gif

btw. Poprawiłem wyrażenie


--------------------
Go to the top of the page
+Quote Post
crackcomm
post
Post #15





Grupa: Zarejestrowani
Postów: 184
Pomógł: 6
Dołączył: 23.02.2008
Skąd: Katowice

Ostrzeżenie: (0%)
-----


niestety ucina ;/
zamiasta np
Cytat
sdsadas:asasd.sss
jest
Cytat
sdsadas:asasd.ss


--------------------
Sygnaturka comes here.
Go to the top of the page
+Quote Post
PawelC
post
Post #16





Grupa: Zarejestrowani
Postów: 1 173
Pomógł: 121
Dołączył: 24.09.2007
Skąd: Toruń

Ostrzeżenie: (0%)
-----


Mi przy tym kodzie:
  1. <?php
  2. $file_get_contents = 'sdsadas:asasd.asds ehhhh:fsdfsdf:sfsdf.sdsd';
  3. preg_match_all('!([a-zA-Z_-]+?):([a-zA-Z_-]+?).([a-zA-Z_-]{0,5})!is', $file_get_contents, $matches);
  4. foreach($matches[0] AS $value)
  5. {
  6. echo $value.'<br />';
  7. }
  8. ?>

Wyświetla:
  1. sdsadas:asasd.asds
  2. fsdfsdf:sfsdf.sdsd
Go to the top of the page
+Quote Post
crackcomm
post
Post #17





Grupa: Zarejestrowani
Postów: 184
Pomógł: 6
Dołączył: 23.02.2008
Skąd: Katowice

Ostrzeżenie: (0%)
-----


napisz na gg 10498189


--------------------
Sygnaturka comes here.
Go to the top of the page
+Quote Post
bim2
post
Post #18





Grupa: Zarejestrowani
Postów: 1 873
Pomógł: 152
Dołączył: 9.04.2006
Skąd: Berlin

Ostrzeżenie: (0%)
-----


GG jest od gadania... skopiuj kod jeszcze raz (z tego 2 posta). Na 100% będzie działać i mi nie ściemniaj, bo 2 osobą działa, a tobie się chyba sprawdzić nie chce.


--------------------
Go to the top of the page
+Quote Post
crackcomm
post
Post #19





Grupa: Zarejestrowani
Postów: 184
Pomógł: 6
Dołączył: 23.02.2008
Skąd: Katowice

Ostrzeżenie: (0%)
-----


dziala
ale czasem adrsy wygladaja tez tak :
sfsdfsdf:sdfdf.sdfsdf.sdfsdf
czyli maja dwie kropki


--------------------
Sygnaturka comes here.
Go to the top of the page
+Quote Post
PawelC
post
Post #20





Grupa: Zarejestrowani
Postów: 1 173
Pomógł: 121
Dołączył: 24.09.2007
Skąd: Toruń

Ostrzeżenie: (0%)
-----


Cytat
sfsdfsdf:sdfdf.sdfsdf.sdfsdf

A adresy stron tak
  1. http:\\www.adres.pl

zmień sobie tak aby po dwykropku były \\ i będzie wszystko grało

Ten post edytował ExPlOiT 10.03.2008, 10:57:24
Go to the top of the page
+Quote Post

2 Stron V   1 2 >
Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 19.08.2025 - 11:47