Ir para conteúdo
Fórum Script Brasil
  • 0

(Resolvido) Script de modificação de texto


Lucas Peregrino

Pergunta

Boa noite pessoal sou novo em programação para mim esta meio dificil pois os horarios para estudar esta bravo devido a correria do dia a dia sou profissional na are de ti com isso não e meu foco. Bem estou aqui para pedir ajuda pois estou tentado desenvolver uma ferramenta que e boba mais ao mesmo tempo e bem complicado.

O que simplismente ela faria seria o seguinte vou selecionar um arquivo texto esse arquivo possui uma lista gigante de paginas da internet tanto ip quanto dominios a onde for dominios gostaria de estar colocando um . na frente detalhe a lista do mesmo jeito ela pode ter apenas uma linha tem arquivos que tem mais 4 milhões de linhas.

ex.: lista

Original Editado

1-monster.ru .1-monster.ru
1-porno.org .1-porno.org
1-securebanking.com .1-securebanking.com
1-sexe-gratuit.biz .1-sexe-gratuit.biz
1-uploads.ru .1-uploads.ru
1-verygoods.ru .1-verygoods.ru
1.10.97.216 1.10.97.216
1.104.7.195 1.104.7.195
1.11.214.186 1.11.214.186
1.112.201.202 1.112.201.202
1.114.164.11 1.114.164.11
1.114.176.202 1.114.176.202
1.114.239.159 1.114.239.159

1.browncastro.com .1.browncastro.com
1.michaelwilsonmusic.com .1.michaelwilsonmusic.com

100-celebrities.com .100-celebrities.com
100-escorts.com .100-escorts.com

Aqui deixo uma blacklist de site a qual tenho colocar os pontos na frente para ter uma ideia

