sábado, novembro 20, 2010

vsftp , remote access

I had to configure this so that a client could test an app.  I confess that ftp is not on my expertise list, and is also part of my 'insecure paranoia' list... but knowing of no better solution for the problem @hands..  you stick with the best you got. If you're going for long term use... I'd sugest searching google for a way to keep your server running on sftp..  a reminder that ... encryption is still the best vaccine we got against web disease... =P

steps are
1) configure to allow virtual users && allow remote acess
2) gen users auth
3) configure your router to allow connection to the machine where vsftp is running

1) sample /etc/vsftpd/vsftpd-virtual.conf
 # disables anonymous FTP
anonymous_enable=NO
# enables non-anonymous FTP
local_enable=YES
# activates virtual users
guest_enable=YES
# virtual users to use local privs, not anon privs
virtual_use_local_privs=YES
# enables uploads and new directories
write_enable=YES
# the PAM file used by authentication of virtual uses
pam_service_name=vsftpd-virtual
# in conjunction with 'local_root',
# specifies a home directory for each virtual user
user_sub_token=$USER
local_root=/var/www/$USER #CHANGE THIS TO YOUR DESIRED FOLDER
# the virtual user is restricted to the virtual FTP area
chroot_local_user=YES
# hides the FTP server user IDs and just display "ftp" in directory listings
hide_ids=YES
# runs vsftpd in standalone mode
listen=YES
# listens on this port for incoming FTP connections
listen_port=60021
# the minimum port to allocate for PASV style data connections
pasv_min_port=62222
# the maximum port to allocate for PASV style data connections
pasv_max_port=63333
# controls whether PORT style data connections use port 20 (ftp-data)
connect_from_port_20=YES
# the umask for file creation
local_umask=022

#log
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES



#remote client
pasv_enable=yes
pasv_address=YOUR_NETWORK_PUBLIC_ADDRESS
pasv_min_port=65000

2) create a text file containing your users and their passwords 
ex 
 user1
 user1pwd
 user2
 user2pwd


generate the db file that vsftp will use , your comand may be something like db4.8_load depending on what version you got installed

user@host#  db_load -T -t hash -f logins.txt /etc/vsftpd/virtual-users.db
remove your logins.txt file it is no longer needed 

start your server 
sudo /usr/sbin/vsftpd /etc/vsftpd/vsftpd-virtual.conf 



3) Configure your router 

 http://www.dslreports.com/forum/r4733382-HOW-TO-vsftpd-linux-and-linksys-router


HOW TO: vsftpd, linux and linksys router

Recently I've got vsftpd running from behind my BEFSX41 both in PORT and PASV modes so I thought that I share my set-up since FTP servers are quite a hot topic here ;)

My config:
BEFSX41 1.43.4 (any BEFSx should be OK)
vsftpd 1.1.1 (1.1.0 and up supports PASV from behind NAT, get it here: vsftpd.beasts.org )
RedHat 7.3 (any linux should be fine)

Router set-up:
Forward port 21 TCP on UPnP Forwarding page
Forward ports 65000~65534 TCP on Port Range Forwarding Page (any range, it's up to you)

vsftpd.conf set-up:
pasv_enable=YES
pasv_min_port=65000 (same range as on router)
pasv_max_port=65534
pasv_address=100.100.100.100 (here comes your WAN IP)
...all other variables are set to default values

And since I have dynamic WAN IP from my ISP here's a little script running from cron to update vsftpd.conf with current IP (I use free dynamic DNS service www.dynu.com )
code:
#!/bin/sh
#vsftpd.conf IP update by Brano See Profile
vsftpd_conf=/etc/vsftpd.conf
vsftpd_log=/var/log/vsftpd.log
#change to your domain name in next line
my_ip=`host your_host.dynu.com | cut -f4 -d" "`
vsftpd_ip=`grep pasv_address $vsftpd_conf | cut -f2 -d=`

if [ "$my_ip" != "$vsftpd_ip" ] ; then
   ( echo ",s/$vsftpd_ip/$my_ip/g" && echo w ) | ed - $vsftpd_conf
   echo `date` "$vsftpd_conf updated with $my_ip IP address" >> $vsftpd_log
fi

...hope this helps to somebody :)

My special thanks to Bill_MI See Profile


happy sharing

quarta-feira, outubro 14, 2009

politiquices

Acabo de ler este e-mail.


Caros colegas:

Nós, membros discentes da Comissão Pedagógica do DEETC, informamos-vos da nossa demissão colectiva. Passados quase dois anos desde a nossa eleição em Dezembro de 2007, tivemos de encarar o facto de que não existem condições nem estabilidade para que possamos defender os vossos interesses, motivo principal da nossa candidatura.

Ao longo do nosso mandato o departamento dificultou o cumprimento das nossas tarefas, ao ponto de nos deixar numa posição anímica. Dessas tarefas, destacamos a elaboração dos horários.

No seu artigo 33º, os (antigos) estatutos do ISEL conferem ao Conselho Pedagógico a competência para a elaboração dos horários de funcionamento das turmas, tarefa que é delegada nas Comissões Pedagógicas de cada departamento. No DEETC é adoptada, de acordo com o artigo 13º do seu regulamento, uma colaboração com a Comissão Executiva, que tem a seguinte forma (sendo a que faz mais sentido, mas podendo ser outra): apresentamos à Comissão Científica o número de turmas a vigorar no semestre e, com base nesse documento, a Comissão Científica elabora e entrega-nos a distribuição do serviço docente (de acordo com o artigo 9º na secção 4 do regulamento do DEETC). A distribuição de serviço docente não é absoluta nem inquestionável, sendo nossa responsabilidade interceder em nome dos alunos quando o consideramos pertinente. Uma competência da Comissão Pedagógica é, aliás, fechar ou abrir turmas conforme a proporção de alunos face aos docentes destacados.

Nos últimos três semestres tem-se verificado um atraso na entrega da distribuição de serviço docente, não sendo respeitado o prazo que a Comissão Pedagógica indica como razoável para que o trabalho subsequente possa ser realizado sem pôr em causa o início das aulas. Como consequência, trabalhamos dia e noite para que o atraso do início das aulas não seja ainda mais grave, muitas vezes à custa de deixarmos por resolver certos problemas patentes nos horários. Há um ano, o início atempado das aulas só foi assegurado porque alguns membros da Comissão abdicaram das suas férias para durante o mês de Agosto construírem os horários. No semestre corrente, a distribuição de serviço docente foi-nos entregue, incompleta e insuficiente, no final de Julho, tornando-se frutífera apenas na segunda semana de Setembro e por fim completa já depois do início das aulas. Estes sucessivos atrasos mostram uma despreocupação em relação ao bom funcionamento do departamento e um desrespeito pelo nosso trabalho/responsabilidades, estando subjacente a ideia de que "depois a Comissão Pedagógica desenrasca".

