[sudoku]
DIY Powersupply
This power supply is easy to build and fun to make. It will have 2 meters 1 for voltage and 1 for current. They will both be DC voltmeters, for the amp meter we will use a shunt resistor.
Hereβs the part list:
Qty |
Name |
All Electronics Cat# |
Sub-total |
total |
1 |
LM317T Adjustable regulator |
LM317T |
$0.70 |
$0.70 |
1(Min qty is 10) |
270β¦ ΒΌW resistor |
291-270 |
$0.065 |
$0.65 |
1 |
5k pot |
NLTP-5K |
$0.75 |
$0.75 |
1 |
Voltage knob |
KNB-125 |
$0.50 |
$0.50 |
2 |
Spring terminals |
SWT-202 |
$0.50 |
$1 |
1 |
24VDC WALL WART |
PS-2414 |
$8.45 |
$8.45 |
1 |
Bridge Rectifier |
FWB-14 |
$0.40 |
$0.40 |
1 |
3300Β΅F Capacitor |
3300R50 |
$1.60 |
$1.60 |
1 |
1β¦ 50W Resistor |
1-50 |
$2.75 |
$2.75 |
1 |
20V Voltmeter |
PM-120 |
$15 |
$15 |
1 |
200mV Voltmeter(current) |
PM-122 |
$15 |
$15 |
2 |
+5VDC Regulator |
7805T |
$0.50 |
$1 |
1 |
Fuse holder |
FHPM-31 |
$1.25 |
$1.25 |
1 |
1A Fuse |
FS-1 |
$0.75 |
$0.75 |
|
Sub-total |
|
|
$49.80 |
|
Shipping |
|
|
$8 |
|
Total |
|
|
$57.80 |



PN Junction tester
This transistor tester tests bipolar junction transistors junctions. It tests the junctions for open and short circuits. It uses 4 resistors, 4 LEDs and 1 SPDT switch. A good transistor will only have 2 out of 4 LEDs lit, on one side of the switch and 4 on the other. You can also test standard diodes (rectifiers and switching diodes). A diode will have 3 out of 4 LEDs lit on one side and 4 on the other.

Hereβs a table of all possible readings and their meanings
|
2 LED lit |
Both emitter/collectors are short circuited |
|
3 LEDs lit |
Only one emitter/collector |
|
4 LEDs lit |
Open circuit |
|
1 LED lit |
Circuit design error |
Android Scope Probe
This useful cord can allow an Android Phone/Tablet to be used as an osciloscope. All you need is the 4-pole 3.5mm jack to 3 rca cable. The cord will need to be modified and be tested with an resistance meter, so you can figure out which wire goes where. NOTE: EVERY CORD IS DIFFERNET! Also some phones or tablets can be stuborn and only use the cord if theres a load on the left and right speaker pins. Use a 7.5 ohm resistor, wattage shouldnβt matter because headphone standard is 1 miliwatt. The schematic is below:

The only thing bad about this circuit is sometimes series resistances with the signal youβre measuring increase the division.
Links:
4-pole 3.5mm to rca(thus link has changed because All Electronics went out of stock on the other one)
Software
Youtube video(old)
Window Hacker
This program is a great tool to have. It allows you to take control of
window controls and their handles. This is like Spy++ but free. Theres
a dll that allows you to control a window from a batch file just use
rundll32 with it like
rundll32 libwndhack.dll,CloseHWND search_query
rundll32 libwndhack.dll,ShowHWND search_query
rundll32 libwndhack.dll,ClickButton search_query
rundll32 libwndhack.dll,EnableHWND search_query
rundll32 libwndhack.dll,DisableHWND search_query
The search_query is the string that will be searched for.
Hereβs a screenshot of the program:

More tools and apps avaliable at
unit wndhackUnit1;
{$RESOURCE wndhack32.res}
interface
//Main window unit
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Menus, StdCtrls, ExtCtrls,shellapi, ComCtrls, ScktComp, Spin;
type
TWNDHacker = class(TForm)
Panel1: TPanel;
Label1: TLabel;
HWNDEdit: TEdit;
Label2: TLabel;
Button1: TButton;
Label3: TLabel;
cname: TEdit;
WNDEn: TCheckBox;
WNDV: TCheckBox;
Label4: TLabel;
WNDTxt: TMemo;
MainMenu1: TMainMenu;
UpdateList1: TMenuItem;
HWNDIcon: TPaintBox;
GroupBox1: TGroupBox;
ComboBox1: TComboBox;
Label5: TLabel;
Label6: TLabel;
Edit1: TEdit;
Label7: TLabel;
Edit2: TEdit;
Button2: TButton;
CheckBox1: TCheckBox;
Button3: TButton;
Label8: TLabel;
Memo1: TMemo;
Label9: TLabel;
Edit3: TEdit;
Label10: TLabel;
Edit4: TEdit;
ListBox1: TListBox;
Label11: TLabel;
Edit5: TEdit;
Label12: TLabel;
Edit6: TEdit;
GroupBox2: TGroupBox;
Label13: TLabel;
ComboBox2: TComboBox;
CheckBox2: TCheckBox;
Button4: TButton;
Help1: TMenuItem;
AboutWindowHacker1: TMenuItem;
HWNDP: TComboBox;
ComboBox3: TComboBox;
Label14: TLabel;
Tools1: TMenuItem;
FindWindow1: TMenuItem;
FindDialog1: TFindDialog;
OpenDialog1: TOpenDialog;
MouseFollower1: TMenuItem;
Timer1: TTimer;
StatusBar1: TStatusBar;
ViewAtomTable1: TMenuItem;
PopupMenu1: TPopupMenu;
SaveIcon1: TMenuItem;
LoadIcon1: TMenuItem;
Cancel1: TMenuItem;
SaveDialog1: TSaveDialog;
RestoreWindow1: TMenuItem;
ShowWindow1: TMenuItem;
GetWindowLong1: TMenuItem;
Label15: TLabel;
SpinEdit1: TSpinEdit;
Label16: TLabel;
SpinEdit2: TSpinEdit;
Label17: TLabel;
SpinEdit3: TSpinEdit;
SpinEdit4: TSpinEdit;
Label18: TLabel;
Button5: TButton;
CheckBox3: TCheckBox;
FindWindowEx1: TMenuItem;
procedure UpdateList1Click(Sender: TObject);
procedure ListBox1Click(Sender: TObject);
procedure HWNDIconPaint(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure WNDVClick(Sender: TObject);
procedure WNDEnClick(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure Label12Click(Sender: TObject);
procedure ComboBox2Change(Sender: TObject);
procedure Label2Click(Sender: TObject);
procedure AboutWindowHacker1Click(Sender: TObject);
procedure FindDialog1Find(Sender: TObject);
procedure FindWindow1Click(Sender: TObject);
procedure MouseFollower1Click(Sender: TObject);
procedure Timer1Timer(Sender: TObject);
procedure ViewAtomTable1Click(Sender: TObject);
procedure SaveIcon1Click(Sender: TObject);
procedure HWNDIconClick(Sender: TObject);
procedure RestoreWindow1Click(Sender: TObject);
procedure LoadIcon1Click(Sender: TObject);
procedure ShowWindow1Click(Sender: TObject);
procedure GetWindowLong1Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure FindWindowEx1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
{ THWNDPPacket=record Reserved for Remote controllu
op:integer;
Handle:hwnd;
classname,windowname:array[0..255]of ansichar;
msg,startms,cms:dword;
wparam,lparam:lparam;
Return:LRESULT;
end; }
function GetConsoleWindow:hwnd;stdcall;external 'kernel32.dll';
var
WNDHacker: TWNDHacker;
hico:hicon;
nochange:boolean;
searchres,msgs,winstyles,shows,gwl:tstringlist;
childenum:tlist;
implementation
{$R *.DFM}
uses wndhackunit2;
function EnumHWND(hw:hwnd;lp:lparam):bool;stdcall;
var cname,wtxt:array[0..1024] of char;
pid:dword;
begin
getwindowtext(hw,wtxt,1025);
getclassname(hw,cname,1025);
result:=true;
GEtWindowThreadProcessId(hw,@pid);
if pid=getcurrentprocessid then exit;
wndhacker.ListBox1.Items.AddObject(StrPas(CName)+','+strpas(wtxt),TObject(hw));
wndhacker.HWNDP.Items.Add('$'+inttohex(hw,0));
if lp=0 then
enumchildwindows(hw,@enumhwnd,1);
end;
procedure TWNDHacker.UpdateList1Click(Sender: TObject);
begin
listbox1.Items.Clear;
childenum.Clear;
hwndp.Items.Clear;
listbox1.Items.AddObject('HWND_DESKTOP',TObject(getdesktopwindow));
enumwindows(@enumhwnd,0);
end;
procedure AddConsts(combo:tcombobox; slConsts:tstringlist);
var i:integer;
begin
for i:=0 to slConsts.Count-1 do
if StrToInt64Def(slconsts.values[slconsts.names[i]],-1)>-1 then
combo.Items.Add(slConsts.names[i]);
end;
procedure TWNDHacker.ListBox1Click(Sender: TObject);
var classname:array[0..255] of char;
windowtxt:pchar;
wtlen:integer;
r:trect;
dwprocess:dword;
begin
nochange:=true;
HWNDEdit.Text:='$'+IntToHex(HWnd(listbox1.items.objects[listbox1.ItemIndex]),0);
hwndp.Text:='$'+inttohex(getparent(hwnd(listbox1.items.objects[listbox1.ItemIndex])),0);
hico:=GetClassLong(hwnd(ListBox1.items.objects[listbox1.itemindex]),GCL_HICON);
if hico=0 then
hico:=GetClassLong(getparent(hwnd(listbox1.items.objects[listbox1.itemindex])),
gcl_hicon);
if hico=0then hico:=loadicon(0,IDI_APPLICATION);
drawicon(hwndicon.canvas.handle,0,0,hico);
edit5.Text:='$'+inttohex(globalfindatom(classname),4);
edit3.Text:=inttostr(GetWindowThreadProcessID(strtoint(hwndedit.text),
@dwprocess));
edit4.Text:=inttostr(dwprocess);
edit6.Text:=IntTohex(getwindowlong(strtoint(hwndedit.text),gwl_style),8)+'-'+
inttohex(getwindowlong(strtoint(hwndedit.text),gwl_exstyle),8);
getclassname(hwnd(listbox1.items.objects[listbox1.itemindex]),classname,256);
cname.Text:=strpas(classname);
Wtlen:=GetWindowTextLength(hwnd(listbox1.items.objects[listbox1.itemindex]))+1;
windowtxt:=stralloc(wtlen);
GetWindowText(hwnd(listbox1.items.objects[listbox1.itemindex]),windowtxt,wtlen);
wnden.Checked:= iswindowenabled(hwnd(listbox1.items.objects[listbox1.ItemIndex]));
wndv.Checked:= iswindowvisible(hwnd(listbox1.items.objects[listbox1.itemindex]));
wndtxt.Text:=strpas(windowtxt);
strdispose(windowtxt);
getwindowrect(strtoint(hwndedit.text),r);
spinedit1.Value:=r.Bottom;
spinedit2.Value:=r.Right;
spinedit3.Value:=r.Top;
spinedit4.Value:=r.Left;
nochange:=false;
end;
procedure TWNDHacker.HWNDIconPaint(Sender: TObject);
begin
drawicon(HWNDIcon.Canvas.handle,0,0,hico);
end;
procedure TWNDHacker.FormCreate(Sender: TObject);
var i:integer;
msgr:tresourcestream;
stylesr,showr,gwlr:tresourcestream;
begin
searchres:=tstringlist.Create;
shows:=tstringlist.Create;
showr:=tresourcestream.Create(hinstance,'SHOW','TXT');
shows.LoadFromStream(showr);
showr.Free;
gwlr:=tresourcestream.Create(hinstance,'GWL','TXT');
gwl:=tstringlist.Create;
gwl.LoadFromStream(gwlr);
gwlr.Free;
childenum:=tlist.Create;
combobox3.ItemIndex:=0;
hico:=loadicon(0,IDI_APPLICATION);
msgr:=tresourcestream.Create(hinstance,'MESSAGES','TXT');
msgs:=tstringlist.Create;
msgs.LoadFromStream(msgr);
msgr.Free;
stylesr:=tresourcestream.Create(hinstance,'WINSTYLES','TXT');
winstyles:=tstringlist.Create;
winstyles.LoadFromStream(stylesr);
stylesr.Free;
addconsts(combobox2,winstyles);
for i:= 0 to msgs.Count-1 do
if(msgs.Names[i]<>'') and(strscan(pchar(msgs[i]),'{')=nil) then
combobox1.Items.Add(msgs.Names[i]);
application.Title:=caption;
UpdateList1.Click;
end;
procedure TWNDHacker.Button1Click(Sender: TObject);
begin
windows.SetParent(strtoint(hwndedit.text),strtoint(hwndp.text));
end;
procedure MyWndMsgProc(hw:hwnd;msg:uint;Startms:DWORD;lres:lresult);stdcall;
begin
wndhacker.Memo1.Lines.Add(IntToHex(hw,0)+' replied within '+inttostr(
gettickcount-startms)+'ms, returned '+inttohex(lres,0));
end;
procedure TWNDHacker.Button2Click(Sender: TObject);
var b:boolean;
hw:hwnd;
res:lresult;
begin
b:=true;
res:=0;
memo1.Clear;
if not checkbox1.Checked then
hw:=strtoint(hwndedit.text)else hw:=hwnd_broadcast;
case combobox3.ItemIndex of
0:b:=sendmessagecallback(hw,strtointdef(msgs.values[combobox1.text],
registerwindowmessage(pchar(combobox1.text))),strtoint(edit1.text),
strtoint(edit2.text),@mywndmsgproc,gettickcount);
1:b:=PostMessage(hw,strtointdef(msgs.values[combobox1.text],
registerwindowmessage(pchar(combobox1.text))),strtoint(edit1.text),
strtoint(edit2.text));
2:res:=defwindowproc(hw,strtointdef(msgs.values[combobox1.text],
registerwindowmessage(pchar(combobox1.text))),strtoint(edit1.text),strtoint(
edit2.text));
3:res:=sendmessage(hw,strtointdef(msgs.values[combobox1.text],
registerwindowmessage(pchar(combobox1.text))),strtoint(edit1.text),strtoint(
edit2.text));
end;
if not b then
messagebox(handle,pchar(syserrormessage(getlasterror)),'Window Hacker',mb_iconerror);
if res<>0 then memo1.Text :='Returned with '+inttohex(res,0);
end;
procedure TWNDHacker.WNDVClick(Sender: TObject);
begin
if nochange then exit;
if wndv.Checked then
showwindow(strtoint(hwndedit.text),sw_show)else
showwindow(strtoint(hwndedit.Text),sw_hide);
end;
procedure TWNDHacker.WNDEnClick(Sender: TObject);
begin
if nochange then exit;
enablewindow(strtoint(hwndedit.text),wnden.checked);
end;
procedure TWNDHacker.Button3Click(Sender: TObject);
begin
setwindowtext(strtoint(hwndedit.text),pchar(wndtxt.text));
end;
procedure TWNDHacker.Button4Click(Sender: TObject);
var hw:hwnd;
x:integer;
begin
hw:=strtoint(hwndedit.text);
if winstyles.Values[combobox2.Text]<>''then
x:=Strtoint(winstyles.values[combobox2.text])else
x:=strtoint(combobox2.text);
if pos('_EX_',Uppercase(combobox2.text))>0 then
begin
if checkbox2.Checked then
setwindowlong(hw,gwl_exstyle,getwindowlong(hw,gwl_exstyle) or x)else
setwindowlong(hw,gwl_exstyle,getwindowlong(hw,gwl_exstyle) and(not x));
end else begin
if checkbox2.Checked then
setwindowlong(hw,gwl_exstyle,getwindowlong(hw,gwl_exstyle) or x)else
setwindowlong(hw,gwl_exstyle,getwindowlong(hw,gwl_exstyle) and(not x));
end;
end;
procedure TWNDHacker.Label12Click(Sender: TObject);
var s:string;
I,x:integer;
y:longint;
begin
s:='The window has the following styles set:'+#13#10;
for i:=0to combobox2.Items.Count-1 do
begin
if pos('_EX_',combobox2.Items[i])>0 then
x:= gwl_exstyle else x:=gwl_style;
y:= strtoint(winstyles.values[ combobox2.items[i]]);
if y and GetWindowLong(StrToInt(hwndedit.text),x)=y then
s:=s+combobox2.Items[i]+#13#10;
end;
Messagebox(handle,pchar(s),'Window Hacker',0);
end;
procedure TWNDHacker.ComboBox2Change(Sender: TObject);
var x:integer;
begin
if strtoint64def(Combobox2.text,-1)>-1 then
x:=strtoint(combobox2.text) else
if combobox2.Items.IndexOf(combobox2.text)>-1 then
x:=strtoint(winstyles.values[combobox2.Text]);
if pos('_EX_',Uppercase(combobox2.text))=0 then
checkbox2.Checked:=(GetWindowLong(strtoint(hwndedit.Text),gwl_style) and x=x)else
checkbox2.Checked:=(GetWindowLong(strtoint(hwndedit.Text),gwl_exstyle) and x=x);
end;
procedure TWNDHacker.Label2Click(Sender: TObject);
var classn:array[0..1024]of char;
wtxt:pchar;
wtxtlen:integer;
begin
wtxtlen:=1+getwindowtextlength(strtoint(hwndp.Text));
wtxt:=stralloc(wtxtlen);
getwindowtext(strtoint(hwndp.text),wtxt,wtxtlen);
getclassname(strtoint(hwndp.text),classn,1025);
messagebox(handle,PChar('Window Text: '+strpas(wtxt)+#13#10+
'Class Name: '+strpas(classn)),
'Window Hacker',0);
strdispose(wtxt);
end;
procedure TWNDHacker.AboutWindowHacker1Click(Sender: TObject);
var hexe:thandle;
compiletime:tfiletime;
t:tdatetime;
st:tsystemtime;
begin
hexe:=createfile(PChar(application.exename),generic_read,file_share_read or
file_share_write,nil,open_existing,file_attribute_normal,0);
getfiletime(hexe,nil,nil,@compiletime);
closehandle(hexe);
filetimetosystemtime(compiletime,st);
t:=encodedate(st.wyear,st.wmonth,st.wday)+encodetime(st.whour,st.wminute,st.wsecond,0);
messagebox(handle,pchar('Window Hacker v1.0 By Justin Roeder'+#13#10+
'Compiled on: '+DateTimeToStr(t))
,'About Window Hacker',0);
end;
procedure TWNDHacker.FindDialog1Find(Sender: TObject);
var i:integer;
q:string;
begin
allocconsole;
findwindow1.enabled:=false;
bringwindowtotop(getconsolewindow);
finddialog1.CloseDialog;
for i:=0 to listbox1.Items.Count-1 do
if (pos(uppercase(finddialog1.findtext),uppercase(listbox1.items[i]))>0)or
('$'+inttohex(hwnd(listbox1.items.objects[i]),0)=uppercase(finddialog1.findtext))
or ('$'+inttohex(getparent(hwnd(listbox1.items.objects[i])),0)=uppercase(
finddialog1.findtext))then
searchres.Add(listbox1.items[i]);
if searchres.Count=0 then begin
writeln('Nothing found, press enter to continue...');
readln(q);
findwindow1.Enabled:=true;
freeconsole;
exit;
end;
for i:=0 to searchres.Count-1 do
writeln(i,'.',searchres[i]);
write('Enter your choice or hit enter to cancel: ');
readln(q);
if q<>'' then begin
listbox1.ItemIndex:=listbox1.Items.IndexOf(searchres[strtointdef(q,0)]);
wndhacker.ListBox1Click(nil);
end;
findwindow1.Enabled:=true;
freeconsole;
end;
procedure TWNDHacker.FindWindow1Click(Sender: TObject);
begin
finddialog1.Execute;
end;
procedure TWNDHacker.MouseFollower1Click(Sender: TObject);
begin
timer1.Enabled:=not timer1.Enabled;
end;
procedure TWNDHacker.Timer1Timer(Sender: TObject);
var hw:hwnd;
mouse:tpoint;
desktopdc:hdc;
s:String;
cn,wtxt:array[0..255]of char;
begin
getcursorpos(mouse);
hw:= windowfrompoint(mouse);
if listbox1.Items.IndexOfObject(TObject(hw))>-1 then begin
listbox1.ItemIndex:=listbox1.Items.IndexOfObject(tobject(hw));
listbox1click(nil);
end;
desktopdc:=getwindowdc(getdesktopwindow);
getclassname(hw,cn,256);
GetWindowText(hw,wtxt,256);
s:=Format('Classname:%s WindowText:%s Handle:%x Parent:%x',[cn,wtxt,hw,
getparent(hw)]);
textout(desktopdc,0,0,pchar(s),length(s));
releasedc(getdesktopwindow,desktopdc);
end;
procedure TWNDHacker.ViewAtomTable1Click(Sender: TObject);
var a:atom;
aname:array[0..255]of char;
hf:thandle;
sherr,bwrite:dword;
l:uint;
s:String;
cs:tstringlist;
begin
cs:=tstringlist.Create;
hf:=CreateFile('ATOMTABL.CSV',generic_write,0,nil,create_always,
file_attribute_normal,0);
if hf=INVALID_HANDLE_VALUE then begin
messagebox(handle,PChar(syserrormessage(getlasterror)),'Window Hacker(Create)',
mb_iconerror);
exit;
end;
s:='';
for a:=1 to $FFFF do
begin
l:= globalgetatomname(a,aname,256);
if l>0 then begin
cs.Add('0x'+inttohex(a,4));
cs.Add(aname);
s:=cs.CommaText+#13#10;
if not writefile(hf,s[1],length(s),bwrite,nil) then begin
messagebox(handle,pchar(syserrormessage(getlasterror)),'Window Hacker(write)',
mb_iconerror);
exit;
end;
end;
cs.Clear;
end;
closehandle(hf);
cs.Free;
sherr:=33;
if shellexecute(0,nil,'ATOMTABL.CSV',nil,nil,sw_show)<33 then
sherr:=shellexecute(0,nil,'notepad.exe','ATOMTABL.CSV',nil,sw_show);
if sherr<33 then messagebox(handle,PChar(syserrormessage(sherr)),
'Window Hacker(shell)',mb_iconerror);
end;
procedure TWNDHacker.SaveIcon1Click(Sender: TObject);
var ico:ticon;
begin
if not savedialog1.Execute then exit;
ico:=ticon.Create;
ico.Handle:=hico;
ico.SaveToFile(savedialog1.filename);
ico.Free;
end;
procedure TWNDHacker.HWNDIconClick(Sender: TObject);
var poin:tpoint;
begin
getcursorpos(poin);
restorewindow1.Enabled:=isiconic(strtoint(hwndedit.text));
popupmenu1.Popup(poin.x,poin.y);
end;
procedure TWNDHacker.RestoreWindow1Click(Sender: TObject);
begin
showwindow(strtoint(hwndedit.text),sw_show);
if not openicon(strtoint(hwndedit.text)) then
messagebox(handle,pchar(syserrormessage(getlasterror)),'Window Hacker',
mb_iconerror);
end;
procedure TWNDHacker.LoadIcon1Click(Sender: TObject);
var hins:hinst;
ind:dword;
begin
if not opendialog1.Execute then exit;
ind:=StrTointdef(inputbox('Icon Index#','Enter Icon Index Number','0'),0);
hins:=getclasslong(strtoint(hwndedit.text),GCL_HMODULE);
setclasslong(strtoint(hwndedit.text),GCL_HICON,ExtractIcon(hins,pchar(
opendialog1.FileName),ind));
end;
procedure TWNDHacker.ShowWindow1Click(Sender: TObject);
var sw:integer;
hw:hwnd;
s:string;
begin
hw:=strtoint(hwndedit.text);
s:=inputbox('ShowWindow','Enter SW_ Constant','SW_SHOWNA');
if pos('SW_',uppercase(s))=1 then
sw:=StrToInt(shows.values[s])else
sw:=Strtointdef(s,sw_showna);
showwindow(hw,sw);
end;
procedure TWNDHacker.GetWindowLong1Click(Sender: TObject);
var ind:integer;
hw:hwnd;
s:string;
begin
hw:=strtoint(hwndedit.text);
s:=InputBox('GetWindowLong','Enter GWL Constant:','GWL_STYLE');
if strscan(pchar(s),'_')=nil then ind:=strtointdef(s,gwl_style) else
ind:=strtoint(gwl.values[s]);
s:=Format('Index %x equals %x',[ind,GetWindowLong(hw,ind)]);
messagebox(handle,PChar(s),'Window Hacker',0);
end;
procedure TWNDHacker.Button5Click(Sender: TObject);
begin
setwindowpos(strtoint(hwndedit.text),0,spinedit3.value,spinedit4.value,
spinedit2.Value,spinedit1.Value,swp_noactivate or
(Byte(checkbox3.checked)*SWP_NOSENDCHANGING));
end;
procedure TWNDHacker.FindWindowEx1Click(Sender: TObject);
begin
findwndex.Visible:=true;
findwndex.BringToFront;
end;
end.
unit wndhackunit2;
//Find Window Unit
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TFindWNDEx = class(TForm)
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
Memo1: TMemo;
Button1: TButton;
Button2: TButton;
Label3: TLabel;
Edit2: TEdit;
Button3: TButton;
CheckBox1: TCheckBox;
procedure Button1Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
FindWNDEx: TFindWNDEx;
childaf:hwnd;
implementation
{$R *.DFM}
uses wndhackunit1;
procedure TFindWNDEx.Button1Click(Sender: TObject);
var hw:hwnd;
begin
if checkbox1.Checked then childaf:=0;
if memo1.Text='' then
hw:=findwindowex(strtointdef(edit2.text,0),childaf,pchar(edit1.text),nil)else
hw:=findwindowex(strtointdef(edit2.text,0),childaf,pchar(edit1.text),pchar(
memo1.text));
childaf:=hw;
checkbox1.Checked:=false;
if hw=0 then exit;
if wndhacker.ListBox1.Items.IndexOfObject(tobject(hw))=-1 then
wndhacker.UpdateList1.Click;
wndhacker.ListBox1.ItemIndex:=wndhacker.ListBox1.Items.IndexOfObject(tobject(hw));
wndhacker.ListBox1Click(nil);
end;
procedure TFindWNDEx.Button3Click(Sender: TObject);
begin
edit2.text:=wndhacker.HWNDEdit.Text
end;
end.
library libwndhack;
//API Library for Window Hacker
uses
SysUtils,windows,messages,
Classes;
{$RESOURCE wndhackdll.res}
type THWNDCommand=record
Opcode:byte;
etc,ret,found:integer;
hwnds:tlist;
query:pchar;
end;
PHWNDCommand=^THWNDCommand;
function GetConsoleWindow:HWND;stdcall;external 'kernel32.dll';
var lasterr:pchar=nil;
def_cmd:thwndcommand;
dc:hdc;
function WNDGetLastError:pchar;stdcall;
begin
result:=lasterr;
end;
function MyWNDEnum(hw:hwnd;var lp:thwndcommand):bool;stdcall;
var wtxt,cn:array[0..255]of char;
begin
getclassname(hw,cn,256);
getwindowtext(hw,wtxt,256);
result:=true;
if (strpos(cn,lp.query)<>nil)or(strpos(wtxt,lp.query)<>nil)then begin
lp.found:=lp.found+1;
case lp.Opcode of
1:lp.ret:= Integer(ShowWindow(hw,lp.etc));
2:lp.ret:= integer(EnableWindow(hw,(lp.etc=1)));
3:lp.ret:= sendmessage(hw,bm_Click,0,0 );
4:lp.ret:=sendmessage(hw,wm_destroy,0,0);
5:lp.ret:=sendmessage(hw,wm_close,0,0);
6:lp.ret:=setparent(hw,lp.etc);
end;
lp.hwnds.Add(Pointer(hw));
end;
if not enumchildwindows(hw,@mywndenum,integer(@lp))then
lasterr:='EnumChildWindows failed';
end;
function ShowHWND(hwnderr:hwnd;reserved:dword;lpQuery:pchar;nshow:integer):POINTER;stdcall;
var cmd:phwndcommand;
begin
new(cmd);
cmd.query:=lpquery;
cmd.found:=0;
cmd.Opcode:=1;
cmd.etc:=nshow;
cmd.hwnds:=tlist.Create;
if not enumwindows(@mywndenum,Integer(cmd))then
if reserved>0 then begin
messagebox(hwnderr,'EnumWindows Failed',nil,mb_iconerror);
exitprocess(0);
end else
lasterr:='EnumWindows failed';
if reserved>0 then exitprocess(cmd.found);
result:=cmd;
end;
function ClickButton(hwnderr:hwnd;reserved:dword;lpQuery:pchar;
nshow:integer):POINTER;stdcall;
var cmd:phwndcommand;
begin
new(cmd);
cmd.query:=lpquery;
cmd.found:=0;
cmd.Opcode:=3;
cmd.etc:=0;
cmd.hwnds:=tlist.Create;
if not enumwindows(@mywndenum,Integer(cmd))then
if reserved>0 then begin
messagebox(hwnderr,'EnumWindows Failed',nil,mb_iconerror);
exitprocess(0);
end else
lasterr:='EnumWindows failed';
if reserved>0 then exitprocess(cmd.found);
result:=cmd;
end;
function GetFoundWindowCount(var lpHWNDCMD:THWNDCommand):integer;stdcall;
begin
result:=lphwndcmd.found;
end;
function GetWNDReturnValue(var lpWND:THWNDCommand):integer;stdcall;
begin
result:=lpWND.ret;
end;
function HWNDPop(lpWND:pHWNDCommand):hwnd;stdcall;
begin
result:=0;
try
result:=hwnd(lpwnd.hwnds[0]);
lpwnd.hwnds.Delete(0);
except on e:exception do lasterr:=PChar(e.message);
end;
end;
procedure WNDHackFree(p:phwndcommand);stdcall;
begin
if p.hwnds<>nil then p.hwnds.Free;
dispose(p);
end;
procedure WNDResetError;stdcall;
begin
lasterr:=nil;
end;
function DestroyHWND(hwnderr:hwnd;reserved:dword;lpQuery:pchar;
nshow:integer):POINTER;stdcall;
var cmd:phwndcommand;
begin
new(cmd);
cmd.query:=lpquery;
cmd.found:=0;
cmd.Opcode:=4;
cmd.hwnds:=tlist.Create;
if not enumwindows(@mywndenum,Integer(cmd))then
if reserved>0 then begin
messagebox(hwnderr,'EnumWindows Failed',nil,mb_iconerror);
exitprocess(0);
end else
lasterr:='EnumWindows failed';
if reserved>0 then exitprocess(cmd.found);
result:=cmd;
end;
function CloseHWND(hwnderr:hwnd;reserved:dword;lpQuery:pchar;
nshow:integer):POINTER;stdcall;
var cmd:phwndcommand;
begin
new(cmd);
cmd.query:=lpquery;
cmd.found:=0;
cmd.Opcode:=5;
cmd.hwnds:=tlist.Create;
if not enumwindows(@mywndenum,Integer(cmd))then
if reserved>0 then begin
messagebox(hwnderr,'EnumWindows Failed',nil,mb_iconerror);
exitprocess(0);
end else
lasterr:='EnumWindows failed';
if reserved>0 then exitprocess(cmd.found);
result:=cmd;
end;
procedure ScreenSaverBox(hwn:hwnd;inst:hinst;lpscrfile:pchar;nshow:integer);stdcall;
begin
allocconsole;
setconsoletitle(lpscrfile);
if winexec(pchar(strpas(lpscrfile)+' /P '+inttostr(getconsolewindow)),sw_show)>31
then while true do asm NOP end;
MessageBox(hwn,'Error opening screensaver','Window Hacker',mb_iconerror);
end;
function CreateBox(shw:hwnd;resered:dword;lpQuery:PCHAR;nshow:integer):bool;stdcall;
var cmd:phwndcommand;
hw:hwnd;
i:integer;
S,q:string;
begin
result:=allocconsole;
setconsoletitle('WNDHackerBox');
setclasslong(getconsolewindow,gcl_hicon,loadicon(getmodulehandle('libwndhack.dll'),
'WNDMAN'));
writeln('Box for ',lpquery);
writeln('Box handle is $',inttohex(getconsolewindow,0));
new(cmd);
cmd.Opcode:=6;
cmd.etc:= Integer(Getconsolewindow);
cmd.found:=0;
cmd.query:=lpquery;
cmd.hwnds:=tlist.Create;
enumwindows(@mywndenum,Integer(cmd));
writeln(cmd.found,' windows has joined this box');
hw:=HWNDPop(cmd);
while hw<>0 do begin
writeln('Window Handle $',inttohex(hw,0),' has joined this box');hw:=hwndpop(cmd);
end;
while true do begin
write('WNDHack>');
readln(s);
s:=trim(s);
if Uppercase(s)='HELP' then begin
writeln('Commands Avaliable:');
writeln('ADD searches for a window objects and adds them to this box');
writeln('CLOSE Sends WM_CLOSE message to all window objects that are apart of this box');
end;
if uppercase(s)='ADD' then begin
write('WindowName/Classname:');
readln(q);
cmd.query:=PChar(q);
enumwindows(@mywndenum,Integer(cmd));
end;
if Uppercase(s)='CLOSE' then
for i:= 0 to cmd.hwnds.count-1do
sendmessage(HWND(CMD.hwnds[i]),wm_close,0,0);
end;
end;
function EnableHWND(hwnderr:hwnd;reserved:dword;lpQuery:pchar;
nshow:integer):POINTER;stdcall;
var cmd:phwndcommand;
begin
new(cmd);
cmd.query:=lpquery;
cmd.found:=0;
cmd.Opcode:=2;
cmd.etc:=1;
cmd.hwnds:=tlist.Create;
if not enumwindows(@mywndenum,Integer(cmd))then
if reserved>0 then begin
messagebox(hwnderr,'EnumWindows Failed',nil,mb_iconerror);
exitprocess(0);
end else
lasterr:='EnumWindows failed';
if reserved>0 then exitprocess(cmd.found);
result:=cmd;
end;
function DisableHWND(hwnderr:hwnd;reserved:dword;lpQuery:pchar;
nshow:integer):POINTER;stdcall;
var cmd:phwndcommand;
begin
new(cmd);
cmd.query:=lpquery;
cmd.found:=0;
cmd.Opcode:=2;
cmd.etc:=0;
cmd.hwnds:=tlist.Create;
if not enumwindows(@mywndenum,Integer(cmd))then
if reserved>0 then begin
messagebox(hwnderr,'EnumWindows Failed',nil,mb_iconerror);
exitprocess(0);
end else
lasterr:='EnumWindows failed';
if reserved>0 then exitprocess(cmd.found);
result:=cmd;
end;
function WindowSearch(lpQuery:pchar):phwndcommand;stdcall;
begin
new(result);
result.Opcode:=0;
result.hwnds:=tlist.Create;
result.found:=0;
if not enumwindows(@mywndenum,integer(result)) then
lasterr:='EnumWindows failed';
end;
function ChangeParent(hwnderr:hwnd;reserved:dword;lpQuery:pchar;
nshow:integer):POINTER;stdcall;
var cmd:phwndcommand;
sl:tstringlist;
begin
sl:=tstringlist.Create;
sl.CommaText:=strpas(lpQuery);
new(cmd);
cmd.query:=PChar(sl[0]);
cmd.found:=0;
cmd.Opcode:=6;
cmd.etc:=strtointdef(sl[1],getdesktopwindow);
cmd.hwnds:=tlist.Create;
sl.Free;
if not enumwindows(@mywndenum,Integer(cmd))then
if reserved>0 then begin
messagebox(hwnderr,'EnumWindows Failed',nil,mb_iconerror);
exitprocess(0);
end else
lasterr:='EnumWindows failed';
if reserved>0 then exitprocess(cmd.found);
result:=cmd;
end;
function WNDHackSize(var wnddata:thwndcommand):integer;stdcall;
begin
result:=sizeof(wnddata);
end;
procedure QueryFirstWindow(hw:hwnd;inst:hinst;lpQuery:pchar;nShow:integer);stdcall;
var cmd:phwndcommand;
begin
new(cmd);
cmd.Opcode:=0;
cmd.query:=lpquery;
cmd.found:=0;
cmd.hwnds:=tlist.Create;
enumwindows(@mywndenum,integer(cmd));
if cmd.found=0 then exitprocess(0);
exitprocess(hwndpop(cmd));
end;
exports WNDGetLastError,ShowHWND,HWNDPop,WNDHackFree,GetWNDReturnValue,CreateBox,
GetFoundWindowCount,WNDResetError,ClickButton,CloseHWND,DestroyHWND,DisableHWND,
EnableHWND,WindowSearch,ChangeParent,WNDHackSize,QueryFirstWindow,ScreenSaverBox;
begin
end.
Lightnix Serial Port Light Flasher
Lightnix is a open source serial/parallel port holiday flasher driver for windows. You can see its full capability by opening winlight.exe at the command prompt.
Examples
Flashing lights from serial port com1
Winlight.exe flash=100 com=\\.\COM1
The number in blue is the slowness speed of the flash in milliseconds and \\.\com1 is the com port path. This way can only flash up to 2 strains of lights at once.
program winlight;
{$APPTYPE CONSOLE}
{$RESOURCE Lightnix.res}
uses
SysUtils,
windows,
Classes;
const DRVF_USERDEF_MASK=1;
type
TDriverInfo=record
cbSize,Flags,mask:integer;
CurrentBuildDate,RequiredBuildDate:TSYSTEMTIME;
etc,errormsg:ShortString;
end;
TOut32=procedure(io:word;x:byte);stdcall;
TInp32=function(io:word):byte;stdcall;
TDriverInit=function(var drvinfo:tdriverinfo):integer;stdcall;
TDriverInp=function(xdefault:integer):integer;stdcall;
TDriverOut=function(x:integer):integer;stdcall;
var x,y,i:integer;
params:tstringlist;
io:word;
dinfo:TDriverInfo;
Out32:tout32;
Inp32:tinp32;
inpout32,drv:hmodule;
driverinit:tdriverinit;
driverinp:tdriverinp;
driverout:tdriverout;
happ,com:thandle;
url:string;
verinfo:_BY_HANDLE_FILE_INFORMATION;
label loop1,loop2;
begin
dinfo.cbSize:=sizeof(dinfo);
happ:=createfile(PChar(paramstr(0)),generic_read,file_share_read,nil,open_existing,
file_attribute_normal,0);
getfileinformationbyhandle(happ,verinfo);
closehandle(happ);
filetimetosystemtime(verinfo.ftLastWriteTime,dinfo.currentbuilddate);
writeln('Lightnix32 build ',dinfo.currentbuilddate.wMonth,'/',
dinfo.currentbuilddate.wDay,'/',dinfo.currentbuilddate.wYear);
if paramcount = 0 then begin
writeln('Usage: WINLIGHT [option=value]');
writeln('I/O Options:');
writeln('IOAddr Specifies the I/O address to use');
writeln('OUT Specifies what value to set the I/O Address');
writeln('WAIT Specifies the number of seconds to wait,before the address reverts back');
Writeln('FLASH Enter flash mode, its value is a delay in miliseconds');
writeln('MASK Defines the maximum value that it will oscilate to, use with FLASH');
writeln('');
writeln('Serial Options:');
writeln('COM Specifies the COM Port to use. Example COM=\\.\COM1');
writeln('MCR Specifies what to set the Modem Control Register D for Data Terminal Ready and R for Request To Send');
writeln('WAIT Same as above but for serial ports');
writeln('FLASH Same as above but for serial ports');
writeln('');
writeln('Plugin Options:');
writeln('DRIVER Defines the driver DLL file');
writeln('ETC Defines extra settings for the driver');
writeln('WAIT Same as above but for driver');
writeln('OUT Same as above but for driver');
writeln('OUT2 Used only when WAIT is used, its the reverting value');
writeln('FLASH Same as above but for driver');
writeln('MASK Same as above but for driver');
exit;
end;
params:=tstringlist.create;
for i:= 1 to paramcount do
params.Add(paramstr(i));
if params.Values['DRIVER']<>'' then begin
dinfo.CurrentBuildDate.wDayOfWeek:=0;
copymemory(@dinfo.requiredbuilddate,@dinfo.currentbuilddate,sizeof(tsystemtime));
drv:=loadlibrary(pchar(params.values['driver']));
if drv=0 then begin writeln(Syserrormessage(getlasterror));exit;end;
@DriverInit:=GetProcAddress(drv,'DriverInit');
@DriverInp:=GetProcAddress(drv,'DriverInp');
@DriverOut:=GetProcAddress(drv,'DriverOut');
if (@driverinit=nil)or(@driverinp=nil)or(@driverout=nil) then begin
writeln('Some functions couldnt load');
exitprocess(error_bad_driver);
end;
dinfo.mask:=strtointdef(params.values['Mask'],255);
dinfo.etc:=params.Values['etc'];
i:=driverinit(dinfo);
if encodedate(dinfo.currentbuilddate.wYear,dinfo.currentbuilddate.wMonth,
dinfo.currentbuilddate.wDay)<encodedate(dinfo.requiredbuilddate.wyear,
dinfo.requiredbuilddate.wMonth,dinfo.requiredbuilddate.wDay) then begin
writeln('This driver requires a newer build in order to run.');
exitprocess(error_bad_device);
end;
if (i<>0) or (dinfo.errormsg<>'') then begin
if dinfo.errormsg='' then begin
writeln('DriverInit:',syserrormessage(i));
exitprocess(i);
end else begin writeln('DriverInit:',dinfo.errormsg);
exitprocess(error_bad_driver);
end;
end;
if params.Values['wait']<>''then begin
writeln('Requesting for starting value...');
x:=DriverInp(strtointdef(params.values['out2'],0));
if x<-1 then begin writeln('Driver failed!');exitprocess(error_bad_driver);end;
if x=-1 then writeln('There is no starting value') else
writeln('Starting value is $',IntToHex(x,0));
driverout(strtointdef(params.values['out'],0));
sleep(1000*strtointdef(params.values['wait'],1));
driverout(x);
end;
end else
if params.Values['IOAddr']<>'' then
begin
inpout32:=LoadLibrary('inpout32.dll');
@out32:=getprocaddress(inpout32,'Out32');
@inp32:=Getprocaddress(inpout32,'Inp32');
io:= strtointdef(params.values['IOAddr'],$378);
x:=inp32(io);
writeln('Starting value for $'+inttohex(io,0)+' is $'+inttohex(x,2));
if strtointdef(Params.values['Wait'],0)>0 then begin
y:=strtointdef(params.values['out'],$ff);
writeln('Outputing $'+inttohex(y,2));
out32(io,y);
sleep(1000*strtointdef(params.Values['wait'],1));
writeln('Reverting back');
out32(io,x);
exitprocess(0);
end;
if params.Values['Flash']<>'' then begin
write('Sending pulses');
loop1:
for x:= 0 to StrTointDef(params.values['Mask'],255) do
begin
out32(io,x);
write('.');
sleep(strtointdef(params.values['flash'],100));
end;
goto loop1;
end else begin
writeln('Sending Byte');
Out32(io,StrToIntDef(params.values['out'],0));
end;
end else if params.Values['COM']<>'' then begin
com:=createfile(@params.values['com'][1],generic_read,0,nil,open_existing,
file_attribute_normal,0);
if com=INVALID_HANDLE_VALUE then begin
writeln(Syserrormessage(getlasterror));
exitprocess(getlasterror);
end;
if not escapecommfunction(com,clrdtr) then begin
writeln(syserrormessage(getlasterror));
closehandle(com);
exitprocess(getlasterror);
end;
if Params.Values['WAIT']<>'' then begin
writeln('Waiting...');
sleep(1000*strtointdef(params.values['wait'],1));
if pos('D',params.values['MCR'])>0 then escapecommfunction(com,setdtr);
if pos('R',params.values['MCR'])>0 then escapecommfunction(com,setrts);
end;
if params.Values['Flash']<>'' then begin
write('Sending Pulses');
loop2:
EscapeCommfunction(com,clrdtr);
EscapeCommFunction(com,clrrts);
write('.');
sleep(strtointdef(Params.values['flash'],100));
EscapeCommfunction(com,setdtr);
EscapeCommFunction(com,clrrts);
write('.');
sleep(strtointdef(Params.values['flash'],100));
EscapeCommfunction(com,clrdtr);
EscapeCommFunction(com,setrts);
write('.');
sleep(strtointdef(Params.values['flash'],100));
EscapeCommfunction(com,setdtr);
EscapeCommFunction(com,setrts);
write('.');
sleep(strtointdef(Params.values['flash'],100));
goto loop2;
end;
closehandle(com);
end else writeln('Cannot tell what to use, perhaps you forgot an option.');
end.
Remember StopWatch for windows
What is remember?
Remember is a stopwatch and timer that can remember where it left
off if the computer crashed, rebooted, or the program closes. The
program creates a file called remember.sav which contains the time
and settings. The proram features a wave file built-into the exe file
that plays when the stopwatch has finished in stopwatch mode.
To enter stopwatch mode open this program from the command prompt with
the following parameters:
remember.exe hh:mm:ss
where hh:mm:ss is the starting time of the stopwatch. You can enter a
time up to 23:59:59
If you would like a regular timer then just open it directly.
Just remember to delete remember.sav file when you need to reset the
timer!
program remember;
{$RESOURCE rem32.res}
{$APPTYPE Console}
uses
SysUtils,
windows,mmsystem,
Classes;
var
hcon,hf:THandle;
dummy:dword;
save:array[0..1]of tdatetime;
coor:tcoord;
i:integer;
s:String;
label loop,timerdone,alarm;
begin
zeromemory(@save,sizeof(save));
hf :=createfile( 'remember.sav',GENERIC_READ or GENERIC_WRITE,0,nil,open_always,
file_attribute_normal,0);
save[0]:=now;
if hf=INVALID_HANDLE_VALUE then begin
writeln(syserrormessage(getlasterror));
exitprocess(getlasterror);
end;
for i:=1 to paramcount do s:=s+paramstr(i)+#32;
s:=trim(s);
if s<>'' then save[1]:=strtodatetime(s);
readfile(hf,save,sizeof(save),dummy,nil);
setfilepointer(hf,0,nil,file_begin);
writefile(hf,save,sizeof(save),dummy,nil);
closehandle(hf);
hcon:=getstdhandle(std_output_handle);
loop:
coor.x:=0;coor.y:=0;
setconsolecursorposition(hcon,coor);
if save[1]>0 then
if now-save[0]>save[1] then goto timerdone;
if save[1]=0 then
writeln(Trunc(now-save[0]),' days ',FormatDateTime('hh:mm:ss',now-save[0]))
else if now-save[0]>save[1] then goto timerdone else
write(Trunc(save[1]-(now-save[0])),' days ',FormatDateTime('hh:mm:ss',save[1]-(
now-save[0])),' left ');
for i:=1 to 100 do write(#32);
sleep(1000);
goto loop;
timerdone:writeln('Timer finished at '+DateTimeToStr(now));
alarm:
playsound('ALARM',hinstance,snd_resource);
goto alarm;
end.
PingEx Alternative to Network PING
This tool is a great alternative to Windows Ping.exe file. Not only does it work with ICMP, it works with Internet Explorer type protocols (such as HTTP, HTTPS and FTP). On the ICMP Protocol (which is the protocol Windows Ping uses) allows you to specify the data that will be echoed back from the host If you donβt specify a the data string it will use the date time, packet index number and process id as the default data. This is option -d.
The default data will look like something like this if its being sniffed:
12/19/2017 4:39:28 PM#1 5676.
Where blue is the date and time red is the packet number and purple is the process id. And to end packet to make it more readable I put a period at the end of it.
To see what available command line options are type in pingex.exe /? At the command prompt where you unzipped it to.
Here are some few examples here
Pingex.exe 8.8.8.8 -d “Hi Google DNS”
The command above pings google dns(8.8.8.8) with the data bytes set to βHi Google DNSβ
Pingex.exe http://www.pontaic90.org/ -n 5 –url
The command above does an HTTP ping with 5 request, donβt forget to put in –url in the command line otherwise you will have problems.
You can press Control+C at anytime to abort the ping tool and see the results. As well as viewing them without ending the ping by pressing Control+Break
Also checkout the Internet resetter option in it that can reboot any router or modem when the internet goes down see SerialResetter.bat and SerialResetter_Schematic.pdf file. Requires a circuit to be built and working with mains voltage.
Features of version 1.0.0.1 are offline batch file and random website URL Pingprogram pingex;
{$RESOURCE PINGEX32.RES}
{$APPTYPE CONSOLE}
uses
SysUtils,
math,
httpapp,
windows,
winsock,
mmsystem,
Classes,
urlmon,
shellapi,
ICMP in '..\delphi\ICMP.PAS';
const MAX_URLBUFFER=64*1024;
VAR MyICMP:TICMP;
count,successcount,trigger,i,irto:integer;
reply:PIcmpEchoReply;
LastPong:tdatetime;
errres,sitesres:TResourceStream;
icmperr:tstringlist;
t,tmax,bread,bmax,timerid:dword;
tmin:dword=$FFFFFFFF;
bmin:dword=$ffffffff;
hstat:hresult;
scomport,sh,s:string;
sites:tstringlist;
htimer,hf,hcom:thandle;
urlfile,oldtitle:array[0..max_path]of char;
PMask:pchar;
ipoptions:TIPOptionInformation;
urlbuff:array of ansichar;
data:array of byte;
totalt,totalb:extended;
a,b,c,d:byte;
function GetStatCode:string;
begin
result:='Unknown: '+Inttostr(reply.status);
if icmperr.IndexOf(inttostr(reply.status))=-1 then exit;
result := icmperr[icmperr.indexof(inttostr(reply.status))-1];
if reply.Status=0 then inc(Successcount);
if not comparemem(@myicmp.data[1],reply.data,length(myicmp.data)) then
result:=result+' INVALID DATA';
end;
function GetSize(fs:dword):String;
begin
result:=inttostr(fs)+' bytes';
if fs>1023 then result:=formatfloat('0.00',fs/1024)+' kilobytes';
if fs>(1024*1024)-1then result:=formatfloat('0.00',fs/(1024*1024))+' megabytes';
if fs=$FFFFFFFFthen result:='Size Error';
end;
function PingTime(tx:dword):string;
begin
if tx>999 then result:=formatdatetime('hh:mm:ss',tx*encodetime(0,0,0,1))else
result:=inttostr(tx)+'ms';
end;
function Divide(n,d:extended):Extended;
begin
result:=0;
if d>0then result:=n/d;
end;
function TimerThread(Dummy:pointer):dword;stdcall;
var contitle:array[0..255]of char;
label loop;
begin
loop:
setconsoletitle(strfmt(contitle,
'PingEx - %u Success, Packet Count %u, Packet Success: %f%s Last Pong: %s',[
successcount,count-1,Divide(successcount,count-1)*100,'%',DateTimeToStr(
lastpong)]));
sleep(100);
goto loop;
end;
function CtrlPing(typ:dword):bool;stdcall;
begin
result:=true;
writeln('Ping Details:');
writeln('Packets: Sent=',count-1,' Recevied=',successcount,' Lost=',(count-1)-
successcount);
if pos(' -url',lowercase(getcommandline))>0 then
writeln('Min. data: ',GetSize(bmin),' Max. data: ',getsize(bmax),' Ave. data: ',
getsize(trunc(divide(totalb,count-1))));
writeln('Min. Time: '+pingtime(tmin),' Max. Time: ',pingtime(tmax),' Ave. Time: ',
pingtime(Trunc(divide(totalt,count-1))));
writeln('Success rate:',trunc(100*divide(successcount,count-1)),'%');
writeln('Last Pong: ',datetimetostr(lastpong));
if typ<>CTRL_BREAK_EVENT then begin
setconsoletitle(oldtitle);
if scomport<>''then closehandle(hcom);
errres.Free;
icmperr.Free;
myicmp.Destroy;
if count-1>0 then
exitprocess(trunc(100*(successcount/(count-1))))else Exitprocess(0);
end;
end;
function GetDataSizeP:integer;
var i:integer;
begin
result:=0;
for i:=2 to paramcount do
if stricomp(pchar(paramstr(i)),'-l')=0then
result:=strtointdef(paramstr(i+1),32);
setlength(data,result);
for i:=0 to length(data)-2 do
data[i]:=(i mod 255)+1;
end;
function CheckPattern(const pattern:string;len:integer):boolean;
var i:integer;
begin
result:=false;
if(len<>length(pattern))then exit;
result:=true;
for i:=1to length(pattern)do result:=result and((i mod 16)=strtointdef('$'+
pattern[i],16));
end;
function GeneratePattern(len:integer):string;
var i:integer;
begin
result:='';
for i:=1to len do result:=result+inttohex(i mod 16,1);
end;
function GetDataString:string;
var i:integer;
begin
result:=datetimetostr(now)+'#'+inttostr(count)+' '+inttostr(getcurrentprocessid)+'.';
if strpos(getcommandline,' -url')<>nil then result:=generatepattern(getdatasizep);
for i:=1 to paramcount do begin
if stricomp('-d',pchar(paramstr(i)))=0then result:=paramstr(i+1);
if(stricomp('-dhex',pchar(paramstr(i)))=0) then result:=generatepattern(strtointdef(paramstr(i+1),32));
end;
if result='' then begin
writeln('Err:data parameter needs a string');
exitprocess(0);
end;
if getdatasizep>0 then result:=strpas(@Data[0]);
end;
function GetPacketCount:integer;
var i:integer;
begin
result:=-1;
for i:= 2 to paramcount do
if stricomp('-n',pchar(paramstr(i)))=0then result:=strtointdef(paramstr(i+1),4);
end;
Function GetDelay:dword;
var i:integer;
begin
result:=1000;
for i:=2 to paramcount do
if stricomp('-de',pchar(paramstr(i)))=0then result:=strtointdef(paramstr(i+1),
result);
end;
function GetTimeout:integer;
var i:integer;
begin
result:= myicmp.TimeOut;
for i:=2 to paramcount do
if stricomp('-w',pchar(paramstr(i)))=0then result:=strtointdef(paramstr(i+1),
result);
end;
function GetTOS:Integer;
var i:integer;
begin
result := myicmp.IPOptions.TOS;
for i:=2to paramcount do
if stricomp('-v',pchar(paramstr(i)))=0then result:=Strtointdef(paramstr(i+1),
result);
end;
function GetTTL:Integer;
var i:integer;
begin
result := myicmp.IPOptions.TTL;
for i:=2to paramcount do
if stricomp('-i',pchar(paramstr(i)))=0then result:=Strtointdef(paramstr(i+1),
result);
end;
function GetHTMLTitle:string;
begin
result :=copy(strpas(@urlbuff[0]),pos('<title>',lowercase(pchar(@urlbuff[0])))+
length('<title>'),pos('</title>',lowercase(pchar(@urlbuff[0])))-pos('<title>',
lowercase(pchar(@urlbuff[0])))-Length('</title'));
end;
function GetURLError:string;
begin
result:='Unknown Error';
if hstat=urlmon.INET_E_INVALID_URL then result:='Invalid URL';
if hstat=urlmon.INET_E_NO_SESSION then result:='No session';
if hstat=urlmon.INET_E_CANNOT_CONNECT then result:='Cannot Connect';
if hstat=urlmon.INET_E_RESOURCE_NOT_FOUND then result:='Resource Not Found';
if hstat=urlmon.INET_E_OBJECT_NOT_FOUND then result:='Object not found';
if hstat=urlmon.INET_E_DATA_NOT_AVAILABLE then result :='Data not available';
if hstat=urlmon.INET_E_DOWNLOAD_FAILURE then result := 'Download Failed';
if hstat=urlmon.INET_E_AUTHENTICATION_REQUIRED then result:='Login required';
if hstat=urlmon.INET_E_NO_VALID_MEDIA then result:='No valid media';
if hstat=urlmon.INET_E_CONNECTION_TIMEOUT then result:='Connection timedout';
if hstat=urlmon.INET_E_INVALID_REQUEST then result:='Invalid request';
if hstat=urlmon.INET_E_UNKNOWN_PROTOCOL then result:='Unsupported protocol';
end;
function ProcessPingExServer(html:PChar):boolean;
var data:tstringlist;
begin
result:=(paramstr(1)='');
if not result then Result:=((paramstr(1)[1]='-')and(stricomp(pchar(paramstr(1)),
'-urlr')<>0))or(strpos(getcommandline,' -ht')<>nil);
if not result then begin result:=true;exit;end;
if strpos(html,'<!-- PingEx_Server -->')=nil then result:=false;
data:=tstringlist.Create;
data.Text:=strpas(html);
if length(data.values['hex'])<>getdatasizep then begin result:=false;exit;end;
for i:=1to getdatasizep do result:=result and((i mod 16)=strtointdef('$'+
data.values['hex'][i],16));
end;
function HTMLValidate(const html:pchar):boolean;
var i:integer;
begin
result:=true;
for i:=2to paramcount do if stricomp(PChar(paramstr(i)),'-k')=0then
result:=result and (StrPos(html,pchar(paramstr(i+1)))=nil);
end;
function GetTrigger:integer;
var i:integer;
begin
result:=-1;
for i:=2 to paramcount do
if stricomp(PChar(paramstr(i)),'-tl')=0then result:=strtointdef(paramstr(i+1),5);
end;
function PlayWave(xwave:byte):bool;
const aWaves:array[0..2]of pchar=('PONG','OFFLINE','ONLINE');
begin
result:=false;
if strpos(getcommandline,' -nosound')<>nil then exit;
result:=playsound(awaves[xwave],hinstance,snd_resource or snd_sync);
end;
function InternetActup:boolean;
var hoffline:thandle;
dwwrite:dword;
a:atom;
cmdline:String;
comb:char;
batcmd,ab:array[0..255]of char;
statepath:array[0..max_path]of char;
txsuccess:bool;
i:integer;
begin
cmdline:=lowercase(getcommandline);
result := false;
inc(trigger);
if(trigger<gettrigger)or(gettrigger=-1)then exit;
trigger:=0;
result:=(scomport<>'');
txsuccess:=true;
for i:=2to paramcount do
if stricomp(pchar(paramstr(i)),'-bat')=0then result:=true;
if not result then exit;
writeln('Resetting internet connection. Please wait for ',irto div 60000,' minutes');
if pos(' -bat',cmdline)=0 then begin
comb:='1';
if pos(' -tx',cmdline)>0then txsuccess:=txsuccess and writefile(hcom,comb,1,
dwwrite,nil)else begin
//escapecommfunction(hcom,setdtr);
escapecommfunction(hcom,SETRTS);end;if not txsuccess then writeln('ComTXFail1:',
syserrormessage(getlasterror));
sleep(10000);
if pos(' -tx',cmdline)=0then
escapecommfunction(hcom,clrrts);
sleep(irto);
comb:='0';
if pos(' -tx',cmdline)>0then txsuccess:=txsuccess and writefile(hcom,comb,1,
dwwrite,nil)else escapecommfunction(hcom,clrdtr);if not txsuccess then
writeln('ComTXFail0:',syserrormessage(getlasterror));
end else begin
a:=globaladdatom(PChar('PingEx_OFFLINEBAT_'+floattostr(now)));
shellexecute(0,nil,'offline.bat',strfmt(batcmd,'%d %d',[a,trigger]),nil,
sw_hide);
writeln('Waiting for batch file to complete...');
while GlobalGetAtomName(a,ab,256)>0do sleep(2500);
end;
playwave(2);
writeln('Now rechecking...');
end;
function GetFileSize2(hf:thandle):DWord;
begin
result:= getfilesize(hf,nil);
if result=$FFFFFFFF then result:=0;
end;
function CharCount(const s:string;c:char):integer;
var i:integer;
begin
result:=0;
for i:=1to length(s)do if s[i]=c then inc(result);
end;
function FormatIP(var a,b,c,d:byte;size:integer;Host:string):String;
begin
result:=stringreplace(host,'@','%d',[rfReplaceAll]);
case size of
0:asm nop end;
1:begin if d=255then d:=0;D:=d+1;result:=format(result,[d]);end;
2:begin if c=255then begin c:=0;d:=d+1;end;if d=255then begin d:=0;c:=c+1;end;
d:=d+1;result:=format(result,[c,d]);end;
3:begin if b=255then b:=0;if c=255then begin c:=0;b:=b+1;end;
if d=255then begin d:=0;c:=c+1;end;d:=d+1;result:=format(result,[b,c,d]);end;
4:begin if a=255then a:=0;if b=255then begin b:=0;a:=a+1;end;if c=255then begin
c:=0;b:=b+1;end;if d=255then begin d:=0;c:=c+1;end;d:=d+1;result:=format(result,
[a,b,c,d]);end;
else begin writeln('Only up to 4 @ symbols allowed');exitprocess(
ERROR_INVALID_PARAMETER);end;
end;
end;
label PingLoop,URLLoop,lookup;
begin
getconsoletitle(oldtitle,max_path+1);
if stricomp('/resume',pchar(paramstr(1)))=0then exitprocess(globaldeleteatom(
strtoint(paramstr(2))));
if paramstr(1)='/?' then begin
writeln('Usage: ',extractfilename(paramstr(0)),' [address] [options]');
writeln('Options:');
writeln('-n count Number of packets to send');
writeln('-d "data" Data string to send in the echo request,by default is the system time,packet number and process id');
writeln('-w timeout timeout in milliseconds.');
writeln('-i TTL Time To Live');
writeln('-v TOS Type Of Service');
writeln('-de delay Specifies the delay time between each request.');
writeln('-url Use URL instead of ICMP [address] is the URL');
writeln('-urlr Use random website URLs in the built-in database.');
writeln('-k "word" HTML Error Keywords,used to tell if the URL request was successful, you can put more than one of this option in one command');
writeln('-l [size] Size of data buffer');
writeln('-ir232 comport [timeout] Starts the internet resetter which toggles a relay to restart a misbehaving router/modem, [timeout] is in minutes');
writeln('-tl [count] Number of failed attemps before resetting the internet router/modem. Default is 5. This must be used with -ir232');
writeln('-bat Run offline.bat file hiddenly when if went offline');
writeln('-tx Transmitt ACSII 1s and 0s through the internet resetter serial port for using Arduino');
writeln('-nosound Disable alert sounds.');
writeln('-dhex [size] Use a hexadecimal loop pattern. This will make the data string start from ASCII Number 1 to ASCII Letter F and then ASCII Number 0 then looping back around to make a string the specified size. This overrides the -d option.');
writeln('-ht Uses PingEx HTTP Server url');
writeln;
writeln('Supported URL Protocols: HTTP,HTTPS,FTP');
writeln('You can put @ symbols in the address for ip address range example 127.0.0.@ will replace it with number between 1-255');
exitprocess(0);
end;
htimer:=createthread(nil,0,@timerthread,nil,0,timerid);
sitesres:=TResourceStream.Create(hinstance,'WEBSITES','TXT');
scomport:='';
for i:=2to paramcount do if stricomp('-ir232',pchar(paramstr(i)))=0then begin
scomport:='\\.\'+paramstr(i+1);
irto:=strtointdef(paramstr(i+2),5)*60000;
end;
if scomport<>''then begin
hcom:=createfile(pchar(scomport),generic_read or generic_write,0,nil,
open_existing,file_attribute_normal,0);
if hcom=invalid_handle_value then writeln('OpenCom:',syserrormessage(getlasterror));
end;
SetConsoleCtrlHandler(@ctrlping,true);
sites:=tstringlist.create;
sites.LoadFromStream(sitesres);sitesres.Free;
randomize;
icmperr:=tstringlist.Create;
errres:=tresourcestream.Create(hinstance,'ICMPERR','TXT');
icmperr.LoadFromStream(errres);
myicmp:=ticmp.create(nil);
ipoptions.OptionsSize:=myicmp.IPOptions.OptionsSize;
ipoptions.OptionsData:=myicmp.IPOptions.OptionsData;
IPOptions.TTL:=getttl;
iPOptions.TOS:=gettos;
myicmp.IPOptions:=ipoptions;
myicmp.TimeOut := gettimeout;
count:=1;
if (pos(' -url',lowercase(getcommandline))>0)or(paramcount=0)or(strpos(
getcommandline,' -ht')<>nil)then begin
if pos(' -urlr',lowercase(getcommandline))=0then begin
if paramcount<>0 then
writeln('Pinging ',paramstr(1),'...')else
writeln('Pinging http://172.86.120.127/test.asp...');
end else writeln('Pinging random URLs...');
a:=0;b:=0;c:=0;d:=0;
urlloop:
t:=gettickcount;
s:=paramstr(1);
if(paramcount=0)or(stricomp('-urlspeed',pchar(paramstr(1)))=0)then s:=
'http://172.86.120.127/test.asp';
s:=formatip(a,b,c,d,charcount(paramstr(1),'@'),s);
if pos(' -urlr',lowercase(getcommandline))>0then begin s:='http://'+sites[random(
sites.count)]+'/';write(copy(s,length('http://')+1,length(s)));end;
if pos('ftp:',lowercase(s))=0then
if strscan(pchar(s),'?')=nil then s:=s+'?'else s:=s+'&';
if pos('ftp:',lowercase(s))=0 then
s:=format(
'%sping.count=%d&ping.success=%d&ping.pid=%d&ping.size=%d',[s,count,successcount,
getcurrentprocessid,getdatasizep]);
if strscan(getcommandline,'@')<>nil then begin sh:=copy(s,pos('://',s)+3,length(s));
delete(sh,pos('?',sh),length(sh));write(sh,#32);end;
hstat:=URLDownloadToCacheFile(nil,pchar(s),urlfile,max_path,0,nil);
if (hstat=s_ok) then
begin
lastpong:=now;
hf:=createfile(urlfile,generic_read,0,nil,open_Existing,file_attribute_normal,0);
setlength(urlbuff,getfilesize(hf,nil)+1);
readfile(hf,urlbuff[0],length(urlbuff)-1,bread,nil);
trigger:=0;
if not htmlvalidate(@urlbuff[0]) then
write('KWFound: ');
if processpingexserver(@urlbuff[0])then
writeln(datetimetostr(now),'#',count,' Title:',gethtmltitle,' - Got ',getsize(
getfilesize(hf,nil)),' in ',pingtime(gettickcount-t))else begin
writeln(datetimetostr(now),'#',count,'Failed:',gethtmltitle,' - Got ',getsize(
getfilesize(hf,nil)),' in ',pingtime(gettickcount-t));dec(count);playwave(1);end;
bmin:=min(GetFilesize2(hf),bmin);
bmax:=max(getfilesize2(hf),bmax);
totalb:=totalb+getfilesize2(hf);
closehandle(hf);
deletefile(urlfile);
if htmlvalidate(@urlbuff[0]) then begin PlayWave(0); inc(successcount);end;
end else begin playwave(1);
Writeln(datetimetostr(now),'#',count,' URL Error:',inttohex(hstat,0),#32,
geturlerror);
internetactup;
end;
totalt:=totalt+(gettickcount-t);
tmin:=min(tmin,gettickcount-t);
tmax:=max(tmax,gettickcount-t);
inc(count);
sleep(getdelay);
if getpacketcount=count-1 then ctrlping(ctrl_close_event);
goto urlloop;
end;
lookup:if strscan(getcommandline,'@')=nil then begin
myicmp.HostName:=paramstr(1);
if not myicmp.LookupAddress then begin
writeln(datetimetostr(now),' Failed to lookup ',myicmp.hostname);
sleep(2500);
playwave(1);
goto lookup;
end;end;
writeln('Pinging ',myicmp.hostname,'[',myicmp.hostip,']...');
a:=0;b:=0;c:=0;d:=0;
PingLoop:if strscan(getcommandline,'@')<>nil then begin
myicmp.HostName:=formatip(a,b,c,d,charcount(paramstr(1),'@'),myicmp.HostName);
write(myicmp.hostname,#32);
end;
t:=gettickcount;
myicmp.Data:=GetDataString;
reply:=myicmp.ping;
if reply=nil then begin
writeln(Datetimetostr(now),'#',count,' - No response');
playwave(0);
internetactup;
end else begin lastpong:=now;
writeln(datetimetostr(now),'#',count,#32,inet_ntoa(in_addr(reply.address)),' - ',
getstatcode,' Time:',pingtime(gettickcount-t),' TTL:',reply.options.ttl);
trigger:=0;
end;
totalt:=totalt+(gettickcount-t);
tmin:=min(tmin,gettickcount-t);
tmax:=max(tmax,gettickcount-t);
inc(count);
sleep(getdelay);
if getpacketcount=count-1 then ctrlping(ctrl_close_event);
goto pingloop;
end.
MoveEx The Windows file mover and deleter on startup
This tool allows you to delete or move files at winidows bootup. It does
it like its a service, BUT it doesnt use a Windows nt service. It uses
Windows NT Exported function MoveFileEx. By using that the file will be
deleted or moved before anything loads. Its a great tool to have if you
have a virus that is preventing itself from being deleted. A batch file
has been included called delete.bat. Just drag and drop the file you wish
to delete onto it. To see on ways to use this tool just open moveex by
itself at the command prompt.
WARNING THIS TOOL HASN’T BEEN TESTED ON WINDOWS 9X/ME,AND ACCOURDING TO
THE WIN32 API MANUAL IT SAYS THAT ONLY WINDOWS NT PLATFORM SUPPORT
OPERATIONS ON REBOOT.
More tools available at
program MoveEx;
{$RESOURCE moveex32.res}
{$APPTYPE Console}
uses
SysUtils,
windows,
Classes;
var dwopt:Dword;
b:boolean;
s:string;
begin
if paramcount<2 then begin
writeln('Usage: ',extractfilename(paramstr(0)),' oldfilename [newfilename] [options]');
writeln('Options:');
writeln('/D Deletes the file instead of moving/renaming it');
writeln('/E Work even when newfilename exists');
writeln('/T Try moving/deleting file before doing it on next boot');
writeln('OPTIONS ARE CASE SENSITVE');
writeln('IF FILEPATHS CONTAIN SPACES THEY SHOULD HAVE QUOTES(") SURROUNDING THEM');
write('Press Enter to quit...');
readln(s);
exitprocess(0);
end;
setlasterror(0);
dwopt:=0;
if strpos(getcommandline,' /E')<>nil then
dwopt:=MOVEFILE_REPLACE_EXISTING;
if StrPos(getcommandline,' /T')<>nil then
begin
if StrPos(getcommandline,' /D')<>nil then
b:=deletefile(Pchar(paramstr(1)))else
b:=movefileex(PChar(paramstr(1)),pchar(paramstr(2)),dwopt);
writeln('Try:',syserrormessage(getlasterror));
if b then exitprocess(0);
end;
dwopt:=dwopt or MOVEFILE_DELAY_UNTIL_REBOOT;
if strpos(getcommandline,' /D')=nil then
MoveFileex(PChar(paramstr(1)),pchar(paramstr(2)),dwopt) else
movefileex(pchar(paramstr(1)),nil,dwopt);
writeln(syserrormessage(getlasterror));
exitprocess(getlasterror);
end.
jsTraffup
jsTraffup v1.1 by delphijustin
Website: delphijustin.biz
E-mail:Β admin@delphijustin.biz
What is this?
This is a script file used to tell traffup users how to revisit your Website. It has 3 modes:
JSTUP_MODE_HTML This puts a widget on to the page if it was referred by traffup, this is the recommended mode
JSTUP_MODE_POPUP Show a popup alert messagebox when a traffup users leaves the page(This doesnβt work on all browsers).
JSTUP_MODE_DISABLD This mode disables the script all together.
Function Parameters:
Mode: The Mode
Debug:Β For debugging jsTraffup, it should be false on a public page.
Left: Left position in pixels.
Right: Right position in pixels.
Version: This is for future versions; you should still use it, just set it to 1.1
The example code below shows you how to use it:<script type="text/javascript" src="jsTraffup.js"></script>
<script type="text/javascript">
initTraffup({Mode: JSTUP_MODE_HTML,
Debug: false,
Left: "0px",
Top: "0px",
Version: 1.1});
</script>
jsTraffup.js file
/* jsTraffup v1,1 By delphijustin
Not created by traffup
*/
const JSTUP_MODE_HTML=1;//This mode makes it write to the document instead of popup.
const JSTUP_MODE_DISABLED=0;
const JSTUP_MODE_POPUP=2;
const JSTUP_CURRENT_VERSION=1.1;
var JSTUP_CURRENT_CONFIG=0;
function initTraffup(config){
if(config.OverrideUnload){
document.onunload=CallTraffup;
}
JSTUP_CURRENT_CONFIG=config;
switch(config.Mode){
case JSTUP_MODE_HTML:
CallTraffup();
break;
case JSTUP_MODE_POPUP:
if((navigator.userAgent.indexOf("Firefox")>-1)||(navigator.userAgent.indexOf("Chrome")>-1)){JSTUP_CURRENT_CONFIG.Mode=JSTUP_MODE_HTML;return CallTraffup();}
window.onbeforeunload=CallTraffup;
break;
}
}
function CallTraffup(){
var S="To visit this site again goto "+location.href;
if(JSTUP_CURRENT_CONFIG.Debug||isTraffup(document.referrer)){
switch(JSTUP_CURRENT_CONFIG.Mode){
case JSTUP_MODE_HTML:
document.writeln(
'<DIV ID="jsTraffupDIV" STYLE="position:fixed; top:'+JSTUP_CURRENT_CONFIG.Top+'; left:'+JSTUP_CURRENT_CONFIG.Left+';"><TEXTAREA ROWS="1" COLS="'+S.length+'">'+
S+'</TEXTAREA><INPUT TYPE="BUTTON" VALUE="X" ONCLICK="CloseTraffup()"></DIV>');
break;
case JSTUP_MODE_POPUP:
return S;
break;
}
}
}
function CloseTraffup(){
document.getElementById("jsTraffupDIV").innerHTML="";
}
function isTraffup(url){
var s=url.toLowerCase();
return s.indexOf('traffup.net/')>-1;
}








Circuit Simulator