12.129.206.102
12.129.225.115
12.28.27.130
12.28.27.131
12.28.27.132
128.121.249.189
128.242.116.130
14words.com
192.67.198.4
192.67.198.49
193.96.188.143
194.200.132.34
194.231.46.220
194.231.46.221
194.246.96.48
195.4.52.48
195.63.211.202
198.104.154.25
198.64.148.133
198.65.131.93
198.65.131.94
199.93.70.2
203.2.124.18
204.181.176.53
204.228.229.164
204.228.229.165
204.228.229.166
204.228.229.167
204.228.229.168
204.228.229.177
204.228.229.178
204.228.229.179
204.228.229.180
204.228.229.181
204.251.10.203
204.251.10.213
204.50.24.185
205.160.14.21
205.160.14.22
205.167.142.6
205.234.132.8
205.241.44.90
206.113.230.2
206.160.0.11
206.160.0.248
206.160.0.252
206.168.114.48
206.168.114.50
206.168.114.52
206.168.114.53
206.207.85.33
206.244.69.51
206.246.209.45
206.251.184.30
206.31.204.150
207.126.49.11
207.158.229.242
207.201.162.40
207.217.96.29
207.217.96.30
207.217.96.31
207.217.96.32
207.217.96.33
207.217.96.35
207.217.96.36
207.217.96.37
207.217.96.38
207.217.96.39
207.217.96.40
207.217.96.41
207.217.96.42
207.217.96.43
207.217.96.44
207.217.96.45
207.231.72.88
207.36.18.209
207.36.45.220
207.44.168.20
207.44.168.233
207.44.169.192
207.44.173.116
207.44.218.85
207.44.248.187
207.44.248.188
207.44.248.190
207.44.249.161
207.70.7.168
207.71.8.68
208.185.127.162
208.185.127.163
208.185.127.165
208.185.127.168
208.185.127.169
208.254.3.130
208.254.3.160
208.254.3.169
208.254.3.180
208.48.246.80
208.55.206.181
208.56.125.247
208.56.200.121
209.1.28.222
209.1.28.62
209.103.172.156
209.103.172.199
209.120.129.252
209.123.16.9
209.123.184.7
209.126.159.26
209.126.159.27
209.126.164.242
209.126.168.26
209.126.206.173
209.126.206.180
209.15.74.4
209.15.84.106
209.16.80.2
209.16.80.4
209.161.0.32
209.161.1.14
209.161.228.29
209.161.231.185
209.161.237.116
209.171.43.13
209.189.198.102
209.195.129.84
209.195.130.178
209.196.188.172
209.197.123.166
209.204.200.140
209.204.217.45
209.240.128.4
209.25.129.211
209.250.128.48
209.250.128.7
209.254.34.188
209.35.194.183
209.51.153.26
209.61.200.137
212.112.238.70
212.114.150.187
212.227.118.69
212.227.174.218
212.227.187.14
212.38.173.23
213.130.63.232
213.130.63.233
213.148.142.130
213.61.105.210
213.61.105.213
213.83.41.141
216.100.98.13
216.100.98.17
216.100.98.24
216.100.99.13
216.100.99.17
216.110.132.232
216.110.143.153
216.110.170.65
216.118.88.207
216.120.251.2
216.126.73.71
216.127.68.84
216.127.78.69
216.138.238.71
216.148.213.149
216.150.67.66
216.167.114.177
216.169.106.11
216.169.126.164
216.173.214.14
216.18.130.8
216.193.197.238
216.193.219.130
216.193.219.176
216.218.248.130
216.218.248.145
216.218.248.174
216.218.248.244
216.219.253.193
216.40.195.47
216.40.213.201
216.43.175.114
216.55.175.240
216.73.102.125
217.158.94.51
217.160.158.162
217.160.181.139
217.160.226.136
217.195.47.119
217.243.191.101
217.243.191.102
217.69.237.5
217.79.181.161
38.119.83.27
38.144.87.87
50cent.com
62.104.23.213
62.116.137.145
62.116.137.155
62.116.137.173
62.116.138.132
62.116.138.135
62.116.138.140
62.116.138.142
62.116.139.64
62.116.140.196
62.116.140.212
62.73.174.194
63.164.32.130
63.218.152.42
63.236.214.203
63.249.227.174
63.251.163.112
64.136.24.162
64.136.24.165
64.143.9.197
64.156.139.229
64.227.44.114
64.235.246.143
64.239.0.11
64.239.28.7
64.239.80.146
64.239.87.165
64.246.32.137
64.246.44.69
64.246.50.88
64.250.235.140
64.250.235.141
64.40.102.41
64.70.225.193
64.74.96.244
64.82.99.102
65.246.58.39
65.246.58.5
65.246.58.7
65.75.153.23
65.98.41.82
66.109.239.42
66.116.109.35
66.139.77.84
66.150.161.133
66.150.51.160
66.175.2.27
66.194.152.138
66.194.239.191
66.194.239.192
66.194.239.86
66.194.67.102
66.216.74.56
66.216.74.57
66.218.79.157
66.218.79.158
66.218.79.159
66.218.79.164
66.218.79.165
66.218.79.166
66.221.97.45
66.226.64.2
66.235.217.102
66.235.219.115
66.246.150.71
66.246.44.63
66.255.14.40
66.255.14.41
66.36.97.32
66.54.217.236
66.70.194.149
66.78.36.83
66.84.33.138
66.96.31.132
66.96.31.165
66.96.31.71
66.98.136.77
66.98.176.92
66.98.245.113
67.15.35.16
67.19.136.164
67.19.136.167
67.19.32.68
68.251.194.114
68.251.194.119
69.0.211.66
69.0.212.37
69.26.170.37
69.43.166.7
69.5.12.203
69.56.220.30
69.57.142.126
69.57.142.159
69.57.142.41
69.60.110.41
69.60.160.133
69.7.164.162
69.7.164.171
69.93.219.186
69.93.219.189
69.93.51.181
70.85.161.7
81.88.35.41
81.88.35.42
82.165.203.135
84.22.162.58
adelaideinstitute.org
air-photo.com
americannaziparty.com
americanskinheads.com
amren.com
anu.org
appd.de
aufmarsch.de
bahb.net
bhsweden.tsx.org
blacksandjews.com
bloodandhonour.com
bnp.net
brainwashstudios.com
buendnis-rechts.de
bulldog88.tsx.org
burks.de
campaign.davidduke.com
churchofsatan.org
civil-liberties.com
civilwartwo.com
club3k.at
codoh.com
cofcc.org
creator.org
crusader.net
dailyrotten.com
deutsches-rechtsbuero.de
deutsches-reich.de
duke.org
dumponyou.com
fn.md.webjump.com
fpp.co.uk
frank-rennicke.de
freedomsite.org
freikorps.com
freimaurer.org
hammerskins.com
hanse-records.de
happytreefriends.com
heimatkunde.tsx.org
heimattreue-jugend.de
hoffman-info.com
ihr.org
internationalknights.de
jdo.org
jeffsarchive.com
johnsack.com
jsvp.ch
k-k-k.com
kamellia.com
kingidentity.com
kkk.com
kkkk.net
kriegsfront.tsx.org
kukluxklan.net
kukluxklan.org
kulmbacher.freeservers.com
kulturkammer.de
lewr.net
lewr.org
louisbeam.com
mankind.org
melvig.org
micetrap.net
midgaard.org
mjt.nysv.org
musicalterrorists.com
n-a-f.com
naawp.com
natall.com
natfront.com
natvan.com
nazi.org
neworderknights.org
niggerjoke.com
nit.de
nizkor.org
nordfront.de.cx
nordland.net
nordzeit.de
normanfinkelstein.com
npd.net
oikrach.com
ourhero.com
pathcom.com
propatria.org
puresatan.com
radioislam.net
rahowa.com
redwatch.co.uk
redwatch.net
redwatch.org.uk
resist.com
resistance.com
revisionism.com
rotten.com
rudolf-hess.org
ruetli1291.ch
schweizer-demokraten.ch
scripturesforamerica.org
seek2.com
siegener-baerensturm.de
signal-online.de
site88.8m.com
skinheadxx.tsx.org
stickdeath.com
stormfront.org
svp.ch
theanonymousemail.com
thisisarandomentrythatdoesnotexist.com
thulenet.com
thulepublications.com
tt-v.de
ukar.org
unitedstrike.com
vanguardnewsnetwork.com
vho.org
wakeupordie.com
wckkkk.com
wcotc.com
whemporium.com
whitepride.net
whiteracist.com
whitesingles.com
whiteunitypress.com
widerstand.com
wno.org
wolfsrudel.org
wotansdungeon.tsx.org