O departamento crê que os horários são fáceis de elaborar, esquecendo-se que estamos perante cinco cursos, transversais entre si, onde uma UC de 3º semestre pode interferir com uma UC de mestrado num outro curso. Esta dificuldade natural é ainda agravada pela mancha de inconveniência de cada docente. A "mancha de inconveniência" (que pode ser consultada juntamente com o horário do docente) é uma cortesia que estendemos aos nossos docentes e que tentamos respeitar. Durante o nosso mandato tentámos minimizar a sua utilização abusiva, já verificada em mandatos anteriores. Apesar disso, estas "manchas" complicam em muito a elaboração de horários, especialmente por serem interpretadas por parte de muitos docentes como uma obrigação que temos de cumprir ou pelo menos negociar.

Não obstante a estas dificuldades e independentemente de quando nos é entregue a distribuição de serviço docente, o departamento entende que temos sempre tempo suficiente para os fazer, seja esse período de apenas duas semanas (no caso do semestre corrente) ou uma (no caso do semestre passado). Estas são semanas de trabalho intensivo acrescentado às 5 UC que temos de fazer por semestre e cuja única regalia é o acesso à época especial de exames. Já nos foi dito que consideramos aquelas 1 ou 2 semanas curtas porque temos excesso de zelo em relação aos horários. Não se trata de excesso de zelo mas do cumprimento das nossas responsabilidades para convosco, tentando aplicar critérios de utilidade calculada na elaboração dos horários (por exemplo, aulas da mesma UC não serem agendadas para dias consecutivos). Além disso, durante este período já de si reduzido, ainda temos de lidar com os problemas da distribuição de serviço docente já referidos.

Além dos horários, ficamos muitas vezes reduzidos a trabalho administrativo (por falta de meios), que nos afasta do mais relevante: a componente pedagógica. Por outro lado, o departamento não assume uma posição coesa perante o ISEL, deixando transparecer ideias como a presente no cartaz afixado à porta do departamento até 30 de Setembro. Apesar de tudo, tentámos sempre defender os interesses dos alunos e estamos convictos que fizemos sempre o melhor trabalho possível face às condições existentes. Relembramos, por exemplo, que até ao início do nosso mandato as datas nos calendários de testes eram extremamente instáveis e as sobreposições entre UCO eram feitas sem critério.

Atendendo ao exposto e a tudo o que ficou por relatar, decidimos renunciar ao nosso mandato. Apesar disso, a elaboração de mapas de testes e exames para o presente semestre – trabalho mais relevante a ser realizado – não está comprometida.

Esperamos que compreendam,

Os alunos membros da Comissão Pedagógica do DEETC:

Luís Gonçalves

João Neto

Carlos Vicente

Eduardo Loureiro

Duarte Nunes

João Antunes

#################################

Quem frequenta o ISEL sabe da vergonha que foi o inicio do periodo lectivo este semestre. A actual comissão pedagogica já não via as boas graças dos discentes desde pelo menos ultimo o semestre de verão. Caindo a principal critica na elaboração dos horarios que matavam a habitual facilidade com que se intercalavam cadeiras, abdicando da regra: cadeiras do mesmo semestre sao sempre de manha, ou sempre há tarde. Culminou este semestre com o atraso da entrega dos horarios, que por sua vez atrasou o inicio das aulas. Deu direito a montanhas de papel a correr em requerimentos ao concelho directivo, à causa de atrasos nas inscriçoes que levaram a multas... (muitas pessoas estao limitadas aos horarios para escolher as cadeiras que vao frequentar). Se a má disposição se visse o ISEL teria estado sob tempestade com direito a trovoes e raios fulminantes.

Como eu gostava de ser mosquinha e saber o que realmente se passou. É que nestas coisas.. da politiquice.. é sempre dificil uma pessoa ter a real noção dos factos. O subalterno aponta o dedo a quem dá a cara, que neste caso é comissão pedagógica. Interface entre docentes e alunos.... Como em todas as interfaces, só vemos o que é publico e o lado dos docentes não é nada publico. Lá estão eles nos seus gabinetes, e comunicação é com o CD ou com a CP. Não há ligação (publica)aos discentes.

Na realidade tanto alvoroço, vem de uma raiz comum: O abanar de direitos adquiridos. Por um lado dos alunos que gosavam da conveniencia da não sobreposiçao de cadeiras de semestres consecutivos. (com a regra da manha tarde, acrescida de outra que obriga a que se um semestre é de manha o seu consecutivo é à tarde) Por um lado dos docentes, com a sua mancha de inconveniencia.. e o habitual atraso na entrega, que não é dos docentes.. é do povo portugues que tem fama de ser calão à nascença. Estranha-me francamente, a fazer uma graçola de baixo nivel, que ainda ninguem se tenha lembrado de testar o genoma tuga, á procura do gene...

Eu continuo a dizer que do ponto de vista estatistico as pessoas fazem sempre aquilo que podem. Há sempre um esperto que encontra um buraquinho onde se enfiar e estragar tudo.

Como eu gosto de ser programadora... e de saber onde andam as minhas variaveis, o que fazem as minhas funções, de ter tratamento de excepções...

É que a agravar a coisa a comissão pedagógica é constituida por alguns dos alunos mais brilhantes que já passaram no ISEL. Brilhantes do ponto de vista académico pois claro.

Não sei que ligações teem com o “poder instituido”. A minha teoria perante o actual cenário é esta: a inexistencia destas ligações. É que neste dança dança de: o que é que tu podes sem que me pises os calos, conta muito o parlare, a influencia, o conhecimento profundo das regras do jogo e em ultima instancia o “descaramento”. Que é o tipo ter vontade, ter confiança que pode o que tem vontade... e ter jogo de cintura para o fazer, de preferencia, como dizia o patrão hoje na reunião “resolvendo o conflito sem confronto”.

Conclusão: O que é que correu mal aqui? Foi falta de politiquice?

É provavel que esta carta venha a ter consequencias nefastas. É que levar isto a hasta publica, vai levantar muita poeira. Faz-nos falta um mediador... eu não gosto deles.. geralmente são tipos com excesso de auto-confiança, bom português, pouca competencia em todas as outras areas e que só encontram expressão nestes bicos de obra, nas orlas da massa, entre o fogo e a chama.... Ter de suportar a sua presença é um sapo daqueles... verdes e gordos como as vacas de quinta.

Muitos sapos tem uma pessoa de engolir nesta vida... mas ás vezes é melhor engoli-los. Se os deixamos á solta os gajos fazem um cagaçal que se ouve daqui a Orion.

terça-feira, outubro 13, 2009

Estava a tentar adormecer e a pensar no codigo do post anterior.. e acabo de reparar que é ineficiente! No limite desperdicará sempre memoria, porque se compromete a conhecer á cabeça a dimensão dos arrays que vai alocar.

A solução elegante seria a inexistencia à priori do chunk de memoria que guarda os arrays e alocar a pedido um chunk para cada nova source, fazendo uma copia desta lá para dentro.

É irritante continuarem a escapar-me estes detalhes.
complicometro.

Problema:
Alocar um array de arrays de chars.

Desde que fiz picc à trinta milenios que sonho com escrever este código.

tudo é simplificado por ter uma funçao que recebe um ponteiro para um array de ponteiros de char , um ponteiro para um chunk de memoria onde estou a escrever o conteudo do array, e um ponteiro para o conteudo.

posto isto sempre que me apetecer escrever qualquer coisa para lá posso simplesmente:
char ** myArray = malloc(sizeof(char**)* MyArrLength);
char *myChunk = malloc(MAX_STRLEN * nElems);

addStringToArray(&myArray, &myChunk, "uma string completamente ao acaso"); addStringToArray(&myArray, &myChunk, "ai que contentamento!!");

printf("%s", *(myArray+1));

vai expor na consola "ai que contentamento!!"


void addStringToArray(char*** arrP, char** chunk, char * source){
char ** i = *arrP;
char * dst = *chunk;
*dst='\0';
mystrcat(dst,source); //copiar para o chunk
*i=dst; //guardar o endereço de inicio desta string
//acertar o i
*arrP=i;
//avançar esse pointer
++(*arrP);
//acertar o p
*chunk = dst + strlen(source)+1;//+1 pk queremos guardar o '\0'
}


Enfim... divirto-me com estas coisas. =)

quarta-feira, setembro 30, 2009

cvs? svn?

Algo com que qualquer tipo que tenha uma distribuição de linux e que goste de brincar com ela já ouviu falar são estas duas coisas CVS e SVN.

Pelo menos tem o tal tipo a ideia de que são coisas que permitem organizar o desenvolvimento de software. Provavelmente até fez copy paste de algum comando que lhe descarregou a source para o disco.

Bom o que são? CVS significa Current Version System e é um sistema de controle de versões. Na pratica aquilo que permite é:
# Manter um repositório centralizado com o código
# Desenvolvimento em paralelo (se dois ou mais indivíduos estão a trabalhar sobre o mesmo código, quando um deles dá ordem de atualização (commit ou update) o cvs sabe verificar que ficheiros foram modificados e quando, permitindo por isso alertar o developer que ele está a submeter uma versão modificada de determinado ficheiro que já foi atualizado depois de ele o ter descarregado do servidor) Melhor, até há uns brinquedos que se poe por cima e que fazem o diff dos ficheiros permitindo ver lado a lado uma versão e a outra e fazer merge das duas.
# Um registo sem perdas de cada uma das versões do código
... etc

SVN significa subversion, e é uma evolução do CVS. Não me vou alongar nas diferenças porque confesso que nunca usei. O leitor curioso pode encontrar informação na infame Wild Wild Web. Se tiver tempo e paciencia até recomendo que o faça, porque o cvs está a "morrer" em detrimento de outras soluções. Este artigo refere ainda e dá destaque ao cvs porque é o mais simples, pretendendo apenas servir projectos de pequena dimensão e ser fácil de usar.

Este post vem a propósito do espanto que sinto por nunca ter usado isto para os trabalhos da faculdade. Especialmente agora que trabalho.... a maior parte do tempo não estou com os colegas de grupo.

A coisa da troca de ideias é muito porreira, mas chega a um ponto em que um tipo tem de ser capaz de trocar ideias, definir um plano e a partir dali evoluir em paralelo esse é o desempenho óptimo.O desempenho óptimo é sempre o objectivo de um engenheiro [coff por inferência do futuro engenheiro também] note-se: se este não tiver um comercial ás costas.


Fica a ideia dada. É muito simples de instalar e usar.

SERVER SIDE:
http://www.linux.ie/articles/tutorials/cvs.php

CLIENTES:
windows:
tortoise O interface é muito intuitivo e agradável
linux:
a propria linha de comandos para os amantes da consola
tkcvs está disponivel como pacote para o fedora. Será bom de verificar se não existirá também um para o vosso sabor preferido de linux.
cervisia provavelmente o ui mais divulgado. Eu não aprecio particularmente.

and that's all folks
Happy Coddings ;)

terça-feira, setembro 22, 2009


What a ride.. life is.

I believe somehow if neurons are the hardware of my ethereal existence, my designer implanted a pattern module with it. Like a CPU cache it decodes the virtual address of a situation and looks for a hit. I guess today I got a cache-miss.

I've been trying to survive the conclusion that people do what do, just because they can. It's not they're error. It's mine - Because I allow it.

Life is like chess. Every time you make a move and leave a major peace unguarded, sooner or latter it will perish un-reclaimed.

Don't know if I can really explain it. It's a matter of goal, every person has a goal. It may be financial recognition, knowledge, pure procrastination... but it has a goal. And it acts towards that goal, it ponders the variables around it, and it pursues it like a hunter and like a general hunter it uses what ever weapons it's got intelligence, strength, camouflage...

The problem you see.. is to identify what kind of a hunter you got near you. Because sometimes, while you are distracted, the hunter may hunt you. It's not that it wants to harm you personally, it just happens that you are in the way of it's goal. Like in chess, not every move is a direct move. I may be just diverging...

misdirection...

I demand so much of my self... maybe sometimes I demand to much of the people around me. I expect them to be as honest, as straight forward, as clear, as humanly just as I want to be. But I forget that's part of my goal... it's mine and it's not my task to convert people to the idea that you're not supposed to give because of what you get return, and you are not supposed to expect to be given because of what you give, you're not supposed to ask for recognition! It would only work if it where the goal of both sides.

I guess business relationships are not so different from human relationships after all. Maybe it's because they are still relationships between people.

So I'm computing the variables.... like a weighted graph... Sometimes ethics gets in the way... Maybe It's time to let my self go of the weight of preaching righteousness. I'm not a saint and that's not my goal.