Editado por Lucas Peregrino
Link para o comentário
Compartilhar em outros sites

6 respostass a esta questão

Posts Recomendados

  • 0

a onde for dominios gostaria de estar colocando um . na frente

procedure TForm1.Button1Click(Sender: TObject);
var S: Pchar; s1 : string; i : integer;
begin
   Memo2.Clear;
   for i := 0 to Memo1.Lines.Count -1 do
      begin
        S := Pchar(trim(Memo1.Lines.Strings[i]));
        if pos('1.',s) > 0 then
           Memo2.Lines.Append(s)
        else
           begin
             s1 := StringReplace(s,'1','.1',[rfReplaceAll]);
             Memo2.Lines.Append(s1);
           end;
      end;
end;

.1-monster.ru
.1-porno.org
.1-securebanking.com
.1-sexe-gratuit.biz
.1-uploads.ru
.1-verygoods.ru

1.10.97.216
1.104.7.195
1.11.214.186
1.112.201.202
1.114.164.11
1.114.176.202
1.114.239.159
1.browncastro.com
1.michaelwilsonmusic.com

.100-celebrities.com
.100-escorts.com

OBS: se voce manter o ( - ) traço para os domínios e o ponto ( . ) para o IP , não terá que mudar nada no código

abraço

Link para o comentário
Compartilhar em outros sites

  • 0

ok... fica assim

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    Memo1: TMemo;
    Memo2: TMemo;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

type
  TChars = set of Char;

function FilterChars(const S: string; const ValidChars: TChars): string;
var
  I: integer;
begin
  Result := '';
  for I := 1 to Length(S) do
  if S[I] in ValidChars then
  Result := Result + S[I];
end;

procedure TForm1.Button1Click(Sender: TObject);
var S: Pchar; s1, r : string; i : integer;
begin
   Memo2.Clear;
   for i := 0 to Memo1.Lines.Count -1 do
      begin
         S := Pchar(trim(Memo1.Lines.Strings[i]));
         r := '';
         r := (FilterChars(s,['A'..'Z', 'a'..'z']));
         if r = '' then
            Memo2.Lines.Append(s)
         else
            Memo2.Lines.Append('.'+s);
      end;
end;


end.

Resultado da sua lista