My goal...

terça-feira, julho 14, 2009

um apontamento

Estou chateada porque 90% do semestre não dormi mais de 7 horas por noite. Esforcei-me que nem uma louca por garantir os prazos no trabalho e no ISEL e neste ultimo mês tudo descambou! Um dos colegas de grupo teve de assumir um segundo trabalho, além do isel e o outro.. enfim.. não teve resistencia, teve problemas, não consegui perceber. Pensei que eramos amigos... Não sei, não percebi, não importa para o caso. As ultimas duas partes de um tal trabalho de uma tal cadeira... fui eu que fiz à volta de 80% e claro que a fazer por tres pessoas, não tive tempo para fazer nada de jeito! Faltam terminar ou fazer por completo mais 3,5.

Estou chateada porque detesto a filosofia da microsoft. Abomino tecnologias microsoft, seja do ponto de vista dos sistemas operativos (mais a sua: do all, for everything, with backwards compatibility and always our way without any respect for standards we don't write), seja do ponto de vista das outras coisas que fazem para por a correr lá em cima.... a sua .Net que nos obrigam a aprender... enfim... ao nivel dos 8bytes!

Estou chateada porque não encontro documentação de jeito. Porque os livros da bibliografia são estupidamente superfulos e NÃO cobrem aquilo que sai nos exames. Alguém me diga onde é que está no "papel" a descrição do funcionamento do viewsate em ASP. E por amor da santa, não é ao nível do é a coisa que mantem o estado, é encriptado quando é enviado para o cliente, pode ser enabled ou disabled, na página ou componente a componente... Eu queria era saber porque é que tenho de criar componentes, quando faço adição dinamica para o ASP adivinhar que é para preencher nestes a mesma informação que eu enviei e que está guardada no tal mistério do viewstate. (Eu sei que eles não existem, mas porque é que ele vai assumir que são os que criei agora? o que é que faz se eles não lá estiverem? descarta? como é que ele os procura? quando é que os procura? Faz comparação por tipo? ) É que a coisa que melhor encontramos sobre isso era um artigo da msdn de um gajo qualquer que pelos vistos ajudou a escrever o código da coisa e mesmo esse era relativamente superfulo.... dizia que era assim, mas não explicava porque, nem como era feito. Há ali uma mancha negra, entre receber o pedido com a string encriptada e a transformação disso na tal coleção de pares chave valor, que deve estar no cofre dos grandes segredos, ou nalguma veia rasgada no cerebro de alguem.

O viewState é um nó na garganta a juntar a não sei quantos... e depois vamos para as aulas e dizem-nos para fazer disassembly. Mas como é que é suposto eu gostar de uma plataforma que me obriga a ler o ASSEMBLY para a compreender. Se trabalhar com isso todos os dias durante não sei quantos anos sou capaz de o tolerar, mas do ponto de vista académico? a fazer 5 cadeiras? a trabalhar? Eu não pedia mais nada que era bibliografia de jeito, documentação de jeito. As aulas foram fantásticas, exemplos para tudo... mas.. perdoem-me se sou humana e retenho aproximadamente 10% da nova informação que me é facultada. Sim.. é capaz de estar no msdn.... é a mesma coisa que dizer que a terra também faz parte do universo. No meio de tanto calhau, onde está este? É para aprendermos a pesquisar?

Lá uma coisa é certa, saimos dali preparados para o pior que pode haver. Coisas mal documentadas (descrições estupidamente sucintas... para não falar nas vezes que o msdn têm codigo com erros!!! ás vezes de compilação inclusivé que se veem à distancia, nem é coisa que pudesse ser distração), constantemente em mutação, pacotes gigantes de alterações de umas versões para as outras, com bugs... a unica razão racional que encontro para ser tão amplamente usado é o facto de ser windows, o que quer dizer quer toda a gente usa, toda a gente tem um primo que diz que sabe mexer.

Francamente. Se for eu a vetar a tecnologia para determinado projecto.Net só se não tiver volta a dar. O php dá mais trabalho? Pelo menos não manda a página toda de volta ao servidor de cada vez que o user dá um peido. [os belos componentes da microsoft... o calendario por exemplo... cada vez que o user manda mudar o mes vai e volta A página toda! Se tiver 10000 pessoas a mudar o mes sao 10000 pedidos. O programadorzeco vai-se preocupar com isso? ele está à espera que o .net seja um espectáculo... aquilo até é tão bom... foi o que aprendeu na escola... arrasta a caixinha pois claro.] O php serve perfeitamente para 90% das aplições... as pequenas, a página da tia que tem a loja de flores sem compras online, a página do tio que está a compor uma base de dados sobre derrames cerebrais ás terças feiras, a gestão do canal coorporativo na intranet.Aii que horror!!! O php é inseguro... É assim assim. Para o resto ainda há as JSP antes de haver .net. E do ponto de vista didatico até está bem "mais próximo do HTTP" que o ASP.NET que lhe poe tanta porra em cima, que eu bem vi os colegas que cairam ali sem saber nada, sairem dali sem saber nada na mesma... depois chumbam... pois claro que chumbam... desgraçados mal tiveram tempo de aprender que raio era uma arquitectura cliente servidor, o que é um pedido http... quanto mais, explorar as não sei quantas classes e interfaces envolvidas NUM PEDIDO. Sim porque.. Não bastando tudo o que está para trás a fazer wrap a estes conceitos, o HTTPContext, O HTTPRequest, HTTPAplication... o desgraçado ainda tem de saber tudo até ao Controlo, Page, webControl, userControl, serverControl... E convem distinguir entre eles... porque.. enfim.. dizer que se usou este ou aquele só porque sim.. é capaz de cair mal. ([string sarcasmo]) E nem vou falar dos eventos que isso é outro nó. arff... Ahh façam debug, passinho a passinho... isto é facil.... e tempo? é para fazer PI só num semestre? entao mas... não estao previstas 5 cadeiras?

Francamente.. ás vezes apetece-me deixar de me importar com as notas. Olho para a pauta... penso no tempo em que lá estou.. .e... só me apetece dizer. Que se f*** a hipotese de fazer mestrado. Quero é sair dali o quanto antes!

Para que? Já não sei se acredito neste modelo de certifação.

Eu vejo o código que me cai nas mãos ás vezes... jogo as mãos à cabeça e penso: Mas esta gente fez uma licenciatura? Não é possível! Devem ter sido dos tais panhonhas que ficam ali a recitar as merdas, empinam aquilo tudo ... depois fazem cadeiras e se for preciso com boas notas que os exames nao diferem assim tanto entre si... E eu ali ando.. feita parva a indagar...

Para quê?

Estou triste. Estou mesmo triste.

quinta-feira, junho 04, 2009

Não ao ECPDESP

Há muito que este blog está parado.

Creio que deva iniciar este post por dizer que detesto politica. Ainda não sou mas quero ser engenheira. Há um aspecto na engenharia que me fascina particularmente: A linha ténue onde esta se cruza com a arte, por procurar incessantemente soluções pragmáticas e eficientes impossíveis de alcansar sem criatividade. A politica por outro lado, procura soluções aprazíveis.


aprazível

Que apraz; agradável.

A palavra per si é ingrata em ilustrar o sentido da anterior premissa uma vez que esconde outra: subjectividade. Este é o cerne. Aprazível para quem?


A politica é a arte da laranja espanhola. Ali está ela, lado a lado com a Algarvia, reluzente e pomposa. O freguês compra a olho mas ao chegar a casa, a casca esconde um fruto deslavado e sem sabor.


Parece que cada vez mais se segue por um caminho de “vê de longe” e compra a impulso. O comentário é para o critério de curriculo a peso que se quer impor pelo ECPDESP.


Espanta-me que seja assunto para escapar à atenção dos alunos. (do ISEL eramos dois na manifestação hoje).


Silenciar o descontentamento é dizer sim ao desprestigio da instituição que nos certifica, é dizer sim à percariedade no trabalho das PESSOAS que nos ensinam, é deixar lesar o nosso futuro!


Não é muito difícil de demonstrar as consequencias práticas:

Prof = t_aulas + t_investigação + t_formação


o estatuto impõe que:

t_investigação + t_formação aumente! Vamos chamar a esse aumento alfa

Prof = t_aulas + (t_investigação + t_formação + alfa)


Esta equação NÃO tem significado no conjunto dos Reais a menos que alfa seja um imaginário puro!

Se Prof é o mesmo t_aulas tem de diminuir e diminuirá tanto quanto a relevância de alfa, que pelos critérios apresentados é virtualmente absoluta. quod erat demonstrandum


Algebra elementar....

terça-feira, dezembro 30, 2008

vacations

Finally vacations!

I've finally convinced mamy to use the internet. Well, with the promise of a fully configured system, so she only needs to push a button and all happens for her. I've chosen Linux because it's so easily customizable and can be administrated by command line remotely. So there will be some sort of ddns.


I've welded a hub on the last working usb on the laptop. ahahaha Damn that was a stupid idea lol (mean replacing the usbs it came with.. just because they were loosing contact). Furthermore I've acknowledged that a usb hub won't work when connected to a usb extension. That seemed kinda strange, since after all it's suppose to work as any other usb terminal. -_- All connectors where ok except for the drain, there was NO drain! And I guess that's enough to ruin everything.

Another interesting thing was finally making my ethernet port work. Stupid hardware as some kind of flaw that won't handle

auto-negotiation

I've began debug by trying a
watch 'cat /var/log/messages | tail'

and noticed the eth0 device was goind down after the negotiation so I googled this... and finally came in to a blog that posted a configuration to disable auto-negotiation you can use ethtool to do it.

I choose full duplex since I wanted both the machines to talk, and choose the same speed as the other ethernet device. (this is important!)

#ethtool -s eth0 duplex full speed 10 autoneg off

run:
#ethtool ethX

To view device info.

I can't wait to see the green light on that ADSL Modem!!! =))))))))) weeeeeeeee

I missed this... mean.. just fooling arround with things. god how much fun! can you see me bouncing arround? I'm bouncing arround!!... now you handle thouse interrupts to give me some time to be a stable signal. ahahha god ain't drinking no more today.

HAPPY NEW YEAR everyone ;)

terça-feira, novembro 04, 2008

rewind and fastforward

Long time since I posted in this blog. Working & studding is harder than I ever imagined and what I miss the most is time to play around like I used to. Routines settle in... A must do is to know what is going on. So on most mornings and some afternoons and nights like right now. There are a certain number of "must open tabs", made easily accessible by a favourites folder called morning on firefox, (OsNews, SlashDot && publico) swimming on my desktop.

On these last few months I've read more man pages, apis, documentation than in the rest of my life all put together. There are number of things that I am specially excited about like php which has not ceased to surprise me in capacity and flexibility. For instance I was wondering how was I going to make this new app we're developing module customizable, by text file. And I reached the conclusion that it would be most pleasent If I could allocate variables, based on that text file. This seams rather simple. Though it may become a headacke to think of the code with a bunch of ifs and elses, or even on a C style of thinking with IFDEF. The intuitive thing would be like

$var = 'myvarname';
$$var = 'myvarname_value';

this is the same as
myvarname = myvarname_value;

I thought this would be impossible. For my narrow mind limited the idea of a variable as memory space, and thought of running code as compiled code, and therefore....
mov 0x50, #50 kind of thing.

well details.. they are so many.. and my time is rather sparse so I'll get to why I decided to write this post.

Slashdot mentioned an article published on arxiv 'bout steganography. This is a new consept for me. When one ponders on the security of information on the web, one thinks: cryptography. One thinks of dissimulating the message, but one does not think of making the message "disappear". In essence: to think of a way to send the message in such a way that the only the sender and the receiver are capable of recognizing that there is a message going through the channel.

I thought this idea was delightful. If you do too, sharp your eyes and open your mind. The article link is just bellow. ;)

A pleasant night to you reader.


"This work investigates a central problem in steganography, that is: How much data can safely be hidden without being detected? To answer this question, a formal definition of steganographic capacity is presented. Once this has been defined, a general formula for the capacity is developed. The formula is applicable to a very broad spectrum of channels due to the use of an information-spectrum approach. This approach allows for the analysis of arbitrary steganalyzers as well as non-stationary, non-ergodic encoder and attack channels.
After the general formula is presented, various simplifications are applied to gain insight into example hiding and detection methodologies. Finally, the context and applications of the work are summarized in a general discussion. "
REF: arXiv:0810.4171v1

terça-feira, agosto 12, 2008

the easy road to heaven is hell

I have installed a new linux distro on my laptop. A friend told me about linux mint and when I saw it my eye balls where falling on to screen. I so wanted it!! It promised to be light and It came with a pretty gnome, a packet manager (synaptic) and of course it replaced


mount -t vfat /dev/sda1 /mnt/usb

konqueror /mnt/usb


by a confortable click on media:/