12.129.206.102
12.129.225.115
12.28.27.130
12.28.27.131
12.28.27.132
128.121.249.189
128.242.116.130
.14words.com
192.67.198.4
192.67.198.49
193.96.188.143
194.200.132.34
194.231.46.220
194.231.46.221
194.246.96.48
195.4.52.48
195.63.211.202
198.104.154.25
198.64.148.133
198.65.131.93
198.65.131.94
199.93.70.2
203.2.124.18
204.181.176.53
204.228.229.164
204.228.229.165
204.228.229.166
204.228.229.167
204.228.229.168
204.228.229.177
204.228.229.178
204.228.229.179
204.228.229.180
204.228.229.181
204.251.10.203
204.251.10.213
204.50.24.185
205.160.14.21
205.160.14.22
205.167.142.6
205.234.132.8
205.241.44.90
206.113.230.2
206.160.0.11
206.160.0.248
206.160.0.252
206.168.114.48
206.168.114.50
206.168.114.52
206.168.114.53
206.207.85.33
206.244.69.51
206.246.209.45
206.251.184.30
206.31.204.150
207.126.49.11
207.158.229.242
207.201.162.40
207.217.96.29
207.217.96.30
207.217.96.31
207.217.96.32
207.217.96.33
207.217.96.35
207.217.96.36
207.217.96.37
207.217.96.38
207.217.96.39
207.217.96.40
207.217.96.41
207.217.96.42
207.217.96.43
207.217.96.44
207.217.96.45
207.231.72.88
207.36.18.209
207.36.45.220
207.44.168.20
207.44.168.233
207.44.169.192
207.44.173.116
207.44.218.85
207.44.248.187
207.44.248.188
207.44.248.190
207.44.249.161
207.70.7.168
207.71.8.68
208.185.127.162
208.185.127.163
208.185.127.165
208.185.127.168
208.185.127.169
208.254.3.130
208.254.3.160
208.254.3.169
208.254.3.180
208.48.246.80
208.55.206.181
208.56.125.247
208.56.200.121
209.1.28.222
209.1.28.62
209.103.172.156
209.103.172.199
209.120.129.252
209.123.16.9
209.123.184.7
209.126.159.26
209.126.159.27
209.126.164.242
209.126.168.26
209.126.206.173
209.126.206.180
209.15.74.4
209.15.84.106
209.16.80.2
209.16.80.4
209.161.0.32
209.161.1.14
209.161.228.29
209.161.231.185
209.161.237.116
209.171.43.13
209.189.198.102
209.195.129.84
209.195.130.178
209.196.188.172
209.197.123.166
209.204.200.140
209.204.217.45
209.240.128.4
209.25.129.211
209.250.128.48
209.250.128.7
209.254.34.188
209.35.194.183
209.51.153.26
209.61.200.137
212.112.238.70
212.114.150.187
212.227.118.69
212.227.174.218
212.227.187.14
212.38.173.23
213.130.63.232
213.130.63.233
213.148.142.130
213.61.105.210
213.61.105.213
213.83.41.141
216.100.98.13
216.100.98.17
216.100.98.24
216.100.99.13
216.100.99.17
216.110.132.232
216.110.143.153
216.110.170.65
216.118.88.207
216.120.251.2
216.126.73.71
216.127.68.84
216.127.78.69
216.138.238.71
216.148.213.149
216.150.67.66
216.167.114.177
216.169.106.11
216.169.126.164
216.173.214.14
216.18.130.8
216.193.197.238
216.193.219.130
216.193.219.176
216.218.248.130
216.218.248.145
216.218.248.174
216.218.248.244
216.219.253.193
216.40.195.47
216.40.213.201
216.43.175.114
216.55.175.240
216.73.102.125
217.158.94.51
217.160.158.162
217.160.181.139
217.160.226.136
217.195.47.119
217.243.191.101
217.243.191.102
217.69.237.5
217.79.181.161
38.119.83.27
38.144.87.87
.50cent.com
62.104.23.213
62.116.137.145
62.116.137.155
62.116.137.173
62.116.138.132
62.116.138.135
62.116.138.140
62.116.138.142
62.116.139.64
62.116.140.196
62.116.140.212
62.73.174.194
63.164.32.130
63.218.152.42
63.236.214.203
63.249.227.174
63.251.163.112
64.136.24.162
64.136.24.165
64.143.9.197
64.156.139.229
64.227.44.114
64.235.246.143
64.239.0.11
64.239.28.7
64.239.80.146
64.239.87.165
64.246.32.137
64.246.44.69
64.246.50.88
64.250.235.140
64.250.235.141
64.40.102.41
64.70.225.193
64.74.96.244
64.82.99.102
65.246.58.39
65.246.58.5
65.246.58.7
65.75.153.23
65.98.41.82
66.109.239.42
66.116.109.35
66.139.77.84
66.150.161.133
66.150.51.160
66.175.2.27
66.194.152.138
66.194.239.191
66.194.239.192
66.194.239.86
66.194.67.102
66.216.74.56
66.216.74.57
66.218.79.157
66.218.79.158
66.218.79.159
66.218.79.164
66.218.79.165
66.218.79.166
66.221.97.45
66.226.64.2
66.235.217.102
66.235.219.115
66.246.150.71
66.246.44.63
66.255.14.40
66.255.14.41
66.36.97.32
66.54.217.236
66.70.194.149
66.78.36.83
66.84.33.138
66.96.31.132
66.96.31.165
66.96.31.71
66.98.136.77
66.98.176.92
66.98.245.113
67.15.35.16
67.19.136.164
67.19.136.167
67.19.32.68
68.251.194.114
68.251.194.119
69.0.211.66
69.0.212.37
69.26.170.37
69.43.166.7
69.5.12.203
69.56.220.30
69.57.142.126
69.57.142.159
69.57.142.41
69.60.110.41
69.60.160.133
69.7.164.162
69.7.164.171
69.93.219.186
69.93.219.189
69.93.51.181
70.85.161.7
81.88.35.41
81.88.35.42
82.165.203.135
84.22.162.58
.adelaideinstitute.org
.air-photo.com
.americannaziparty.com
.americanskinheads.com
.amren.com
.anu.org
.appd.de
.aufmarsch.de
.bahb.net
.bhsweden.tsx.org
.blacksandjews.com
.bloodandhonour.com
.bnp.net
.brainwashstudios.com
.buendnis-rechts.de
.bulldog88.tsx.org
.burks.de
.campaign.davidduke.com
.churchofsatan.org
.civil-liberties.com
.civilwartwo.com
.club3k.at
.codoh.com
.cofcc.org
.creator.org
.crusader.net
.dailyrotten.com
.deutsches-rechtsbuero.de
.deutsches-reich.de
.duke.org
.dumponyou.com
.fn.md.webjump.com
.fpp.co.uk
.frank-rennicke.de
.freedomsite.org
.freikorps.com
.freimaurer.org
.hammerskins.com
.hanse-records.de
.happytreefriends.com
.heimatkunde.tsx.org
.heimattreue-jugend.de
.hoffman-info.com
.ihr.org
.internationalknights.de
.jdo.org
.jeffsarchive.com
.johnsack.com
.jsvp.ch
.k-k-k.com
.kamellia.com
.kingidentity.com
.kkk.com
.kkkk.net
.kriegsfront.tsx.org
.kukluxklan.net
.kukluxklan.org
.kulmbacher.freeservers.com
.kulturkammer.de
.lewr.net
.lewr.org
.louisbeam.com
.mankind.org
.melvig.org
.micetrap.net
.midgaard.org
.mjt.nysv.org
.musicalterrorists.com
.n-a-f.com
.naawp.com
.natall.com
.natfront.com
.natvan.com
.nazi.org
.neworderknights.org
.niggerjoke.com
.nit.de
.nizkor.org
.nordfront.de.cx
.nordland.net
.nordzeit.de
.normanfinkelstein.com
.npd.net
.oikrach.com
.ourhero.com
.pathcom.com
.propatria.org
.puresatan.com
.radioislam.net
.rahowa.com
.redwatch.co.uk
.redwatch.net
.redwatch.org.uk
.resist.com
.resistance.com
.revisionism.com
.rotten.com
.rudolf-hess.org
.ruetli1291.ch
.schweizer-demokraten.ch
.scripturesforamerica.org
.seek2.com
.siegener-baerensturm.de
.signal-online.de
.site88.8m.com
.skinheadxx.tsx.org
.stickdeath.com
.stormfront.org
.svp.ch
.theanonymousemail.com
.thisisarandomentrythatdoesnotexist.com
.thulenet.com
.thulepublications.com
.tt-v.de
.ukar.org
.unitedstrike.com
.vanguardnewsnetwork.com
.vho.org
.wakeupordie.com
.wckkkk.com
.wcotc.com
.whemporium.com
.whitepride.net
.whiteracist.com
.whitesingles.com
.whiteunitypress.com
.widerstand.com
.wno.org
.wolfsrudel.org
.wotansdungeon.tsx.org

abraço

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,3k
    • Posts
      652,5k
×
×
  • Criar Novo...