it recognized my graphics board, my sound card, my weird keyboard keys. It allowed me to install php5, mysql , and of course apache with a bunch of clicks. It let me sudo ifconfig without editing the sudoers file. And here I was all happy with my favorite apps. Until I got sick of the looks and got sick of it being so slow, and jamming whenever the networkconnection was not on, because it was trying to upate my system. So I changed to XCFE.. and It got a little faster.


But here's the real surprise! Somehow I messed up my system, or got hacked or just completely forgot what root password I put in the first place. Irrelevant for the matter. So here I am scratching my head... how the hell am I gonna fix this without reinstalling the system... and all of the sudden it strikes me! I've been sudoing so much stuff can I sudo passwd root? I CAN!


sudo passwd root


just prompts my userpasswd and a new password for root after. This was, on one side of the question... most pleasent. I reset my password. On the other hand it worries me, and somehow makes me sad. Anyone with acess to my shell could change my root passwd. I?m thinking about keeping logs of all commands on all shells by all possible logged in users . A little paranoid I guess.. but hey just because you're not looking for them it does not mean they are not there. :P


The easier to use, the less boring the system... more easily hacked. So where the hell are we gonna find the balance between user friendly and cracker enemy? Is there ever gonna be such a thing? How can you tell what you are going to deny? Allow? Are we gonna tell mary the hot teenager she can't allow her computer to behave like a server on any occasion, because a server is something that provides services, and that means it gives out information to anyone that asks it, even if it is only a request for authentication. By Saying no, it says go another way. But saying not this service it says try another service How are we going to tell mary what the hell a service is? can't open doors, she can't have telnet enabled, if someone is sending a lot of tcp/IP packets with sync on it it smells like port scan. How are we gonna tell mary what a port scan is? Does she care? She pushes the button and puff there's myspace, hi5, facebook. There's msn, ICQ. All sorts of blogging and posting and sharing. And mary... Mary's got fotos, texts, she's got 80% of her life on the computer. Cellphones that auto-sync with the pc, they allow you to save messages, appointments.... all so easy... all so windows... window without blinds.


I need to sleep.


gux_# shutdown -h now

quinta-feira, julho 31, 2008

Last HOPE

This is something you will want to hear . ;)

The last HOPE

"The Last HOPE is the seventh Hackers On Planet Earth conference"...

happened:
July 18 to July 20 2008.

And.... you can hear it online!! ;)))))))

hurry up and get your mouse on it!

quarta-feira, junho 11, 2008

paranoia... or not!

Well I as reading a book.. and stumbled on the picture below....

I have argued this with several people, some of them seemed resolute to convince me it could not be... or that it was strange. Well it is not strange. My experience was with winXP SP1. The minute I entered the system I was infected...


There are no completly secure systems. There are just those that still have no known vulnerabilities... it so happens that the larger the time gap between release and install. The bigger the probability that someone, somewhere has found a way to get in. And trust me... some people don't sleep just thinking of ways to get in... ways to get information, ways to destroy your machine, ways to make your life harder. why? it's a free game, that never ends.

Lesson to be taken... If your going to walk on menure... make sure to wear rubber boots.

sábado, maio 17, 2008

the "1001 reasons" why assembly rocks

muihihihii now That was funny. the "1001 reasons" why Assembly rocks. If there's an Assembly Hitler.. it's Randall Hyde!

http://burks.bton.ac.uk/burks/language/asm/artofasm/fwd/fwd.htm

Don't say assembly is bad or the man will hit you with a stick of well supported ideas.

I admit it.. I don't like it just because it's against my HLL style of direct reason and write. Matters of efficiency most times go beyond my knowledge.

I'd still say that you cannot have elite every where. simply because then you'd not have enough programmers to do all that is needed. Sometimes you need to do things that work now, not things that will work perfectly tomorrow.

As Einstein once said: "things should be made simple, but not simpler."

terça-feira, abril 22, 2008

form posts and scripts

Well well well ... all nice for get's, even authenticated gets. But how about form posts?


There's always the trouble of Referer. I guess If they want, they can shut me down by now. Damn mindless testing. I've left a trail. If they keep track of referer on requests, it's not even that uncommon, then they can get my script request -_- . I've checked it with wireshark. :S I even tried to modify it by using an XMLHTTPRequest object, but... If I had conveniently read the documentation I'd know in advance some headers can't be modified by reasons of security.... I can see why! =P


So I had to find a way to circle around it. And of course as always, I did. Lol see, the idea is that I needed on the fly modification of a form. To do that, I'd need a script to modify the source of a loaded page for me. Wow! Now that's spooky! But possible! Hihihi The name is GreaseMonkey. And there's even a hole gigantic script built for travian, called travian beyond that you can install. There are no limits to what you can do. With some trouble... the game plays it self. Of course... that takes all the fun out of it. I've proven that I can do it... now, I leave it aside and cut the too much to leave a little help only. =P


So far the application works pretty much as a human would operate on a browser, and asides from the fact that it never sleeps more than 20 minutes. It's untraceable!


The trick is the following:

The server can never know if a human or a script did it, because all it gets it's HTTP / TCP packets. If all is filled out correctly, then... bye bye intuition.


God I love machines and it's layered organization. I had never seen a breach in this model until this very moment. It's like completely separate universes communicating by laser beams. You can shake one of them, break it apart but has long has you keep the beams alive and right... no other universe knows you did.


Abstraction... abstraction...


I'm sleeping happier tonight. ;)


ohhh another curiosity. Imagine the following: some document, has anchors, and these anchors have actionscript calls for onclick. How do you make that code execute without using the mouse?


Reasoning:

Here's the function signature: function onclick(Event);


it's still a function... just another function that happens to be called when a mouseEvent occurs. Now if inside it's body it never uses the mouseEvent, can it tell whether it was called by a mouseEvent or some other thing? I have not checked.. but even if it did, I guess you could always instanciate a mouseEvent, but like this you don't even need it. Null is has valid has an object argument has any instance of an object. So if I do:

var anchors = document.getElementsByTagName("a");

for( i=0; i less Than anchors .length ; increase i )

if( anchors dot onclick diferent from null )

anchors[i] dot onclick (null) ;

I can force execution of all anchor onclicks.


Happy codings ;)

terça-feira, abril 15, 2008

flush String with source from external URL in to Java

Well a fetch source using servlets is nonsence. Servlets run on server side and generate responses to requests so... it's a bad idea to go that way.

If I somehow exported the connection problem outside of the browser window... I'd have an authentication problem. So the best way would be to run it somehow using javascript, there's a Dom object capable of doing HTTPRequests and it's called XMLHTTPRequest. There are several details to take care when using this code. One must set browser to allow connection to remote servers from client pages. So there's a cost in security to achieve this goal. Furthermore I couldn't find a way to configure firefox to lower it's security params so it won't run on it yet.

By now I'm still hocked up to the idea of an Applet to manage flow control, and other heavy weight operations, Though my initial idea of processing the source as a raw string has fallen in the pit of plain stupidity. XMLHTTPRequest returns a DOMDocument which can be manipulated with all the charms of the DOM model, and will certainly be better than any code I could write in 3 life times.

So in conclusion I guess I can sleep better tonight :P

If you're trying to do the same for some reason, the way you'd get a raw String with the source to be inputed in to Java would be to declare an Applet on the page containing the script with the XMLHTTPRequest Object so you can call functions who manipulate it from java using the netscape.javascript package. Furthermore XMLHTTPRequest contains a DOMString propertie which can be cast to String no questions asked, leaving us with a happy:

a) (String)window.call(“getSource”,null).

//- ------------------------------- JS
var client = new XMLHttpRequest();
var source;

function init()
{
if (window.xmlhttprequest) { request = new XMLHTTPrequest();}
else if (window.ActiveXObject) {
try {
request = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e){
try{
request = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e){}
}
}
}

function handler( ) {
try{
if(this.readyState == 4 && this.status == 200) {
// so far so good
if(this.responseXML != null)
{ } // success! do nothing}
else{ }
}
else if (this.readyState == 4 && this.status != 200) { // fetched the wrong page or network error...
alert("ups check your glasses, wrong URL?");
}
}catch(e){alert("error on handler" +e );}
}

function fetchSource()
{
//wait for client to be ready =P
if(client.readyState!=4) return null;
return client.responseText;
}

function fetchURL(url){
//alert("fetchy is here!! cuxi cuxi ");
try{
client.onreadystatechange = handler;
client.open("GET", url,true);
client.send();
}
catch(e){alert("error on fetchSource:" + e);}

}

// -------------------------------- APPLET CODE
public static String getURLSource(String url)
{

if(window == null){System.out.println("window is null"); return null;}

try {
window.call("fetchURL",new Object[] {url});
Thread.sleep(2000);//give the server time to respond with source
return (String)window.call("fetchSource", null);
}
catch(Exception e){
System.out.println("GET URL CRACHED!!!");
return null;
}
}

//don't forget to start window :
public void init()
{
try {
Travian.window = netscape.javascript.JSObject.getWindow(this);
Travian.location = (JSObject)Travian.window.getMember("location");
}catch(Exception e ){System.out.println("init can't start JSObject");}
}


// -----------------------------------------------------------------------
happy coddings!

segunda-feira, abril 14, 2008

Breaking my head against the Travian wall

I've been fixed on the idea of building an Admin interface for the Travian game. Though out of all my crazy ideas this must have been the one with the MOST trouble. Along with the fact that my JS /DOM was very rusty, I've encountered other difficulties... So from the beginning.

Figuring out how it works:
Travian is build on a mix of php, JS & HTML. The big issue being php, because it's executed server side! Client sends a request. Server reply s with html page. I can't read it, can't access it and the only way I could glimpse it's workarounds would be by monitoring variables being passed to it along with every different call made to the server. Now besides not being the easiest task... it never will grant that I can figure params for hidden evolutions. Because it's not a static game. So I'd only be able to implement a scalable application once I reached the end... and well the hole purpose is to build something that will help me do that. So that made me quit the hole hack trough php idea. The objective is to build an application capable of monitoring action just like any human user would do by reading the page, not modifying it.

So that takes us to the next step. Ok.. I can recognize anchors with a scanner algorithm just as easily as I can with my eyes.... so I'll just have to find a way to process the source. All joyful stupid H. wandered around the house jumping and smoking cigarrets while planning the best way to do it. What language am I using? Am I going to go object oriented and define identities so I can delegate tasks and therefore better organize the application? How about GUI? I don't feel like spending hour costuming it! Javascript? It's cool I can generate tables through DOM and it offers anchors that I can customize by just copying the URLS from the source, I don't even have to worry about logging in as long as I grant that I'm opening the admin window on the the same browser window of the game. Java? Java has a bunch of cool classes for manipulating strings, the own String class, with it's contains and substrings gymnastics and Scanner and Tokenizer. Besides a comfortable Thread manipulation and Timer's... Hum... why don't I mix it all.. I just need a bridge between Java and Javascript so I can pass information around. Well.. I found the bridge, it's a package from netscape and it comes with the plugins jar, somewhere in your JRE. There's not much to know about it, it raps the JS object on a JSObject and sends it to java, while unraping it when it's send back to javascript. Furthermore it's very intuitive, you can even cast it directly to string if it's a text object like in document.body.innerHTML. All very cozy and comfortable. I wrote a window with a bunch of frames, drawn the hole communication and generalist aspects of the application. And I thought ok... now I just need to input the source from the site. And here the trouble started!! You can very easily view any source from any URL with a simple access to: window.document.body.innerHTML but if the URL is out side your “server” then the window becomes a fucking cocoon. You can't access document.body, therefore you can't read the source no fucking way without some other workaround external to plain JS. This is very plain simple conclusion but I lost hours!!! t'ill I realized there was no possible workaround for this. I tried to workaround it in a milion ways, by testing if it had anything to do with a particular propertie, going from window, from frame, from context, getting the calls made by different window object and even tried to schedule a call to an echo function by changing window.onload = setTimeout(“alert(window.document.body.html);”,1000); to make it seem like the window which contained the external URL was asking for this, but couldn't ;P


So now basically I'm stuck at a stupid fetch sorce. I can understand that I can't write to the document. But read it... I call this stupid security! Now to something so simple I'm gonna have to just flush the source right in to Java. Using some sort of bridge to HTTP. I smell servlets. But I know nothing 'bout that.... YET!!! hihihi So...

Don't miss the next chapter 'cause I certainly won't.
God what a bad joke!! LOL
I have two tests tomorrow and an assignment presentation at 11h30 AM. Need sleep.

helga@body: shutdown -h now

domingo, abril 06, 2008

travian

Ohhh H! You're reading web page's script code again! Damn girl! Well... I just thought this was hilarious and had to share it with you. The following bit of code was taken from unx.js at http://s3.travian.pt/.

function T_Load(url,id)
{
g=false;
if(window.XMLHttpRequest)
{
g=new XMLHttpRequest();
if(g.overrideMimeType)
{
g.overrideMimeType('text/xml');
}
}
else if(window.ActiveXObject)
{
try
{
g=new ActiveXObject("Msxml2.XMLHTTP");
}
catch(e)
{
try
{
g=new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e){}
}
}
if(!g)
{
alert('Can not create XMLHTTP-instance');
return false;
}
g.onreadystatechange=function(){al(id);};
g.open('GET',url,true);
g.send(null);
};

What's so funny in it, is the use of variable g. Which starts as boolean and ends up as an object. This could only be allowed in a language like javascript. And why? Well there's no type declaration, it's optional to do that. Now just how does it reach binary? How can you tell the size? Are they all the same size like in java? Javascript wonders!

Now the reason why I'm reading this:
This travian thing, it's a game. An online, strategy game. Make a village, get an army, attack neighbors kind of thing. But it's real time, things take for ever to evolve. I'd just love to leave some actions recorded to be done in the future. I imagine this would add considerable volume of data in to the server... not to mention that it could be programed so that my soldiers would leave the village and go visit some looser player that can't possibly have an army, while bringing back some resources anytime an attack is coming in. And then again there is the incentive of the “in control” feeling. I just can't bear the infinite number of tabs open one to each field (resources, village, future victims of attacks). I want a frame that lists previous attacks with distance to my village and resources taken, I want to know how long before I have resources to evolve something, I want to be able to put on an “agenda” any build, attack, market action I feel like so I can have my life back. LOL I mean.. I got other things to do!

quarta-feira, abril 02, 2008

3 ethernet cards , 2 computers , 1 internet conection

Why I hate windows to the gut?!

Here's a simple problem. 2 computers, 3 Ethernet cards 2 ethernet cables, 1 modem => 1 ISP connection. Objective share Internet connection between two computers. Should be a simple task.

If you're looking for a solution and out of patience just press ctrl+f and type in solution: lol

Now windows was suppose to be your friend. You say: hey I would love to set up a network. This computer connects to the Internet, or this computer connects to a network that somewhere has a computer that connects to the Internet. This would be logical, I send a packet outside of my network and it should find it's way to the gateway (the gate that guards the entrance to my little world) and there it should ask who ever knows and send it to where it's meant to go.

Problems:

I shall call primary to the computer that directly connects to the Internet and secondary to the computer we want to connect to primary so it can also access the internet. It's a wired network! At the very beginning it's like having to separate pipes. One pipe goes from primary to secondary, the other pipe goes from primary to the ISP. So without some trick it's like trying to flush my toilet in some chink bathroom in the other end of the world. There is no connection! The packets can reach the gateway, but they can't get out of it because no one inside the intranet knows where to look for the address. The card from intranet does not know where the card to the Internet is. Thought our friend windows should know!

I hate windows to the gut because windows help files never tell you anything, it's like trying to learn nutrition from a recipe book. Nothing against it when it works but it makes me real mad when it doesn't, it gives me that feeling that you get when you're a little kid trying to open that new toy you got in Xmas with your nails. Someone get the kid a screwdriver!

Well the missing part of the puzzle is bridge! As the name foresees it's something that “connects” the two cards together so they can act as a single connection.

Solution:
I found this at: http://forums.techguy.org/windows-vista/579886-ics-vista-host-xp-client-4.html
posted by: vasudevan84 , I also added some comments because the post sometimes seemed confusing or I really should be sleeping by now or something ;P

okie people..
Hi Guys Try this...

First RUN services.msc on your Vista Machine.
Start Two services.
1. Internet Connection Sharing
//I had trouble here... Vista was telling me It could not enable it 'cause it was not being used
// if so come back to enable it once you've created the bridge
2. Windows Firewall.

now go to Control Panel\Network and Sharing Center\Manage Connection(Left Side Options)

u should see Two connection(i'll rename then to HOME for Local Network and INTERNET for obviously Internet Access) and probably a Bridged Network(if u made one)
1. Now Configure INTERNET(with the IP addresses (TCP/IPv4)For your Internet Access)
//It was only a while ago that I learn how to edit this so... assuming you may be in trouble too
//go to INTERNET properties and then double click on TCP/IPv4 to edit
//most ISPs will want you to get you're IP over dhcp so if in doubt set it to be automatic
2. Set HOME to Auto Config (TCP/IPv4)
3. Select the two Connection now and Right Click\Bridge Connections.
4. Open the Network Bridge options\ UNCHECK the connection INTERNET from there.
5.Make sure the (TCP/IPv4) settings in the NETWORK BRIDGE are set to Auto Config...
6.Now go back to the INTERNET\Sharing TAB\Check option Allow Other Network users to connect through this computers Internet Connection and optionally the second one.

Thats all folks we are done.
PS. Make sure the Connection on XP machine is set to Auto Config again.

This give you File sharing and Inter Connection on Both Vista and XP machine now. BUT the catch is your IP address on XP machine would be dynamic...

Okie the Point is ENABLE the two services on the VISTA machine, bridge the two connection but uncheck the Internet Connetion from the bridge and then share it.

//of course the secondary can be running any Operating System providing dhcp, if on Slackware run
//myName@host: dhclient eth0

Enjoy surfing using your brain and saving 30 euros on a hub.
Nhaaa “Buy a hub!!! buy a hub!!! It so much easier... nha nha nha.“ Ohhh god save them from their stupidity!

Well have been Grumpy lately. ;P

quarta-feira, março 19, 2008

if(true && false)

let's say that sometimes... I can't help my self when comes to pressing ctrl + U and snicking to take a look at the source code of the web page. I've seen a couple of strange things, but never something like this.

if (true && false) {
//configuration variables
hbx.acct='DM570919C1BC';//abtest account number
//segments and funnels?
hbx.seg=getViewerSegment();//visitor segmentation
hbx.hc3 = "sample_B";
"document.write('\ script language="javascript1.1" src="http://www.hi5.com/friend/js/wss/hbx.js" " <\/script>'); 've seen a couple of strange things, but never something like this.
}

now first reasoning: this is alien logics and that "if" can run on terms I cannot understand.

Second reasoning: it's a dynamically generated page (script included) and somehow variables determined that those parameters should be written separatly... so they ended up being whatever and that whatever is impossible. now this would make some sense... not all the sense because if that is the case why not use the same variables to omit the whole bit of code?


question: is there a way to record this and resend it in my terms? now to do that I'd have to make an app capable of doing my own packets, one of the problems that jumps right in to the eye and fires frustration is Referer. Even If I change the source and then try to load it, the browser will try to find the files on my computer... unless...

ohh well.. no time, no knowledge.